{
  "openapi": "3.1.0",
  "info": {
    "title": "MindCloud Public API",
    "version": "2.0.0",
    "description": "REST surface under /v2. Authenticate with a company-scoped API key sent as a bearer token. Each key holds a set of permissions; each operation lists the ones it requires as the apiKey security roles. A request may use a permission only while the user who created the key also holds it."
  },
  "servers": [
    {
      "url": "https://connect.mindcloud.co"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v2/workflows": {
      "get": {
        "operationId": "v2-list-workflows",
        "summary": "List workflows for the company with filtering, sorting, and pagination",
        "description": "List workflows for the company with filtering, sorting, and pagination. The workflow definition is only available on the detail endpoint.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, type, isActive, isTemplate, size, tags, createdOn, createdBy, updatedOn, updatedBy."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, type, isActive, isTemplate, size, tags, createdOn, createdBy, updatedOn, updatedBy. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, type, isActive, isTemplate, size, tags, createdOn, createdBy, updatedOn, updatedBy. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on type: `type=value` matches it exactly. Bracket operators: `type[ne]`, `type[gt]`, `type[gte]`, `type[lt]`, `type[lte]`, `type[contains]`, `type[starts]`, `type[ends]`, and `type[in]` / `type[nin]` with comma-separated values."
          },
          {
            "name": "isActive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isActive: `isActive=value` matches it exactly. Bracket operators: `isActive[ne]`, `isActive[gt]`, `isActive[gte]`, `isActive[lt]`, `isActive[lte]`, and `isActive[in]` / `isActive[nin]` with comma-separated values."
          },
          {
            "name": "isTemplate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isTemplate: `isTemplate=value` matches it exactly. Bracket operators: `isTemplate[ne]`, `isTemplate[gt]`, `isTemplate[gte]`, `isTemplate[lt]`, `isTemplate[lte]`, and `isTemplate[in]` / `isTemplate[nin]` with comma-separated values."
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on size: `size=value` matches it exactly. Bracket operators: `size[ne]`, `size[gt]`, `size[gte]`, `size[lt]`, `size[lte]`, `size[contains]`, `size[starts]`, `size[ends]`, and `size[in]` / `size[nin]` with comma-separated values."
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on tags: `tags=value` matches it exactly. Bracket operators: `tags[ne]`, `tags[gt]`, `tags[gte]`, `tags[lt]`, `tags[lte]`, `tags[contains]`, `tags[starts]`, `tags[ends]`, and `tags[in]` / `tags[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedBy: `updatedBy=value` matches it exactly. Bracket operators: `updatedBy[ne]`, `updatedBy[gt]`, `updatedBy[gte]`, `updatedBy[lt]`, `updatedBy[lte]`, `updatedBy[contains]`, `updatedBy[starts]`, `updatedBy[ends]`, and `updatedBy[in]` / `updatedBy[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workflow"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-workflow",
        "summary": "Create an empty workflow",
        "description": "Create an empty workflow. New workflows start disabled: add triggers and steps (POST /v2/workflows/:workflowId/triggers and /steps, or in the app), publish, then enable it via PUT /v2/workflows/:workflowId.\n\nRequires the API key permission workflow:create.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "tags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "type": {
                    "default": "workflow",
                    "description": "workflow (the default), or function: a workflow other workflows call with Run Workflow.",
                    "type": "string",
                    "enum": [
                      "workflow",
                      "function"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Workflow"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The insert returned no row (WORKFLOW_CREATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}": {
      "get": {
        "operationId": "v2-get-workflow",
        "summary": "Get one workflow, including its full definition and summary",
        "description": "Get one workflow, including its full definition and summary.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowDetail"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow",
        "summary": "Update workflow metadata: rename, enable or disable through isActive, or replace the assigned tags",
        "description": "Update workflow metadata: rename, enable or disable through isActive, or replace the assigned tags.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "tags": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Workflow"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid, or none of \"name\", \"isActive\", or \"tags\" was provided (INVALID_QUERY, NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-workflow",
        "summary": "Soft-delete a workflow",
        "description": "Soft-delete a workflow. The workflow is disabled and disappears from the API, along with its recorded runs.\n\nRequires the API key permission workflow:delete.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/duplicate": {
      "post": {
        "operationId": "v2-duplicate-workflow",
        "summary": "Duplicate a workflow within the company, including its steps and schedules",
        "description": "Duplicate a workflow within the company, including its steps and schedules. The copy starts disabled and is named \"<source> (copy)\" unless a name is provided.\n\nRequires the API key permission workflow:create.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Workflow"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The workflow step graph is invalid (WORKFLOW_GRAPH_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The duplicated workflow could not be loaded (WORKFLOW_DUPLICATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/run": {
      "post": {
        "operationId": "v2-run-workflow",
        "summary": "Start a workflow run",
        "description": "Start a workflow run. Execution is asynchronous: this returns the run id immediately; poll GET /v2/runs/:runId for the outcome. Runs the published version by default.\n\nRequires the API key permission workflow:run.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:run"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "default": "published",
                    "type": "string",
                    "enum": [
                      "published",
                      "draft"
                    ]
                  },
                  "environmentId": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/QueuedRun"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid, or the environment id is unknown to the company (INVALID_QUERY, UNKNOWN_ENVIRONMENT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The workflow is disabled (WORKFLOW_DISABLED), or has no published version to run (WORKFLOW_NOT_PUBLISHED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The run could not be enqueued and was not created, so retrying is safe (RUN_ENQUEUE_FAILED); or the run was created but its start could not be confirmed, so details.runId names it: check it with GET /v2/runs/:runId instead of retrying, which would start a second run (RUN_ENQUEUE_UNCONFIRMED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/versions": {
      "get": {
        "operationId": "v2-list-workflow-versions",
        "summary": "List versions of a workflow: the mutable draft (version \"draft\") plus published and unpublished snapshots, newest first",
        "description": "List versions of a workflow: the mutable draft (version \"draft\") plus published and unpublished snapshots, newest first.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowVersion"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/definition": {
      "get": {
        "operationId": "v2-get-workflow-definition",
        "summary": "One workflow's structure at a version: its properties, its triggers and its steps as a tree, in execution order",
        "description": "One workflow's structure at a version: its properties, its triggers and its steps as a tree, in execution order.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "draft",
              "description": "draft (the default, what the editor shows), published (what runs), or a version label from List Workflow Versions, such as 0.0.14.",
              "type": "string",
              "pattern": "^(draft|published|\\d+\\.\\d+\\.\\d+)$"
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowDefinition"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-set-workflow-definition",
        "summary": "Build or change a workflow's whole draft in one atomic call: send every trigger and step as you want them, in the shape Get Workflow Definition answers, with their configurations",
        "description": "Build or change a workflow's whole draft in one atomic call: send every trigger and step as you want them, in the shape Get Workflow Definition answers, with their configurations.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "triggers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    "description": "Every trigger the draft should have: { id } for one it has, { ref, app, action? } for a new one, each with name, isDisabled and configuration as you want them. A trigger left out is removed."
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    "description": "Every step the draft should have, as a tree in execution order: { id } for one it has, { ref, app, action? } for a new one, each with name, isDisabled and configuration, holding its steps in body (a loop, folder or batch step) or then and else (an If/Else). A step left out is removed with the steps it holds."
                  },
                  "id": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "isActive": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "environmentId": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tags": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "version": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "string"
                  },
                  "publishedVersion": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "changesSincePublish": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "revision": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "triggers",
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowDefinitionWrite"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The definition has problems, and nothing was changed (WORKFLOW_DEFINITION_INVALID): error.details.issues lists every one with its JSON Pointer into the body (UNKNOWN_STEP, DUPLICATE_STEP, APP_CHANGE_UNSUPPORTED, TRIGGER_CHANGE_UNSUPPORTED, APP_NOT_FOUND, ACTION_NOT_FOUND, INVALID_POSITION, and every configuration problem Update Workflow Step Configuration answers).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An app's draft version needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/definition/validate": {
      "post": {
        "operationId": "v2-validate-workflow-definition",
        "summary": "Check a whole workflow definition the way Set Workflow Definition would apply it, without changing anything",
        "description": "Check a whole workflow definition the way Set Workflow Definition would apply it, without changing anything.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "triggers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    "description": "Every trigger the draft should have: { id } for one it has, { ref, app, action? } for a new one, each with name, isDisabled and configuration as you want them. A trigger left out is removed."
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": {}
                    },
                    "description": "Every step the draft should have, as a tree in execution order: { id } for one it has, { ref, app, action? } for a new one, each with name, isDisabled and configuration, holding its steps in body (a loop, folder or batch step) or then and else (an If/Else). A step left out is removed with the steps it holds."
                  },
                  "id": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "isActive": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "environmentId": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tags": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "version": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "string"
                  },
                  "publishedVersion": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "changesSincePublish": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "revision": {
                    "description": "Read-only: change the workflow itself with Update Workflow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "triggers",
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowDefinitionValidation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An app's draft version needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "The draft changed while it was being checked (REVISION_MISMATCH): check it again. error.details.revision is the current revision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps": {
      "get": {
        "operationId": "v2-list-workflow-steps",
        "summary": "A workflow's steps, flat, in execution order, each with where it sits (parentStepId, slot, depth)",
        "description": "A workflow's steps, flat, in execution order, each with where it sits (parentStepId, slot, depth). Triggers are listed separately.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, number, name, appSlug, appVersion, actionId, functionId, parentStepId, slot, depth, isDisabled, isConfigured."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: none. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: name, appSlug, actionId, functionId, parentStepId, slot, depth, isDisabled, isConfigured. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "appSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appSlug: `appSlug=value` matches it exactly. Bracket operators: `appSlug[ne]`, `appSlug[gt]`, `appSlug[gte]`, `appSlug[lt]`, `appSlug[lte]`, `appSlug[contains]`, `appSlug[starts]`, `appSlug[ends]`, and `appSlug[in]` / `appSlug[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "functionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on functionId: `functionId=value` matches it exactly. Bracket operators: `functionId[ne]`, `functionId[gt]`, `functionId[gte]`, `functionId[lt]`, `functionId[lte]`, `functionId[contains]`, `functionId[starts]`, `functionId[ends]`, and `functionId[in]` / `functionId[nin]` with comma-separated values."
          },
          {
            "name": "parentStepId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on parentStepId: `parentStepId=value` matches it exactly. Bracket operators: `parentStepId[ne]`, `parentStepId[gt]`, `parentStepId[gte]`, `parentStepId[lt]`, `parentStepId[lte]`, `parentStepId[contains]`, `parentStepId[starts]`, `parentStepId[ends]`, and `parentStepId[in]` / `parentStepId[nin]` with comma-separated values."
          },
          {
            "name": "slot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "steps",
                "body",
                "then",
                "else"
              ]
            },
            "description": "Filter on slot: `slot=value` matches it exactly. Bracket operators: `slot[ne]`, `slot[gt]`, `slot[gte]`, `slot[lt]`, `slot[lte]`, `slot[contains]`, `slot[starts]`, `slot[ends]`, and `slot[in]` / `slot[nin]` with comma-separated values."
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on depth: `depth=value` matches it exactly. Bracket operators: `depth[ne]`, `depth[gt]`, `depth[gte]`, `depth[lt]`, `depth[lte]`, and `depth[in]` / `depth[nin]` with comma-separated values."
          },
          {
            "name": "isDisabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDisabled: `isDisabled=value` matches it exactly. Bracket operators: `isDisabled[ne]`, `isDisabled[gt]`, `isDisabled[gte]`, `isDisabled[lt]`, `isDisabled[lte]`, and `isDisabled[in]` / `isDisabled[nin]` with comma-separated values."
          },
          {
            "name": "isConfigured",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isConfigured: `isConfigured=value` matches it exactly. Bracket operators: `isConfigured[ne]`, `isConfigured[gt]`, `isConfigured[gte]`, `isConfigured[lt]`, `isConfigured[lte]`, and `isConfigured[in]` / `isConfigured[nin]` with comma-separated values."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "draft",
              "type": "string",
              "pattern": "^(draft|published|\\d+\\.\\d+\\.\\d+)$"
            },
            "description": "draft (the default, what the editor shows), published (what runs), or a version label from List Workflow Versions, such as 0.0.14."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowStep"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-add-workflow-step",
        "summary": "Add a step to a workflow's draft at a position: an app action, or a built-in such as If, Loop or Map",
        "description": "Add a step to a workflow's draft at a position: an app action, or a built-in such as If, Loop or Map.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The app id or slug, from List Universal Apps (includeBuiltins=true for If, Loop, Map and the other built-ins)."
                  },
                  "appVersion": {
                    "description": "latest (the default) pins the current published version. A version number pins that version.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "action": {
                    "description": "The action id or slug, from List Universal Actions. Built-ins take none. Left out, the step is added without an action, as in the editor.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "description": "The step's display name. Left out, it is named the way the editor names it.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "position": {
                    "description": "Where the step goes. Left out: last at the top level.",
                    "type": "object",
                    "properties": {
                      "parentStepId": {
                        "description": "The loop, folder, batch step or If/Else the step goes inside. null or left out: the top level.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "slot": {
                        "description": "steps at the top level; body inside a loop, folder or batch step; then or else inside an If/Else. Defaults to steps at the top level.",
                        "type": "string",
                        "enum": [
                          "steps",
                          "body",
                          "then",
                          "else"
                        ],
                        "x-enumDescriptions": {
                          "steps": "The top level of the workflow.",
                          "body": "Inside a loop, a folder, or a step that pages in batches: the steps that run for each item or page.",
                          "then": "The If/Else lane that runs when its conditions are true.",
                          "else": "The If/Else lane that runs otherwise."
                        }
                      },
                      "afterStepId": {
                        "description": "The step in that slot to follow. null puts the step first; left out puts it last.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "app"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStep"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body names an app, version or action that does not exist or cannot be a step, a branch version, or a position that is not in this workflow (APP_NOT_FOUND, APP_NOT_A_STEP, APP_VERSION_NOT_FOUND, BRANCH_APP_VERSION, ACTION_NOT_FOUND, ACTION_IS_A_TRIGGER, ACTION_AMBIGUOUS, INVALID_POSITION, WORKFLOW_GRAPH_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An app's draft version needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflow-steps": {
      "get": {
        "operationId": "v2-list-all-workflow-steps",
        "summary": "List the steps and triggers of every workflow in the organization in one call, from each workflow's draft: each with its workflow, app, action, what the action does (read, create, update or delete), and whether it is a trigger",
        "description": "List the steps and triggers of every workflow in the organization in one call, from each workflow's draft: each with its workflow, app, action, what the action does (read, create, update or delete), and whether it is a trigger.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflow-steps"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowId, workflowName, isTrigger, name, appSlug, appName, functionId, actionId, actionName, operation, isDisabled, isConfigured, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, workflowId, workflowName, isTrigger, name, appSlug, appName, functionId, actionId, actionName, operation, isDisabled, isConfigured, createdOn, updatedOn. Default: workflowId,createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, workflowId, workflowName, isTrigger, name, appSlug, appName, functionId, actionId, actionName, operation, isDisabled, isConfigured, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowId: `workflowId=value` matches it exactly. Bracket operators: `workflowId[ne]`, `workflowId[gt]`, `workflowId[gte]`, `workflowId[lt]`, `workflowId[lte]`, `workflowId[contains]`, `workflowId[starts]`, `workflowId[ends]`, and `workflowId[in]` / `workflowId[nin]` with comma-separated values."
          },
          {
            "name": "workflowName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowName: `workflowName=value` matches it exactly. Bracket operators: `workflowName[ne]`, `workflowName[gt]`, `workflowName[gte]`, `workflowName[lt]`, `workflowName[lte]`, `workflowName[contains]`, `workflowName[starts]`, `workflowName[ends]`, and `workflowName[in]` / `workflowName[nin]` with comma-separated values."
          },
          {
            "name": "isTrigger",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isTrigger: `isTrigger=value` matches it exactly. Bracket operators: `isTrigger[ne]`, `isTrigger[gt]`, `isTrigger[gte]`, `isTrigger[lt]`, `isTrigger[lte]`, and `isTrigger[in]` / `isTrigger[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "appSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appSlug: `appSlug=value` matches it exactly. Bracket operators: `appSlug[ne]`, `appSlug[gt]`, `appSlug[gte]`, `appSlug[lt]`, `appSlug[lte]`, `appSlug[contains]`, `appSlug[starts]`, `appSlug[ends]`, and `appSlug[in]` / `appSlug[nin]` with comma-separated values."
          },
          {
            "name": "appName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appName: `appName=value` matches it exactly. Bracket operators: `appName[ne]`, `appName[gt]`, `appName[gte]`, `appName[lt]`, `appName[lte]`, `appName[contains]`, `appName[starts]`, `appName[ends]`, and `appName[in]` / `appName[nin]` with comma-separated values."
          },
          {
            "name": "functionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on functionId: `functionId=value` matches it exactly. Bracket operators: `functionId[ne]`, `functionId[gt]`, `functionId[gte]`, `functionId[lt]`, `functionId[lte]`, `functionId[contains]`, `functionId[starts]`, `functionId[ends]`, and `functionId[in]` / `functionId[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "actionName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionName: `actionName=value` matches it exactly. Bracket operators: `actionName[ne]`, `actionName[gt]`, `actionName[gte]`, `actionName[lt]`, `actionName[lte]`, `actionName[contains]`, `actionName[starts]`, `actionName[ends]`, and `actionName[in]` / `actionName[nin]` with comma-separated values."
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "read",
                "create",
                "update",
                "delete"
              ]
            },
            "description": "Filter on operation: `operation=value` matches it exactly. Bracket operators: `operation[ne]`, `operation[gt]`, `operation[gte]`, `operation[lt]`, `operation[lte]`, `operation[contains]`, `operation[starts]`, `operation[ends]`, and `operation[in]` / `operation[nin]` with comma-separated values."
          },
          {
            "name": "isDisabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDisabled: `isDisabled=value` matches it exactly. Bracket operators: `isDisabled[ne]`, `isDisabled[gt]`, `isDisabled[gte]`, `isDisabled[lt]`, `isDisabled[lte]`, and `isDisabled[in]` / `isDisabled[nin]` with comma-separated values."
          },
          {
            "name": "isConfigured",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isConfigured: `isConfigured=value` matches it exactly. Bracket operators: `isConfigured[ne]`, `isConfigured[gt]`, `isConfigured[gte]`, `isConfigured[lt]`, `isConfigured[lte]`, and `isConfigured[in]` / `isConfigured[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrganizationWorkflowStep"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}": {
      "get": {
        "operationId": "v2-get-workflow-step",
        "summary": "One step of a workflow at a version, with where it sits",
        "description": "One step of a workflow at a version, with where it sits.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "draft",
              "description": "draft (the default, what the editor shows), published (what runs), or a version label from List Workflow Versions, such as 0.0.14.",
              "type": "string",
              "pattern": "^(draft|published|\\d+\\.\\d+\\.\\d+)$"
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStep"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow-step",
        "summary": "Rename a draft step, turn it off or on, change its action, or move it to another version of its app",
        "description": "Rename a draft step, turn it off or on, change its action, or move it to another version of its app. Only the fields sent change.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "A new display name. null goes back to the name the editor gives the step.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDisabled": {
                    "description": "true turns the step off: runs skip it.",
                    "type": "boolean"
                  },
                  "action": {
                    "description": "The step's new action, by id or slug. Arguments the new action does not take are dropped, as in the editor. null clears the action.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "appVersion": {
                    "description": "Move the step to this version of its app: latest, or a version number. The action must exist in it.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStep"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent, or the action or version does not exist (NO_FIELDS_TO_UPDATE, ACTION_NOT_FOUND, ACTION_IS_A_TRIGGER, ACTION_AMBIGUOUS, APP_NOT_FOUND, APP_VERSION_NOT_FOUND, BRANCH_APP_VERSION).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-workflow-step",
        "summary": "Remove a step from a workflow's draft",
        "description": "Remove a step from a workflow's draft. A step holding others (a loop's body, an If/Else's lanes) is removed with them only when includeChildren=true.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "name": "includeChildren",
            "in": "query",
            "required": false,
            "schema": {
              "default": "false",
              "description": "true also removes the steps inside this one. false, the default, refuses a step that holds others.",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The step holds other steps and includeChildren is not true (STEP_HAS_CHILDREN). error.details.stepIds lists them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers": {
      "get": {
        "operationId": "v2-list-workflow-triggers",
        "summary": "What starts a workflow: its schedules, webhooks, app events, and when other workflows call it",
        "description": "What starts a workflow: its schedules, webhooks, app events, and when other workflows call it.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, appSlug, appVersion, actionId, isDisabled, isConfigured."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: none. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: name, appSlug, actionId, isDisabled, isConfigured. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "appSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appSlug: `appSlug=value` matches it exactly. Bracket operators: `appSlug[ne]`, `appSlug[gt]`, `appSlug[gte]`, `appSlug[lt]`, `appSlug[lte]`, `appSlug[contains]`, `appSlug[starts]`, `appSlug[ends]`, and `appSlug[in]` / `appSlug[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "isDisabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDisabled: `isDisabled=value` matches it exactly. Bracket operators: `isDisabled[ne]`, `isDisabled[gt]`, `isDisabled[gte]`, `isDisabled[lt]`, `isDisabled[lte]`, and `isDisabled[in]` / `isDisabled[nin]` with comma-separated values."
          },
          {
            "name": "isConfigured",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isConfigured: `isConfigured=value` matches it exactly. Bracket operators: `isConfigured[ne]`, `isConfigured[gt]`, `isConfigured[gte]`, `isConfigured[lt]`, `isConfigured[lte]`, and `isConfigured[in]` / `isConfigured[nin]` with comma-separated values."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "draft",
              "type": "string",
              "pattern": "^(draft|published|\\d+\\.\\d+\\.\\d+)$"
            },
            "description": "draft (the default, what the editor shows), published (what runs), or a version label from List Workflow Versions, such as 0.0.14."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowTrigger"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-add-workflow-trigger",
        "summary": "Add something that starts the workflow to its draft: a schedule, a webhook, When called (runWorkflow), or an app event the platform polls for",
        "description": "Add something that starts the workflow to its draft: a schedule, a webhook, When called (runWorkflow), or an app event the platform polls for.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "schedule, webhook, runWorkflow (When called: another workflow calls this one), or an app with trigger actions (List Universal Apps, usableAsTrigger=true)."
                  },
                  "appVersion": {
                    "description": "latest (the default) pins the current published version. A version number pins that version.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "action": {
                    "description": "For an app event: the trigger's id or slug (List Universal Actions, kind=trigger). Built-ins take none.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "description": "The step's display name. Left out, it is named the way the editor names it.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "app"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AddedWorkflowTrigger"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body names an app, version or trigger that does not exist or cannot start a workflow, an app trigger without its action, or one the API cannot set up yet (APP_NOT_FOUND, APP_NOT_A_TRIGGER, APP_VERSION_NOT_FOUND, BRANCH_APP_VERSION, ACTION_NOT_FOUND, ACTION_NOT_A_TRIGGER, ACTION_AMBIGUOUS, ACTION_REQUIRED, TRIGGER_NEEDS_EDITOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An app's draft version needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The workflow already has a When called trigger; a workflow can have one (WHEN_CALLED_EXISTS).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/schema": {
      "get": {
        "operationId": "v2-get-workflow-step-schema",
        "summary": "What a draft step's configuration accepts, at the app version the step uses",
        "description": "What a draft step's configuration accepts, at the app version the step uses.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepSchema"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The step has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/configuration": {
      "get": {
        "operationId": "v2-get-workflow-step-configuration",
        "summary": "A draft step's configuration: its action's arguments, its options and its connection",
        "description": "A draft step's configuration: its action's arguments, its options and its connection.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepConfiguration"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The step cannot be configured: the step has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow-step-configuration",
        "summary": "Set a draft step's arguments, options or connection",
        "description": "Set a draft step's arguments, options or connection. Only what is sent changes.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arguments": {
                    "description": "Arguments to set, nested as the schema nests them. Objects merge key by key; an array replaces; null removes. null for the whole object clears every argument.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "description": "Options to set: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. Sending one turns it on; null turns it off, as deleting it in the editor does. Objects merge key by key.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connection": {
                    "description": "{ \"mode\": \"connection\", \"connectionId\": \"...\", \"rules\": [...] }, { \"mode\": \"environment\" }, { \"mode\": \"installation\" } (integration workflows), or null for none. Replaced whole.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepConfiguration"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing was sent (NO_FIELDS_TO_UPDATE); a value does not fit the schema (UNKNOWN_ARGUMENT, INVALID_TYPE, INVALID_CHOICE, INVALID_VALUE, INVALID_EXPRESSION, INVALID_REFERENCE, UNSAFE_CODE (the code safety check refused changed code), UNKNOWN_OPTION, OPTION_UNSUPPORTED, INVALID_OPERATOR, FILTER_NESTING_UNSUPPORTED, UNKNOWN_CONNECTION, CONNECTION_NOT_ALLOWED; every one in details.issues); or the step has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/configuration/validate": {
      "post": {
        "operationId": "v2-validate-workflow-step-configuration",
        "summary": "Check a step configuration change without saving it",
        "description": "Check a step configuration change without saving it.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arguments": {
                    "description": "Arguments to set, nested as the schema nests them. Objects merge key by key; an array replaces; null removes. null for the whole object clears every argument.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "description": "Options to set: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. Sending one turns it on; null turns it off, as deleting it in the editor does. Objects merge key by key.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connection": {
                    "description": "{ \"mode\": \"connection\", \"connectionId\": \"...\", \"rules\": [...] }, { \"mode\": \"environment\" }, { \"mode\": \"installation\" } (integration workflows), or null for none. Replaced whole.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepConfigurationValidation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The step cannot be configured: the step has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/lookups": {
      "post": {
        "operationId": "v2-run-workflow-step-lookup",
        "summary": "The choices for one dropdown of a draft step: a list argument, or the fields its filter or sort can use",
        "description": "The choices for one dropdown of a draft step: a list argument, or the fields its filter or sort can use.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "for": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "description": "arguments.<path> for a list argument (arguments.contact.status), options.filter.field, options.sort.field, or options.customArguments.fields."
                  },
                  "arguments": {
                    "description": "Argument values to use for this lookup only, merged into the step's as an update would be and not saved: a dropdown that depends on another follows an unsaved choice.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "q": {
                    "description": "Text to find a choice by, such as a channel, user, customer or project name. Left out or empty, every choice is listed.",
                    "type": "string",
                    "maxLength": 200
                  },
                  "search": {
                    "description": "The same as q, the name these lookups first took. Send one of the two.",
                    "type": "string",
                    "maxLength": 200
                  },
                  "limit": {
                    "default": 50,
                    "description": "Choices per page when listing, 1 to 200 (default 50).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  },
                  "offset": {
                    "default": 0,
                    "description": "Choices to skip when listing.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "environmentId": {
                    "description": "The environment whose connection a \"By environment\" step reads with, from List Environments. Left out, the company's default environment.",
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "for"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepLookup"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The step or the target has no choices (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND, LOOKUP_TARGET_NOT_FOUND, LOOKUP_SOURCE_NOT_FOUND), the step has no usable connection (CONNECTION_REQUIRED, CONNECTION_MISSING, CONNECTION_NOT_ALLOWED, LOOKUP_NEEDS_INSTALLATION), the environment is not one of the company's (UNKNOWN_ENVIRONMENT), arguments sent do not fit (every issue in details.issues), the lookup could not run (LOOKUP_FAILED), or q and search were sent with two different texts (LOOKUP_SEARCH_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The app answered the lookup with a failure (LOOKUP_PROVIDER_FAILED, or the app's code in error.details.reason); error.details.provider.status is its HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/test": {
      "post": {
        "operationId": "v2-test-workflow-step",
        "summary": "Run one step of a workflow's draft on its own, as the editor's Run does, and save its output as the step's sample",
        "description": "Run one step of a workflow's draft on its own, as the editor's Run does, and save its output as the step's sample.\n\nRequires the API key permissions workflow:run, workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:run",
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "environmentId": {
                    "description": "The environment to run in, from List Environments. Left out, the company's default environment.",
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepTest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The step cannot be tested on its own (STEP_NOT_TESTABLE: a Loop, Wait, Flow control, Respond to webhook, Continue or Break step, a Run workflow step, or a function step whose function queues one), it is missing required arguments (REQUIRED_MISSING, each in details.issues), the environment is not the company's (UNKNOWN_ENVIRONMENT), a connection it runs with, or one a step of the function it calls runs with, is gone or not usable by the key's creator (CONNECTION_MISSING, CONNECTION_NOT_ALLOWED), or the workflow belongs to an integration (TEST_NEEDS_INSTALLATION).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The step uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The step's connection or function changed while the test was starting; nothing ran (STEP_CHANGED). Test it again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "The If-Match revision is not the draft's current one; nothing ran (REVISION_MISMATCH, with the current revision in details.revision).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/output": {
      "get": {
        "operationId": "v2-get-workflow-step-output",
        "summary": "A draft step's saved sample output: what its last test or run answered, or a sample set by hand",
        "description": "A draft step's saved sample output: what its last test or run answered, or a sample set by hand.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepOutput"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow-step-output",
        "summary": "Set a draft step's sample output by hand, as the editor's Edit Step Output does, without running the step",
        "description": "Set a draft step's sample output by hand, as the editor's Edit Step Output does, without running the step.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "output": {
                    "type": "array",
                    "items": {},
                    "description": "The sample: an array of records, as the step would answer them."
                  }
                },
                "required": [
                  "output"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepOutput"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is not { output: [...] } (VALIDATION_FAILED), or the step is a Loop, whose output is an item of its source's (LOOP_OUTPUT_FOLLOWS_SOURCE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/steps/{stepId}/duplicate": {
      "post": {
        "operationId": "v2-duplicate-workflow-step",
        "summary": "Copy a draft step, with every step it holds, right after the original or at a position",
        "description": "Copy a draft step, with every step it holds, right after the original or at a position. Answers the copy.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The step's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "position": {
                    "description": "Where the copy goes. Left out: right after the original.",
                    "type": "object",
                    "properties": {
                      "parentStepId": {
                        "description": "The loop, folder, batch step or If/Else the step goes inside. null or left out: the top level.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "slot": {
                        "description": "steps at the top level; body inside a loop, folder or batch step; then or else inside an If/Else. Defaults to steps at the top level.",
                        "type": "string",
                        "enum": [
                          "steps",
                          "body",
                          "then",
                          "else"
                        ],
                        "x-enumDescriptions": {
                          "steps": "The top level of the workflow.",
                          "body": "Inside a loop, a folder, or a step that pages in batches: the steps that run for each item or page.",
                          "then": "The If/Else lane that runs when its conditions are true.",
                          "else": "The If/Else lane that runs otherwise."
                        }
                      },
                      "afterStepId": {
                        "description": "The step in that slot to follow. null puts the step first; left out puts it last.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStep"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The position is not in this workflow, the step cannot be copied (INVALID_POSITION, STEP_NOT_DUPLICABLE, WORKFLOW_GRAPH_INVALID), or a copy would keep a connection the key's creator may not use (CONNECTION_NOT_ALLOWED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no step with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/step-order": {
      "put": {
        "operationId": "v2-set-workflow-step-order",
        "summary": "Rearrange every step of a workflow's draft in one atomic call: send the whole step tree, ids only",
        "description": "Rearrange every step of a workflow's draft in one atomic call: send the whole step tree, ids only.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The step's id, from Get Workflow Definition."
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": {}
                    },
                    "description": "The whole step tree, top level first: each step is { id, body?, then?, else? }, nesting the steps it holds. It must hold every step of the draft exactly once."
                  }
                },
                "required": [
                  "steps"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowStepOrder"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The tree is malformed, leaves out or repeats a step, names a step the draft does not have, or nests steps in a slot their parent lacks (INVALID_QUERY, UNKNOWN_BODY_KEY, STEP_ORDER_INCOMPLETE, UNKNOWN_STEP, INVALID_POSITION, WORKFLOW_GRAPH_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}": {
      "put": {
        "operationId": "v2-update-workflow-trigger",
        "summary": "Rename a draft trigger, or turn it off or on",
        "description": "Rename a draft trigger, or turn it off or on. Only the fields sent change.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "A new display name. null goes back to the default name.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDisabled": {
                    "description": "true turns the trigger off: it no longer starts runs.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTrigger"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-workflow-trigger",
        "summary": "Remove a trigger from a workflow's draft, with its schedule or polling",
        "description": "Remove a trigger from a workflow's draft, with its schedule or polling.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger registered a webhook with its app, which only the editor can remove today (TRIGGER_NEEDS_EDITOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}/schema": {
      "get": {
        "operationId": "v2-get-workflow-trigger-schema",
        "summary": "What a draft trigger's configuration accepts, at the app version the trigger uses",
        "description": "What a draft trigger's configuration accepts, at the app version the trigger uses.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerSchema"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The trigger uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}/configuration": {
      "get": {
        "operationId": "v2-get-workflow-trigger-configuration",
        "summary": "A draft trigger's configuration: its action's arguments, its options and its connection, or a built-in trigger's own settings",
        "description": "A draft trigger's configuration: its action's arguments, its options and its connection, or a built-in trigger's own settings.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerConfiguration"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger cannot be configured: the trigger has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow-trigger-configuration",
        "summary": "Set a draft trigger's arguments, options or connection, or a built-in trigger's own settings",
        "description": "Set a draft trigger's arguments, options or connection, or a built-in trigger's own settings. Only what is sent changes.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arguments": {
                    "description": "Arguments to set, nested as the schema nests them. Objects merge key by key; an array replaces; null removes. null for the whole object clears every argument.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "description": "Options to set: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. Sending one turns it on; null turns it off, as deleting it in the editor does. Objects merge key by key.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connection": {
                    "description": "{ \"mode\": \"connection\", \"connectionId\": \"...\", \"rules\": [...] }, { \"mode\": \"environment\" }, { \"mode\": \"installation\" } (integration workflows), or null for none. Replaced whole.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerConfiguration"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing was sent (NO_FIELDS_TO_UPDATE); a value does not fit the schema (UNKNOWN_ARGUMENT, INVALID_TYPE, INVALID_CHOICE, INVALID_VALUE, INVALID_EXPRESSION, INVALID_REFERENCE, UNKNOWN_OPTION, OPTION_UNSUPPORTED, INVALID_OPERATOR, FILTER_NESTING_UNSUPPORTED, UNKNOWN_CONNECTION, CONNECTION_NOT_ALLOWED, CUSTOM_URL_TAKEN; every one in details.issues); or the trigger has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND), or it registers a webhook only the editor sets up (TRIGGER_NEEDS_EDITOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The trigger uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}/configuration/validate": {
      "post": {
        "operationId": "v2-validate-workflow-trigger-configuration",
        "summary": "Check a trigger configuration change without saving it",
        "description": "Check a trigger configuration change without saving it.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arguments": {
                    "description": "Arguments to set, nested as the schema nests them. Objects merge key by key; an array replaces; null removes. null for the whole object clears every argument.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "options": {
                    "description": "Options to set: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. Sending one turns it on; null turns it off, as deleting it in the editor does. Objects merge key by key.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "connection": {
                    "description": "{ \"mode\": \"connection\", \"connectionId\": \"...\", \"rules\": [...] }, { \"mode\": \"environment\" }, { \"mode\": \"installation\" } (integration workflows), or null for none. Replaced whole.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerConfigurationValidation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger cannot be configured: the trigger has no app action to configure, or no action yet (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND), or it registers a webhook only the editor sets up (TRIGGER_NEEDS_EDITOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The trigger uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}/lookups": {
      "post": {
        "operationId": "v2-run-workflow-trigger-lookup",
        "summary": "The choices for one dropdown of a draft trigger: a list argument, or the fields its filter or sort can use",
        "description": "The choices for one dropdown of a draft trigger: a list argument, or the fields its filter or sort can use.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "for": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "description": "arguments.<path> for a list argument (arguments.contact.status), options.filter.field, options.sort.field, or options.customArguments.fields."
                  },
                  "arguments": {
                    "description": "Argument values to use for this lookup only, merged into the trigger's as an update would be and not saved: a dropdown that depends on another follows an unsaved choice.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "q": {
                    "description": "Text to find a choice by, such as a channel, user, customer or project name. Left out or empty, every choice is listed.",
                    "type": "string",
                    "maxLength": 200
                  },
                  "search": {
                    "description": "The same as q, the name these lookups first took. Send one of the two.",
                    "type": "string",
                    "maxLength": 200
                  },
                  "limit": {
                    "default": 50,
                    "description": "Choices per page when listing, 1 to 200 (default 50).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  },
                  "offset": {
                    "default": 0,
                    "description": "Choices to skip when listing.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "environmentId": {
                    "description": "The environment whose connection a \"By environment\" trigger reads with, from List Environments. Left out, the company's default environment.",
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "for"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerLookup"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger or the target has no choices (STEP_NOT_CONFIGURABLE, ACTION_REQUIRED, APP_VERSION_NOT_FOUND, LOOKUP_TARGET_NOT_FOUND, LOOKUP_SOURCE_NOT_FOUND), the trigger has no usable connection (CONNECTION_REQUIRED, CONNECTION_MISSING, CONNECTION_NOT_ALLOWED, LOOKUP_NEEDS_INSTALLATION), the environment is not one of the company's (UNKNOWN_ENVIRONMENT), arguments sent do not fit (every issue in details.issues), the lookup could not run (LOOKUP_FAILED), or q and search were sent with two different texts (LOOKUP_SEARCH_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The trigger uses an app's draft version, which needs the app:view permission held by the key's creator (APP_PERMISSION_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The app answered the lookup with a failure (LOOKUP_PROVIDER_FAILED, or the app's code in error.details.reason); error.details.provider.status is its HTTP status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/triggers/{triggerId}/listen": {
      "post": {
        "operationId": "v2-listen-workflow-trigger",
        "summary": "Wait up to 30 seconds for a call to a Webhook trigger and save it as the trigger's sample output",
        "description": "Wait up to 30 seconds for a call to a Webhook trigger and save it as the trigger's sample output.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "triggerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The trigger's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTriggerListen"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The trigger is not a Webhook trigger (TRIGGER_NOT_WEBHOOK).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or its draft has no trigger with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/inputs": {
      "get": {
        "operationId": "v2-get-workflow-inputs",
        "summary": "What a run of the workflow takes: a function's inputs and workflow variables, or a workflow's variables, with their value in each environment",
        "description": "What a run of the workflow takes: a function's inputs and workflow variables, or a workflow's variables, with their value in each environment.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowInputs"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-workflow-inputs",
        "summary": "Replace what a run of the workflow takes: a function's inputs (If-Match required) and its workflow variables, or a workflow's variables, with their values per environment",
        "description": "Replace what a run of the workflow takes: a function's inputs (If-Match required) and its workflow variables, or a workflow's variables, with their values per environment.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inputs": {
                    "description": "Every input, in order: replaces the list. An input keeps its stored id and settings when its key is kept, and is kept exactly as stored when sent back as read.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {}
                  },
                  "variables": {
                    "description": "Functions only: every workflow variable, in order, in the shape a workflow's inputs take: replaces the list, live at once.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowInputs"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing was sent (NO_FIELDS_TO_UPDATE); variables sent for a workflow, whose variables are its inputs (FIELD_NOT_FOR_TYPE); an input or variable does not fit (INVALID_TYPE, INVALID_VALUE, INVALID_CHOICE, INVALID_KEY, DUPLICATE_KEY, REQUIRED_MISSING, UNKNOWN_FIELD, FIELD_NOT_FOR_TYPE, INVALID_EXPRESSION, INVALID_REFERENCE, UNKNOWN_ENVIRONMENT, VALUES_NOT_ALLOWED; every one in details.issues).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The function's draft has more than one Function Inputs step (SEVERAL_INPUT_STEPS, the step ids in details.stepIds).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "A function's draft changed since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the inputs again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "A function's inputs were sent without the If-Match header (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/validate": {
      "post": {
        "operationId": "v2-validate-workflow",
        "summary": "Check a workflow's draft without changing it: what would stop it from publishing, and what is not set up yet",
        "description": "Check a workflow's draft without changing it: what would stop it from publishing, and what is not set up yet.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowValidation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/publish": {
      "post": {
        "operationId": "v2-publish-workflow",
        "summary": "Publish a workflow's draft as its next version, which becomes the one that runs",
        "description": "Publish a workflow's draft as its next version, which becomes the one that runs. The version number is computed for you.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "description": "What changed in this version.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "bump": {
                    "default": "patch",
                    "description": "Which part of the version number goes up. patch (the default): 0.0.14 to 0.0.15.",
                    "type": "string",
                    "enum": [
                      "patch",
                      "minor",
                      "major"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublishedWorkflowVersion"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The draft has errors that stop it from being published (WORKFLOW_INVALID). error.details.issues lists them, as Validate Workflow does.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/versions/{version}/restore": {
      "post": {
        "operationId": "v2-restore-workflow-version",
        "summary": "Replace a workflow's draft with a saved version",
        "description": "Replace a workflow's draft with a saved version. The version that runs does not change until you publish.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The workflow's id."
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(published|\\d+\\.\\d+\\.\\d+)$",
              "description": "published, or a version number from List Workflow Versions."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RestoredWorkflowDraft"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The version is not published or a version number (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No workflow with this id belongs to the company, or it has no such version (NOT_FOUND, WORKFLOW_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The saved version has an invalid graph and cannot be restored (WORKFLOW_VERSION_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the workflow draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflow-tags": {
      "get": {
        "operationId": "v2-list-workflow-tags",
        "summary": "List the company's workflow tags, the ones a workflow's tags field takes",
        "description": "List the company's workflow tags, the ones a workflow's tags field takes.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission workflow:view.",
        "tags": [
          "workflow-tags"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, color, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, color, createdOn, updatedOn. Default: name."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, color, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "color",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on color: `color=value` matches it exactly. Bracket operators: `color[ne]`, `color[gt]`, `color[gte]`, `color[lt]`, `color[lte]`, `color[contains]`, `color[starts]`, `color[ends]`, and `color[in]` / `color[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowTag"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-workflow-tag",
        "summary": "Add a tag to the company's workflow tag catalog",
        "description": "Add a tag to the company's workflow tag catalog.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflow-tags"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24,
                    "description": "The tag's name, at most 24 characters. Unique in the company, ignoring case."
                  },
                  "color": {
                    "description": "green, purple, pink, orange, yellow, blue, red or gray. Defaults to gray.",
                    "type": "string",
                    "enum": [
                      "green",
                      "purple",
                      "pink",
                      "orange",
                      "yellow",
                      "blue",
                      "red",
                      "gray"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTag"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The company already has a tag with this name (TAG_EXISTS). error.details.tagId is its id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflow-tags/{tagId}": {
      "put": {
        "operationId": "v2-update-workflow-tag",
        "summary": "Rename a workflow tag or change its color",
        "description": "Rename a workflow tag or change its color. Only the fields sent change.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflow-tags"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The tag's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "A new name, at most 24 characters.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "color": {
                    "description": "A new palette color: green, purple, pink, orange, yellow, blue, red or gray.",
                    "type": "string",
                    "enum": [
                      "green",
                      "purple",
                      "pink",
                      "orange",
                      "yellow",
                      "blue",
                      "red",
                      "gray"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/WorkflowTag"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The company has no tag with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The company already has another tag with this name (TAG_EXISTS).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-workflow-tag",
        "summary": "Delete a workflow tag and take it off every workflow that has it",
        "description": "Delete a workflow tag and take it off every workflow that has it.\n\nRequires the API key permission workflow:edit.",
        "tags": [
          "workflow-tags"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The tag's id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The company has no tag with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/runs": {
      "get": {
        "operationId": "v2-list-runs",
        "summary": "List runs of one workflow with filtering, sorting, and pagination",
        "description": "List runs of one workflow with filtering, sorting, and pagination. Filter by status, version, environmentId, startedOn range, endUserId, or installationId.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowId, status, version, environmentId, environmentName, startedOn, finishedOn, durationMs, operations, errorCount, warningCount, infoCount, endUserId, installationId, triggerAppSlug."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, workflowId, status, version, environmentId, environmentName, startedOn, finishedOn, durationMs, operations, errorCount, warningCount, infoCount, endUserId, installationId, triggerAppSlug. Default: -startedOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, workflowId, status, version, environmentId, environmentName, startedOn, finishedOn, durationMs, operations, errorCount, warningCount, infoCount, endUserId, installationId, triggerAppSlug. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on version: `version=value` matches it exactly. Bracket operators: `version[ne]`, `version[gt]`, `version[gte]`, `version[lt]`, `version[lte]`, `version[contains]`, `version[starts]`, `version[ends]`, and `version[in]` / `version[nin]` with comma-separated values."
          },
          {
            "name": "environmentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentId: `environmentId=value` matches it exactly. Bracket operators: `environmentId[ne]`, `environmentId[gt]`, `environmentId[gte]`, `environmentId[lt]`, `environmentId[lte]`, `environmentId[contains]`, `environmentId[starts]`, `environmentId[ends]`, and `environmentId[in]` / `environmentId[nin]` with comma-separated values."
          },
          {
            "name": "environmentName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentName: `environmentName=value` matches it exactly. Bracket operators: `environmentName[ne]`, `environmentName[gt]`, `environmentName[gte]`, `environmentName[lt]`, `environmentName[lte]`, `environmentName[contains]`, `environmentName[starts]`, `environmentName[ends]`, and `environmentName[in]` / `environmentName[nin]` with comma-separated values."
          },
          {
            "name": "startedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on startedOn: `startedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `startedOn[ne]`, `startedOn[gt]`, `startedOn[gte]`, `startedOn[lt]`, `startedOn[lte]`, and `startedOn[in]` / `startedOn[nin]` with comma-separated values."
          },
          {
            "name": "finishedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on finishedOn: `finishedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `finishedOn[ne]`, `finishedOn[gt]`, `finishedOn[gte]`, `finishedOn[lt]`, `finishedOn[lte]`, and `finishedOn[in]` / `finishedOn[nin]` with comma-separated values."
          },
          {
            "name": "durationMs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "description": "Filter on durationMs: `durationMs=value` matches it exactly. Bracket operators: `durationMs[ne]`, `durationMs[gt]`, `durationMs[gte]`, `durationMs[lt]`, `durationMs[lte]`, and `durationMs[in]` / `durationMs[nin]` with comma-separated values."
          },
          {
            "name": "operations",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on operations: `operations=value` matches it exactly. Bracket operators: `operations[ne]`, `operations[gt]`, `operations[gte]`, `operations[lt]`, `operations[lte]`, and `operations[in]` / `operations[nin]` with comma-separated values."
          },
          {
            "name": "errorCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on errorCount: `errorCount=value` matches it exactly. Bracket operators: `errorCount[ne]`, `errorCount[gt]`, `errorCount[gte]`, `errorCount[lt]`, `errorCount[lte]`, and `errorCount[in]` / `errorCount[nin]` with comma-separated values."
          },
          {
            "name": "warningCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on warningCount: `warningCount=value` matches it exactly. Bracket operators: `warningCount[ne]`, `warningCount[gt]`, `warningCount[gte]`, `warningCount[lt]`, `warningCount[lte]`, and `warningCount[in]` / `warningCount[nin]` with comma-separated values."
          },
          {
            "name": "infoCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on infoCount: `infoCount=value` matches it exactly. Bracket operators: `infoCount[ne]`, `infoCount[gt]`, `infoCount[gte]`, `infoCount[lt]`, `infoCount[lte]`, and `infoCount[in]` / `infoCount[nin]` with comma-separated values."
          },
          {
            "name": "endUserId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on endUserId: `endUserId=value` matches it exactly. Bracket operators: `endUserId[ne]`, `endUserId[gt]`, `endUserId[gte]`, `endUserId[lt]`, `endUserId[lte]`, `endUserId[contains]`, `endUserId[starts]`, `endUserId[ends]`, and `endUserId[in]` / `endUserId[nin]` with comma-separated values."
          },
          {
            "name": "installationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on installationId: `installationId=value` matches it exactly. Bracket operators: `installationId[ne]`, `installationId[gt]`, `installationId[gte]`, `installationId[lt]`, `installationId[lte]`, `installationId[contains]`, `installationId[starts]`, `installationId[ends]`, and `installationId[in]` / `installationId[nin]` with comma-separated values."
          },
          {
            "name": "triggerAppSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on triggerAppSlug: `triggerAppSlug=value` matches it exactly. Bracket operators: `triggerAppSlug[ne]`, `triggerAppSlug[gt]`, `triggerAppSlug[gte]`, `triggerAppSlug[lt]`, `triggerAppSlug[lte]`, `triggerAppSlug[contains]`, `triggerAppSlug[starts]`, `triggerAppSlug[ends]`, and `triggerAppSlug[in]` / `triggerAppSlug[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Run"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{runId}": {
      "get": {
        "operationId": "v2-get-run",
        "summary": "Get one workflow run, including its summary and, while running, the active step and message",
        "description": "Get one workflow run, including its summary and, while running, the active step and message.\n\nRequires the API key permission log:view.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RunDetail"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end user's or installation's run cannot be used under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{runId}/cancel": {
      "post": {
        "operationId": "v2-cancel-run",
        "summary": "Request cancellation of a run",
        "description": "Request cancellation of a run. A run that has not started yet is cancelled at once and answers status \"cancelled\". Otherwise cancellation is asynchronous: the runner stops at the next checkpoint and the run then reports status \"cancelled\". Runs that already finished are unaffected.\n\nRequires the API key permission workflow:run.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "workflow:run"
            ]
          }
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "202": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RunCancellation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end user's or installation's run cannot be used under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{runId}/operations": {
      "get": {
        "operationId": "v2-list-run-operations",
        "summary": "List record-level operations (creates, updates, errors, warnings) for one run",
        "description": "List record-level operations (creates, updates, errors, warnings) for one run. Filter by actionStatus or operation.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "workflowLogId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowLogId: `workflowLogId=value` matches it exactly. Bracket operators: `workflowLogId[ne]`, `workflowLogId[gt]`, `workflowLogId[gte]`, `workflowLogId[lt]`, `workflowLogId[lte]`, `workflowLogId[contains]`, `workflowLogId[starts]`, `workflowLogId[ends]`, and `workflowLogId[in]` / `workflowLogId[nin]` with comma-separated values."
          },
          {
            "name": "stepId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepId: `stepId=value` matches it exactly. Bracket operators: `stepId[ne]`, `stepId[gt]`, `stepId[gte]`, `stepId[lt]`, `stepId[lte]`, `stepId[contains]`, `stepId[starts]`, `stepId[ends]`, and `stepId[in]` / `stepId[nin]` with comma-separated values."
          },
          {
            "name": "stepInstanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepInstanceId: `stepInstanceId=value` matches it exactly. Bracket operators: `stepInstanceId[ne]`, `stepInstanceId[gt]`, `stepInstanceId[gte]`, `stepInstanceId[lt]`, `stepInstanceId[lte]`, `stepInstanceId[contains]`, `stepInstanceId[starts]`, `stepInstanceId[ends]`, and `stepInstanceId[in]` / `stepInstanceId[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on model: `model=value` matches it exactly. Bracket operators: `model[ne]`, `model[gt]`, `model[gte]`, `model[lt]`, `model[lte]`, `model[contains]`, `model[starts]`, `model[ends]`, and `model[in]` / `model[nin]` with comma-separated values."
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on operation: `operation=value` matches it exactly. Bracket operators: `operation[ne]`, `operation[gt]`, `operation[gte]`, `operation[lt]`, `operation[lte]`, `operation[contains]`, `operation[starts]`, `operation[ends]`, and `operation[in]` / `operation[nin]` with comma-separated values."
          },
          {
            "name": "actionStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionStatus: `actionStatus=value` matches it exactly. Bracket operators: `actionStatus[ne]`, `actionStatus[gt]`, `actionStatus[gte]`, `actionStatus[lt]`, `actionStatus[lte]`, `actionStatus[contains]`, `actionStatus[starts]`, `actionStatus[ends]`, and `actionStatus[in]` / `actionStatus[nin]` with comma-separated values."
          },
          {
            "name": "primaryKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on primaryKey: `primaryKey=value` matches it exactly. Bracket operators: `primaryKey[ne]`, `primaryKey[gt]`, `primaryKey[gte]`, `primaryKey[lt]`, `primaryKey[lte]`, `primaryKey[contains]`, `primaryKey[starts]`, `primaryKey[ends]`, and `primaryKey[in]` / `primaryKey[nin]` with comma-separated values."
          },
          {
            "name": "message",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on message: `message=value` matches it exactly. Bracket operators: `message[ne]`, `message[gt]`, `message[gte]`, `message[lt]`, `message[lte]`, `message[contains]`, `message[starts]`, `message[ends]`, and `message[in]` / `message[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RunOperation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflows/{workflowId}/operations": {
      "get": {
        "operationId": "v2-list-workflow-operations",
        "summary": "List retained record-level operations across all runs of one workflow, with run metadata, filtering, sorting, and pagination",
        "description": "List retained record-level operations across all runs of one workflow, with run metadata, filtering, sorting, and pagination.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "workflows"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "workflowLogId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowLogId: `workflowLogId=value` matches it exactly. Bracket operators: `workflowLogId[ne]`, `workflowLogId[gt]`, `workflowLogId[gte]`, `workflowLogId[lt]`, `workflowLogId[lte]`, `workflowLogId[contains]`, `workflowLogId[starts]`, `workflowLogId[ends]`, and `workflowLogId[in]` / `workflowLogId[nin]` with comma-separated values."
          },
          {
            "name": "stepId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepId: `stepId=value` matches it exactly. Bracket operators: `stepId[ne]`, `stepId[gt]`, `stepId[gte]`, `stepId[lt]`, `stepId[lte]`, `stepId[contains]`, `stepId[starts]`, `stepId[ends]`, and `stepId[in]` / `stepId[nin]` with comma-separated values."
          },
          {
            "name": "stepInstanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepInstanceId: `stepInstanceId=value` matches it exactly. Bracket operators: `stepInstanceId[ne]`, `stepInstanceId[gt]`, `stepInstanceId[gte]`, `stepInstanceId[lt]`, `stepInstanceId[lte]`, `stepInstanceId[contains]`, `stepInstanceId[starts]`, `stepInstanceId[ends]`, and `stepInstanceId[in]` / `stepInstanceId[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on model: `model=value` matches it exactly. Bracket operators: `model[ne]`, `model[gt]`, `model[gte]`, `model[lt]`, `model[lte]`, `model[contains]`, `model[starts]`, `model[ends]`, and `model[in]` / `model[nin]` with comma-separated values."
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on operation: `operation=value` matches it exactly. Bracket operators: `operation[ne]`, `operation[gt]`, `operation[gte]`, `operation[lt]`, `operation[lte]`, `operation[contains]`, `operation[starts]`, `operation[ends]`, and `operation[in]` / `operation[nin]` with comma-separated values."
          },
          {
            "name": "actionStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionStatus: `actionStatus=value` matches it exactly. Bracket operators: `actionStatus[ne]`, `actionStatus[gt]`, `actionStatus[gte]`, `actionStatus[lt]`, `actionStatus[lte]`, `actionStatus[contains]`, `actionStatus[starts]`, `actionStatus[ends]`, and `actionStatus[in]` / `actionStatus[nin]` with comma-separated values."
          },
          {
            "name": "primaryKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on primaryKey: `primaryKey=value` matches it exactly. Bracket operators: `primaryKey[ne]`, `primaryKey[gt]`, `primaryKey[gte]`, `primaryKey[lt]`, `primaryKey[lte]`, `primaryKey[contains]`, `primaryKey[starts]`, `primaryKey[ends]`, and `primaryKey[in]` / `primaryKey[nin]` with comma-separated values."
          },
          {
            "name": "message",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on message: `message=value` matches it exactly. Bracket operators: `message[ne]`, `message[gt]`, `message[gte]`, `message[lt]`, `message[lte]`, `message[contains]`, `message[starts]`, `message[ends]`, and `message[in]` / `message[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "runId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on runId: `runId=value` matches it exactly. Bracket operators: `runId[ne]`, `runId[gt]`, `runId[gte]`, `runId[lt]`, `runId[lte]`, `runId[contains]`, `runId[starts]`, `runId[ends]`, and `runId[in]` / `runId[nin]` with comma-separated values."
          },
          {
            "name": "runStartedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on runStartedOn: `runStartedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `runStartedOn[ne]`, `runStartedOn[gt]`, `runStartedOn[gte]`, `runStartedOn[lt]`, `runStartedOn[lte]`, and `runStartedOn[in]` / `runStartedOn[nin]` with comma-separated values."
          },
          {
            "name": "runStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "waiting",
                "running",
                "finished",
                "failed",
                "cancelled",
                "interrupted",
                "limitExceeded",
                "cancelling",
                "unknown"
              ]
            },
            "description": "Filter on runStatus: `runStatus=value` matches it exactly. Bracket operators: `runStatus[ne]`, `runStatus[gt]`, `runStatus[gte]`, `runStatus[lt]`, `runStatus[lte]`, `runStatus[contains]`, `runStatus[starts]`, `runStatus[ends]`, and `runStatus[in]` / `runStatus[nin]` with comma-separated values."
          },
          {
            "name": "environmentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentId: `environmentId=value` matches it exactly. Bracket operators: `environmentId[ne]`, `environmentId[gt]`, `environmentId[gte]`, `environmentId[lt]`, `environmentId[lte]`, `environmentId[contains]`, `environmentId[starts]`, `environmentId[ends]`, and `environmentId[in]` / `environmentId[nin]` with comma-separated values."
          },
          {
            "name": "environmentName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentName: `environmentName=value` matches it exactly. Bracket operators: `environmentName[ne]`, `environmentName[gt]`, `environmentName[gte]`, `environmentName[lt]`, `environmentName[lte]`, `environmentName[contains]`, `environmentName[starts]`, `environmentName[ends]`, and `environmentName[in]` / `environmentName[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowOperation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/operations": {
      "get": {
        "operationId": "v2-list-operations",
        "summary": "List retained record-level operations across workflows in the request organization, with run metadata, filtering, sorting, and pagination",
        "description": "List retained record-level operations across workflows in the request organization, with run metadata, filtering, sorting, and pagination.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "operations"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, workflowLogId, stepId, stepInstanceId, actionId, appId, model, operation, actionStatus, primaryKey, message, createdOn, workflowId, runId, runStartedOn, runStatus, environmentId, environmentName. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "workflowLogId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowLogId: `workflowLogId=value` matches it exactly. Bracket operators: `workflowLogId[ne]`, `workflowLogId[gt]`, `workflowLogId[gte]`, `workflowLogId[lt]`, `workflowLogId[lte]`, `workflowLogId[contains]`, `workflowLogId[starts]`, `workflowLogId[ends]`, and `workflowLogId[in]` / `workflowLogId[nin]` with comma-separated values."
          },
          {
            "name": "stepId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepId: `stepId=value` matches it exactly. Bracket operators: `stepId[ne]`, `stepId[gt]`, `stepId[gte]`, `stepId[lt]`, `stepId[lte]`, `stepId[contains]`, `stepId[starts]`, `stepId[ends]`, and `stepId[in]` / `stepId[nin]` with comma-separated values."
          },
          {
            "name": "stepInstanceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on stepInstanceId: `stepInstanceId=value` matches it exactly. Bracket operators: `stepInstanceId[ne]`, `stepInstanceId[gt]`, `stepInstanceId[gte]`, `stepInstanceId[lt]`, `stepInstanceId[lte]`, `stepInstanceId[contains]`, `stepInstanceId[starts]`, `stepInstanceId[ends]`, and `stepInstanceId[in]` / `stepInstanceId[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on model: `model=value` matches it exactly. Bracket operators: `model[ne]`, `model[gt]`, `model[gte]`, `model[lt]`, `model[lte]`, `model[contains]`, `model[starts]`, `model[ends]`, and `model[in]` / `model[nin]` with comma-separated values."
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on operation: `operation=value` matches it exactly. Bracket operators: `operation[ne]`, `operation[gt]`, `operation[gte]`, `operation[lt]`, `operation[lte]`, `operation[contains]`, `operation[starts]`, `operation[ends]`, and `operation[in]` / `operation[nin]` with comma-separated values."
          },
          {
            "name": "actionStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionStatus: `actionStatus=value` matches it exactly. Bracket operators: `actionStatus[ne]`, `actionStatus[gt]`, `actionStatus[gte]`, `actionStatus[lt]`, `actionStatus[lte]`, `actionStatus[contains]`, `actionStatus[starts]`, `actionStatus[ends]`, and `actionStatus[in]` / `actionStatus[nin]` with comma-separated values."
          },
          {
            "name": "primaryKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on primaryKey: `primaryKey=value` matches it exactly. Bracket operators: `primaryKey[ne]`, `primaryKey[gt]`, `primaryKey[gte]`, `primaryKey[lt]`, `primaryKey[lte]`, `primaryKey[contains]`, `primaryKey[starts]`, `primaryKey[ends]`, and `primaryKey[in]` / `primaryKey[nin]` with comma-separated values."
          },
          {
            "name": "message",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on message: `message=value` matches it exactly. Bracket operators: `message[ne]`, `message[gt]`, `message[gte]`, `message[lt]`, `message[lte]`, `message[contains]`, `message[starts]`, `message[ends]`, and `message[in]` / `message[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowId: `workflowId=value` matches it exactly. Bracket operators: `workflowId[ne]`, `workflowId[gt]`, `workflowId[gte]`, `workflowId[lt]`, `workflowId[lte]`, `workflowId[contains]`, `workflowId[starts]`, `workflowId[ends]`, and `workflowId[in]` / `workflowId[nin]` with comma-separated values."
          },
          {
            "name": "runId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on runId: `runId=value` matches it exactly. Bracket operators: `runId[ne]`, `runId[gt]`, `runId[gte]`, `runId[lt]`, `runId[lte]`, `runId[contains]`, `runId[starts]`, `runId[ends]`, and `runId[in]` / `runId[nin]` with comma-separated values."
          },
          {
            "name": "runStartedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on runStartedOn: `runStartedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `runStartedOn[ne]`, `runStartedOn[gt]`, `runStartedOn[gte]`, `runStartedOn[lt]`, `runStartedOn[lte]`, and `runStartedOn[in]` / `runStartedOn[nin]` with comma-separated values."
          },
          {
            "name": "runStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "waiting",
                "running",
                "finished",
                "failed",
                "cancelled",
                "interrupted",
                "limitExceeded",
                "cancelling",
                "unknown"
              ]
            },
            "description": "Filter on runStatus: `runStatus=value` matches it exactly. Bracket operators: `runStatus[ne]`, `runStatus[gt]`, `runStatus[gte]`, `runStatus[lt]`, `runStatus[lte]`, `runStatus[contains]`, `runStatus[starts]`, `runStatus[ends]`, and `runStatus[in]` / `runStatus[nin]` with comma-separated values."
          },
          {
            "name": "environmentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentId: `environmentId=value` matches it exactly. Bracket operators: `environmentId[ne]`, `environmentId[gt]`, `environmentId[gte]`, `environmentId[lt]`, `environmentId[lte]`, `environmentId[contains]`, `environmentId[starts]`, `environmentId[ends]`, and `environmentId[in]` / `environmentId[nin]` with comma-separated values."
          },
          {
            "name": "environmentName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentName: `environmentName=value` matches it exactly. Bracket operators: `environmentName[ne]`, `environmentName[gt]`, `environmentName[gte]`, `environmentName[lt]`, `environmentName[lte]`, `environmentName[contains]`, `environmentName[starts]`, `environmentName[ends]`, and `environmentName[in]` / `environmentName[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowOperation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/failed-runs": {
      "get": {
        "operationId": "v2-list-failed-runs",
        "summary": "List failed runs across every workflow in the organization, newest first, with the step each one stopped at and why",
        "description": "List failed runs across every workflow in the organization, newest first, with the step each one stopped at and why. Narrow it with workflowId and a from/before start-time range.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "failed-runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowId, workflowName, version, environmentId, environmentName, startedOn, finishedOn, durationMs, operations, activeStepId, summary, endUserId, installationId."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: none. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: none. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "Only runs of this workflow, from List Workflows."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "Only runs that started at or after this time: YYYY-MM-DD (midnight UTC) or an ISO 8601 date-time with a zone."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "Only runs that started before this time: YYYY-MM-DD (midnight UTC) or an ISO 8601 date-time with a zone."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FailedRun"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs": {
      "get": {
        "operationId": "v2-list-all-runs",
        "summary": "List the newest runs of the last 7 days across every workflow in the organization, running ones included, newest first: up to 200 per call, or every workflow's newest N with perWorkflow, or the runs changed since a recent read with updatedFrom",
        "description": "List the newest runs of the last 7 days across every workflow in the organization, running ones included, newest first: up to 200 per call, or every workflow's newest N with perWorkflow, or the runs changed since a recent read with updatedFrom. Narrow it with workflowId, status and from.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, workflowId, workflowName, status, version, environmentId, environmentName, startedOn, finishedOn, updatedOn, durationMs, operations, errorCount, warningCount, infoCount, activeStepId, summary, endUserId, installationId, triggerAppSlug."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: none. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: none. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "Only runs of this workflow, from List Workflows."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "waiting",
                "running",
                "finished",
                "failed",
                "cancelled",
                "interrupted",
                "limitExceeded",
                "cancelling"
              ],
              "x-enumDescriptions": {
                "waiting": "Queued, not started yet.",
                "running": "Running now.",
                "finished": "Finished without a failure.",
                "failed": "Stopped by a failed step.",
                "cancelled": "Cancelled.",
                "interrupted": "Stopped before it finished, for example by a restart.",
                "limitExceeded": "Not run because the task limit was reached.",
                "cancelling": "Being cancelled."
              }
            },
            "description": "Only runs with this status."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "Only runs that started at or after this time, within the last 7 days (from midnight UTC 7 days ago): YYYY-MM-DD (midnight UTC) or an ISO 8601 date-time with a zone. Defaults to midnight UTC 7 days ago."
          },
          {
            "name": "perWorkflow",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "Only the newest N runs of each workflow, 1 to 100. It pages through every workflow's latest runs with no 200-run cap, so a busy workflow never crowds out a quiet one. Rows come grouped by workflow (workflowId, then newest first), so paging never skips a run while new runs start, with no status or a status a run ends in, and while no workflow is deleted. The default from moves at midnight UTC, so a read that may cross it should pass from."
          },
          {
            "name": "updatedFrom",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "Only runs that changed at or after this time: an ISO 8601 date-time with a zone, or YYYY-MM-DD (midnight UTC). A run changes when it starts, each time it makes progress, and when it finishes (updatedOn). With perWorkflow, any time in the last 7 days, and it answers the newest N changed runs of each workflow; without it, within the last 2 hours. It pages with no 200-run cap. For a sync: read the list once with perWorkflow, then send the time your previous read started, a minute earlier, with the same perWorkflow and limit=1000, and merge the rows by id; a run near that time can come back twice."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrganizationRun"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflow-activity": {
      "get": {
        "operationId": "v2-list-workflow-activity",
        "summary": "List what each workflow did per day: runs, failed runs, tasks, and records created, updated, deleted and read",
        "description": "List what each workflow did per day: runs, failed runs, tasks, and records created, updated, deleted and read. Defaults to the trailing 30 days; pass from/to (YYYY-MM-DD) for up to 92 days.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "workflow-activity"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead. Default: -date,workflowId."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on date: `date=value` matches it exactly. Bracket operators: `date[ne]`, `date[gt]`, `date[gte]`, `date[lt]`, `date[lte]`, `date[contains]`, `date[starts]`, `date[ends]`, and `date[in]` / `date[nin]` with comma-separated values."
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowId: `workflowId=value` matches it exactly. Bracket operators: `workflowId[ne]`, `workflowId[gt]`, `workflowId[gte]`, `workflowId[lt]`, `workflowId[lte]`, `workflowId[contains]`, `workflowId[starts]`, `workflowId[ends]`, and `workflowId[in]` / `workflowId[nin]` with comma-separated values."
          },
          {
            "name": "workflowName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowName: `workflowName=value` matches it exactly. Bracket operators: `workflowName[ne]`, `workflowName[gt]`, `workflowName[gte]`, `workflowName[lt]`, `workflowName[lte]`, `workflowName[contains]`, `workflowName[starts]`, `workflowName[ends]`, and `workflowName[in]` / `workflowName[nin]` with comma-separated values."
          },
          {
            "name": "runs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on runs: `runs=value` matches it exactly. Bracket operators: `runs[ne]`, `runs[gt]`, `runs[gte]`, `runs[lt]`, `runs[lte]`, and `runs[in]` / `runs[nin]` with comma-separated values."
          },
          {
            "name": "failedRuns",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on failedRuns: `failedRuns=value` matches it exactly. Bracket operators: `failedRuns[ne]`, `failedRuns[gt]`, `failedRuns[gte]`, `failedRuns[lt]`, `failedRuns[lte]`, and `failedRuns[in]` / `failedRuns[nin]` with comma-separated values."
          },
          {
            "name": "tasks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on tasks: `tasks=value` matches it exactly. Bracket operators: `tasks[ne]`, `tasks[gt]`, `tasks[gte]`, `tasks[lt]`, `tasks[lte]`, and `tasks[in]` / `tasks[nin]` with comma-separated values."
          },
          {
            "name": "recordsCreated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsCreated: `recordsCreated=value` matches it exactly. Bracket operators: `recordsCreated[ne]`, `recordsCreated[gt]`, `recordsCreated[gte]`, `recordsCreated[lt]`, `recordsCreated[lte]`, and `recordsCreated[in]` / `recordsCreated[nin]` with comma-separated values."
          },
          {
            "name": "recordsUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsUpdated: `recordsUpdated=value` matches it exactly. Bracket operators: `recordsUpdated[ne]`, `recordsUpdated[gt]`, `recordsUpdated[gte]`, `recordsUpdated[lt]`, `recordsUpdated[lte]`, and `recordsUpdated[in]` / `recordsUpdated[nin]` with comma-separated values."
          },
          {
            "name": "recordsDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsDeleted: `recordsDeleted=value` matches it exactly. Bracket operators: `recordsDeleted[ne]`, `recordsDeleted[gt]`, `recordsDeleted[gte]`, `recordsDeleted[lt]`, `recordsDeleted[lte]`, and `recordsDeleted[in]` / `recordsDeleted[nin]` with comma-separated values."
          },
          {
            "name": "recordsRead",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsRead: `recordsRead=value` matches it exactly. Bracket operators: `recordsRead[ne]`, `recordsRead[gt]`, `recordsRead[gte]`, `recordsRead[lt]`, `recordsRead[lte]`, and `recordsRead[in]` / `recordsRead[nin]` with comma-separated values."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "First day of the window (YYYY-MM-DD, UTC). Defaults to 29 days before \"to\"."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Last day of the window (YYYY-MM-DD, UTC), included. Defaults to today. A window covers at most 92 days."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowDailyActivity"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/workflow-activity/hourly": {
      "get": {
        "operationId": "v2-list-workflow-activity-hourly",
        "summary": "List what each workflow did per hour, current to the minute: runs, failed runs, tasks, and records created, updated, deleted and read",
        "description": "List what each workflow did per hour, current to the minute: runs, failed runs, tasks, and records created, updated, deleted and read. Defaults to the trailing 24 hours; pass from/to for up to 7 days.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission log:view.",
        "tags": [
          "workflow-activity"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, hour, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, hour, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead. Default: -hour,workflowId."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, hour, date, workflowId, workflowName, runs, failedRuns, tasks, recordsCreated, recordsUpdated, recordsDeleted, recordsRead. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "hour",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on hour: `hour=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `hour[ne]`, `hour[gt]`, `hour[gte]`, `hour[lt]`, `hour[lte]`, and `hour[in]` / `hour[nin]` with comma-separated values."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on date: `date=value` matches it exactly. Bracket operators: `date[ne]`, `date[gt]`, `date[gte]`, `date[lt]`, `date[lte]`, `date[contains]`, `date[starts]`, `date[ends]`, and `date[in]` / `date[nin]` with comma-separated values."
          },
          {
            "name": "workflowId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowId: `workflowId=value` matches it exactly. Bracket operators: `workflowId[ne]`, `workflowId[gt]`, `workflowId[gte]`, `workflowId[lt]`, `workflowId[lte]`, `workflowId[contains]`, `workflowId[starts]`, `workflowId[ends]`, and `workflowId[in]` / `workflowId[nin]` with comma-separated values."
          },
          {
            "name": "workflowName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on workflowName: `workflowName=value` matches it exactly. Bracket operators: `workflowName[ne]`, `workflowName[gt]`, `workflowName[gte]`, `workflowName[lt]`, `workflowName[lte]`, `workflowName[contains]`, `workflowName[starts]`, `workflowName[ends]`, and `workflowName[in]` / `workflowName[nin]` with comma-separated values."
          },
          {
            "name": "runs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on runs: `runs=value` matches it exactly. Bracket operators: `runs[ne]`, `runs[gt]`, `runs[gte]`, `runs[lt]`, `runs[lte]`, and `runs[in]` / `runs[nin]` with comma-separated values."
          },
          {
            "name": "failedRuns",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on failedRuns: `failedRuns=value` matches it exactly. Bracket operators: `failedRuns[ne]`, `failedRuns[gt]`, `failedRuns[gte]`, `failedRuns[lt]`, `failedRuns[lte]`, and `failedRuns[in]` / `failedRuns[nin]` with comma-separated values."
          },
          {
            "name": "tasks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on tasks: `tasks=value` matches it exactly. Bracket operators: `tasks[ne]`, `tasks[gt]`, `tasks[gte]`, `tasks[lt]`, `tasks[lte]`, and `tasks[in]` / `tasks[nin]` with comma-separated values."
          },
          {
            "name": "recordsCreated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsCreated: `recordsCreated=value` matches it exactly. Bracket operators: `recordsCreated[ne]`, `recordsCreated[gt]`, `recordsCreated[gte]`, `recordsCreated[lt]`, `recordsCreated[lte]`, and `recordsCreated[in]` / `recordsCreated[nin]` with comma-separated values."
          },
          {
            "name": "recordsUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsUpdated: `recordsUpdated=value` matches it exactly. Bracket operators: `recordsUpdated[ne]`, `recordsUpdated[gt]`, `recordsUpdated[gte]`, `recordsUpdated[lt]`, `recordsUpdated[lte]`, and `recordsUpdated[in]` / `recordsUpdated[nin]` with comma-separated values."
          },
          {
            "name": "recordsDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsDeleted: `recordsDeleted=value` matches it exactly. Bracket operators: `recordsDeleted[ne]`, `recordsDeleted[gt]`, `recordsDeleted[gte]`, `recordsDeleted[lt]`, `recordsDeleted[lte]`, and `recordsDeleted[in]` / `recordsDeleted[nin]` with comma-separated values."
          },
          {
            "name": "recordsRead",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on recordsRead: `recordsRead=value` matches it exactly. Bracket operators: `recordsRead[ne]`, `recordsRead[gt]`, `recordsRead[gte]`, `recordsRead[lt]`, `recordsRead[lte]`, and `recordsRead[in]` / `recordsRead[nin]` with comma-separated values."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "First hour of the window: an ISO 8601 date-time with a zone (the hour it falls in), or YYYY-MM-DD (midnight UTC). Defaults to 23 hours before the last hour."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2}))?$"
            },
            "description": "Last hour of the window, included: an ISO 8601 date-time with a zone (the hour it falls in), or YYYY-MM-DD (the whole UTC day). Defaults to the current hour, and a later time ends the window there. A window covers at most 7 days (168 hours)."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowHourlyActivity"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{runId}/steps": {
      "get": {
        "operationId": "v2-list-run-steps",
        "summary": "List the executed steps of one run as a flat index (no payloads)",
        "description": "List the executed steps of one run as a flat index (no payloads). Fetch a single step for its full request and response. The list is never paged: every step is answered, with meta.total; limit is accepted and ignored.\n\nRequires the API key permission log:view.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RunStep"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{runId}/steps/{stepInstanceId}": {
      "get": {
        "operationId": "v2-get-run-step",
        "summary": "Get one executed step of a run, including its full request and response payloads",
        "description": "Get one executed step of a run, including its full request and response payloads.\n\nRequires the API key permission log:view.",
        "tags": [
          "runs"
        ],
        "security": [
          {
            "apiKey": [
              "log:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "stepInstanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RunStepDetail"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end user's or installation's run cannot be used under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections": {
      "get": {
        "operationId": "v2-list-connections",
        "summary": "List connections (credentials) for the company, the company's default for each app first",
        "description": "List connections (credentials) for the company, the company's default for each app first. Shared ones and the API key creator's own personal ones are listed. Secrets are never included. Narrow to one app with app (its id or slug), search names and account emails with q, or filter by appId, status, valid, or expiresOn for expiry monitoring.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission credential:view.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, nameSource, appId, authType, authenticationId, accountEmail, externalAccountId, scopes, environmentId, status, statusUpdatedOn, isDefault, isCompany, owner, usableByYou, isGlobal, endUserId, installationId, userId, createdIn, testedOn, expiresOn, authenticatedOn, attemptedOn, createdOn, createdBy, updatedOn, updatedBy."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, nameSource, appId, authType, authenticationId, accountEmail, externalAccountId, environmentId, status, statusUpdatedOn, isDefault, isCompany, owner, isGlobal, endUserId, installationId, userId, createdIn, testedOn, expiresOn, authenticatedOn, attemptedOn, createdOn, createdBy, updatedOn, updatedBy. Default: -isDefault,-createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, nameSource, appId, authType, authenticationId, accountEmail, externalAccountId, environmentId, status, statusUpdatedOn, isDefault, isCompany, owner, isGlobal, endUserId, installationId, userId, createdIn, testedOn, expiresOn, authenticatedOn, attemptedOn, createdOn, createdBy, updatedOn, updatedBy. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "nameSource",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "generated",
                "manual"
              ]
            },
            "description": "Filter on nameSource: `nameSource=value` matches it exactly. Bracket operators: `nameSource[ne]`, `nameSource[gt]`, `nameSource[gte]`, `nameSource[lt]`, `nameSource[lte]`, `nameSource[contains]`, `nameSource[starts]`, `nameSource[ends]`, and `nameSource[in]` / `nameSource[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "authType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on authType: `authType=value` matches it exactly. Bracket operators: `authType[ne]`, `authType[gt]`, `authType[gte]`, `authType[lt]`, `authType[lte]`, `authType[contains]`, `authType[starts]`, `authType[ends]`, and `authType[in]` / `authType[nin]` with comma-separated values."
          },
          {
            "name": "authenticationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on authenticationId: `authenticationId=value` matches it exactly. Bracket operators: `authenticationId[ne]`, `authenticationId[gt]`, `authenticationId[gte]`, `authenticationId[lt]`, `authenticationId[lte]`, `authenticationId[contains]`, `authenticationId[starts]`, `authenticationId[ends]`, and `authenticationId[in]` / `authenticationId[nin]` with comma-separated values."
          },
          {
            "name": "accountEmail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on accountEmail: `accountEmail=value` matches it exactly. Bracket operators: `accountEmail[ne]`, `accountEmail[gt]`, `accountEmail[gte]`, `accountEmail[lt]`, `accountEmail[lte]`, `accountEmail[contains]`, `accountEmail[starts]`, `accountEmail[ends]`, and `accountEmail[in]` / `accountEmail[nin]` with comma-separated values."
          },
          {
            "name": "externalAccountId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on externalAccountId: `externalAccountId=value` matches it exactly. Bracket operators: `externalAccountId[ne]`, `externalAccountId[gt]`, `externalAccountId[gte]`, `externalAccountId[lt]`, `externalAccountId[lte]`, `externalAccountId[contains]`, `externalAccountId[starts]`, `externalAccountId[ends]`, and `externalAccountId[in]` / `externalAccountId[nin]` with comma-separated values."
          },
          {
            "name": "environmentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on environmentId: `environmentId=value` matches it exactly. Bracket operators: `environmentId[ne]`, `environmentId[gt]`, `environmentId[gte]`, `environmentId[lt]`, `environmentId[lte]`, `environmentId[contains]`, `environmentId[starts]`, `environmentId[ends]`, and `environmentId[in]` / `environmentId[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "statusUpdatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on statusUpdatedOn: `statusUpdatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `statusUpdatedOn[ne]`, `statusUpdatedOn[gt]`, `statusUpdatedOn[gte]`, `statusUpdatedOn[lt]`, `statusUpdatedOn[lte]`, and `statusUpdatedOn[in]` / `statusUpdatedOn[nin]` with comma-separated values."
          },
          {
            "name": "isDefault",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDefault: `isDefault=value` matches it exactly. Bracket operators: `isDefault[ne]`, `isDefault[gt]`, `isDefault[gte]`, `isDefault[lt]`, `isDefault[lte]`, and `isDefault[in]` / `isDefault[nin]` with comma-separated values."
          },
          {
            "name": "isCompany",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isCompany: `isCompany=value` matches it exactly. Bracket operators: `isCompany[ne]`, `isCompany[gt]`, `isCompany[gte]`, `isCompany[lt]`, `isCompany[lte]`, and `isCompany[in]` / `isCompany[nin]` with comma-separated values."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "personal",
                "endUser",
                "installation"
              ]
            },
            "description": "Filter on owner: `owner=value` matches it exactly. Bracket operators: `owner[ne]`, `owner[gt]`, `owner[gte]`, `owner[lt]`, `owner[lte]`, `owner[contains]`, `owner[starts]`, `owner[ends]`, and `owner[in]` / `owner[nin]` with comma-separated values."
          },
          {
            "name": "isGlobal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isGlobal: `isGlobal=value` matches it exactly. Bracket operators: `isGlobal[ne]`, `isGlobal[gt]`, `isGlobal[gte]`, `isGlobal[lt]`, `isGlobal[lte]`, and `isGlobal[in]` / `isGlobal[nin]` with comma-separated values."
          },
          {
            "name": "endUserId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on endUserId: `endUserId=value` matches it exactly. Bracket operators: `endUserId[ne]`, `endUserId[gt]`, `endUserId[gte]`, `endUserId[lt]`, `endUserId[lte]`, `endUserId[contains]`, `endUserId[starts]`, `endUserId[ends]`, and `endUserId[in]` / `endUserId[nin]` with comma-separated values."
          },
          {
            "name": "installationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on installationId: `installationId=value` matches it exactly. Bracket operators: `installationId[ne]`, `installationId[gt]`, `installationId[gte]`, `installationId[lt]`, `installationId[lte]`, `installationId[contains]`, `installationId[starts]`, `installationId[ends]`, and `installationId[in]` / `installationId[nin]` with comma-separated values."
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on userId: `userId=value` matches it exactly. Bracket operators: `userId[ne]`, `userId[gt]`, `userId[gte]`, `userId[lt]`, `userId[lte]`, `userId[contains]`, `userId[starts]`, `userId[ends]`, and `userId[in]` / `userId[nin]` with comma-separated values."
          },
          {
            "name": "createdIn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdIn: `createdIn=value` matches it exactly. Bracket operators: `createdIn[ne]`, `createdIn[gt]`, `createdIn[gte]`, `createdIn[lt]`, `createdIn[lte]`, `createdIn[contains]`, `createdIn[starts]`, `createdIn[ends]`, and `createdIn[in]` / `createdIn[nin]` with comma-separated values."
          },
          {
            "name": "testedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on testedOn: `testedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `testedOn[ne]`, `testedOn[gt]`, `testedOn[gte]`, `testedOn[lt]`, `testedOn[lte]`, and `testedOn[in]` / `testedOn[nin]` with comma-separated values."
          },
          {
            "name": "expiresOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on expiresOn: `expiresOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `expiresOn[ne]`, `expiresOn[gt]`, `expiresOn[gte]`, `expiresOn[lt]`, `expiresOn[lte]`, and `expiresOn[in]` / `expiresOn[nin]` with comma-separated values."
          },
          {
            "name": "authenticatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on authenticatedOn: `authenticatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `authenticatedOn[ne]`, `authenticatedOn[gt]`, `authenticatedOn[gte]`, `authenticatedOn[lt]`, `authenticatedOn[lte]`, and `authenticatedOn[in]` / `authenticatedOn[nin]` with comma-separated values."
          },
          {
            "name": "attemptedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on attemptedOn: `attemptedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `attemptedOn[ne]`, `attemptedOn[gt]`, `attemptedOn[gte]`, `attemptedOn[lt]`, `attemptedOn[lte]`, and `attemptedOn[in]` / `attemptedOn[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedBy: `updatedBy=value` matches it exactly. Bracket operators: `updatedBy[ne]`, `updatedBy[gt]`, `updatedBy[gte]`, `updatedBy[lt]`, `updatedBy[lte]`, `updatedBy[contains]`, `updatedBy[starts]`, `updatedBy[ends]`, and `updatedBy[in]` / `updatedBy[nin]` with comma-separated values."
          },
          {
            "name": "app",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Only this app's connections: its id or slug (slack), as List Universal Apps answers them."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Search text: connections whose name or signed-in account email contains it, ignoring case. * is a wildcard."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Connection"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-connection",
        "summary": "Create a connection from the fields its sign-in method asks for (GET /v2/connections/fields): an API key, a username and password, or an app's own fields",
        "description": "Create a connection from the fields its sign-in method asks for (GET /v2/connections/fields): an API key, a username and password, or an app's own fields. Saved the way MindCloud's connection form saves one, then tested when the app declares a connection test, and answered as Get Connection reads it. credentials is write-only and never answered. A sign-in method that signs in at the provider in a browser (OAuth) answers 400 CONNECT_LINK_REQUIRED: use POST /v2/connections/connect-links. isCompany true shares it with the organization, which needs credential:edit or role:manage as well.\n\nRequires the API key permission credential:create.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The app to connect, by its id or slug, from List Universal Apps."
                  },
                  "authenticationId": {
                    "description": "The sign-in method to use, for an app with more than one, from GET /v2/connections/fields. Left out: the app's default.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "The connection's name, as the app lists it. It cannot contain a secret of the connection."
                  },
                  "isCompany": {
                    "type": "boolean",
                    "description": "Required. true shares the connection with the organization; false makes it the API key creator's personal connection."
                  },
                  "isDefault": {
                    "description": "true makes it the organization's default connection for the app: a Universal run without connectionId and a new workflow step use it.",
                    "type": "boolean"
                  },
                  "credentials": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 4000
                          }
                        }
                      ]
                    },
                    "description": "Write-only. The values for the sign-in method's fields, by field key, from GET /v2/connections/fields: { \"apiKey\": \"…\" }. Never answered, logged or audited."
                  }
                },
                "required": [
                  "app",
                  "isCompany",
                  "credentials"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, UNKNOWN_BODY_KEY), names an unknown app or sign-in method (APP_NOT_FOUND, AUTHENTICATION_NOT_FOUND), sends a field the method does not take or leaves out a required one (UNKNOWN_CREDENTIAL_FIELD, MISSING_CREDENTIAL_FIELDS), names it with part of a secret (NAME_CONTAINS_SECRET), or the method signs in in a browser (CONNECT_LINK_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks credential:create (API_KEY_PERMISSION_DENIED), a shared connection needs credential:edit or role:manage (COMPANY_CONNECTION_FORBIDDEN), or X-Company-Id names an organization the key's creator is not a member of (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The connection could not be saved (CONNECTION_SAVE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The app's definition could not be loaded (CONNECTION_APP_UNAVAILABLE), or the key's permissions could not be read (AUTHORIZATION_UNAVAILABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/fields": {
      "get": {
        "operationId": "v2-list-connection-fields",
        "summary": "The sign-in methods an app offers for a new connection, the app's default first, each with the fields its connection form asks for",
        "description": "The sign-in methods an app offers for a new connection, the app's default first, each with the fields its connection form asks for. requiresBrowser true: the method signs in at the provider in a browser (OAuth), so connect it with POST /v2/connections/connect-links. false: send the fields' values to POST /v2/connections. Describes the form only; no stored value is ever answered.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission credential:view.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, type, name, requiresBrowser, fields."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, type, name, requiresBrowser. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, type, name, requiresBrowser. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on type: `type=value` matches it exactly. Bracket operators: `type[ne]`, `type[gt]`, `type[gte]`, `type[lt]`, `type[lte]`, `type[contains]`, `type[starts]`, `type[ends]`, and `type[in]` / `type[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "requiresBrowser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on requiresBrowser: `requiresBrowser=value` matches it exactly. Bracket operators: `requiresBrowser[ne]`, `requiresBrowser[gt]`, `requiresBrowser[gte]`, `requiresBrowser[lt]`, `requiresBrowser[lte]`, and `requiresBrowser[in]` / `requiresBrowser[nin]` with comma-separated values."
          },
          {
            "name": "app",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Required. The app, by its id or slug, from List Universal Apps."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConnectionAuthentication"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/{connectionId}": {
      "get": {
        "operationId": "v2-get-connection",
        "summary": "Get one connection (credential)",
        "description": "Get one connection (credential). Secrets are never included. Another member's personal connection answers 404.\n\nRequires the API key permission credential:view.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end-user or installation connection cannot be read under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company, or it is another member's personal connection (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Whether the key can use the connection (usableByYou) could not be checked (AUTHORIZATION_UNAVAILABLE). Retry the request, or leave usableByYou out of fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-connection",
        "summary": "Rename a connection, make it the organization's default for its app, or switch it between personal and shared with the organization",
        "description": "Rename a connection, make it the organization's default for its app, or switch it between personal and shared with the organization. Only the fields sent change. Saved the way MindCloud's connection form saves it: members who depend on a shared connection are emailed about the change, as in the app. isCompany needs role:manage too, as changing sharing does in the app; making a shared connection personal makes it the API key creator's. A name that contains a secret of the connection is refused.\n\nRequires the API key permission credential:edit.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "The connection's name, as the app lists it. It cannot contain a secret of the connection."
                  },
                  "isDefault": {
                    "description": "true makes it the organization's default connection for its app. To change the default, make another connection the default.",
                    "type": "boolean",
                    "const": true
                  },
                  "isCompany": {
                    "description": "true shares it with the organization; false makes it the API key creator's personal connection. Needs role:manage.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, UNKNOWN_BODY_KEY), sends none of name, isDefault and isCompany (NO_FIELDS_TO_UPDATE), or the name contains a secret of the connection (NAME_CONTAINS_SECRET).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks credential:edit, or role:manage for isCompany (API_KEY_PERMISSION_DENIED); sharing changes through parent delegation or MindCloud staff access (PARENT_DELEGATE_FORBIDDEN); the key's creator may not change sharing (CONNECTION_SHARING_FORBIDDEN); the connection is limited to roles the creator does not hold (CONNECTION_ACCESS_DENIED); or an Embedded connection under X-Company-Id (CHILD_SCOPE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company, or it is another member's personal connection, or one the key's creator may not change (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The connection is used in all its owner's organizations, so it cannot be shared with one or be a default (CONNECTION_IS_GLOBAL).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The connection could not be saved (CONNECTION_SAVE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-connection",
        "summary": "Delete a connection, revoking it on the provider side first when the app declares a revoke action",
        "description": "Delete a connection, revoking it on the provider side first when the app declares a revoke action. Active workflows using the connection block the delete with 409 CONNECTION_IN_USE, and the error body names them so the caller can act. Inactive workflows do not block, matching the product.\n\nRequires the API key permission credential:delete.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, CREDENTIAL_DELETE_INVALID_REQUEST), or the delete was refused (CONNECTION_DELETE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end-user or installation connection cannot be deleted under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH), or the connection is limited to roles the API key's creator does not hold (CONNECTION_ACCESS_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company, or it is another member's personal connection (NOT_FOUND), or its app definition is gone (CREDENTIAL_DELETE_APP_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Active workflows still use the connection (CONNECTION_IN_USE). The error body names them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionInUseErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The credential or secret delete failed (CREDENTIAL_DELETE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The provider-side revoke declared by the app failed, so nothing was deleted (CREDENTIAL_DELETE_ACTION_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/connect-links": {
      "post": {
        "operationId": "v2-create-connect-link",
        "summary": "Create a single-use link, valid for fifteen minutes, for the API key's creator to sign a connection in at the provider (OAuth) in a browser: a new connection, or, with connectionId, a reconnect of an existing one",
        "description": "Create a single-use link, valid for fifteen minutes, for the API key's creator to sign a connection in at the provider (OAuth) in a browser: a new connection, or, with connectionId, a reconnect of an existing one. Only that person, signed in to MindCloud, can use it; anyone else who opens it is asked to sign in and is refused. The connection is created when they open the link, then signed in through MindCloud's own connect screen. A new connection needs credential:create (and credential:edit or role:manage when isCompany is true); a reconnect needs credential:edit. A sign-in method typed in (an API key) answers 400 CONNECT_LINK_NOT_SUPPORTED: use POST /v2/connections.\n\nRequires the Universal permission for the action's declared operation: universal:read, universal:create, universal:update, or universal:delete (all four when the action declares none).",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The app to connect, by its id or slug, from List Universal Apps."
                  },
                  "authenticationId": {
                    "description": "The sign-in method to use, for an app with more than one, from GET /v2/connections/fields. Left out: the app's default, or the connection's own on a reconnect.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "isCompany": {
                    "type": "boolean",
                    "description": "Required. true: the connection is shared with the organization. false: it is the API key creator's own. On a reconnect, the connection's current value."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "The connection's name, as the app lists it. It cannot contain a secret of the connection."
                  },
                  "connectionId": {
                    "description": "Reconnect this connection instead of creating one: its id, from List Connections.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                },
                "required": [
                  "app",
                  "isCompany"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConnectLink"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, UNKNOWN_BODY_KEY), names an unknown app or sign-in method (APP_NOT_FOUND, AUTHENTICATION_NOT_FOUND), the method is typed in rather than signed in in a browser (CONNECT_LINK_NOT_SUPPORTED), or a reconnect sends a different app, isCompany or a name (CONFLICTING_FIELDS).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks credential:create, or credential:edit for a reconnect (API_KEY_PERMISSION_DENIED); a shared connection needs credential:edit or role:manage (COMPANY_CONNECTION_FORBIDDEN); the connection is limited to roles the creator does not hold (CONNECTION_ACCESS_DENIED); or X-Company-Id names an organization the creator is not a member of (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with connectionId belongs to the company, or it is another member's personal connection (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The link could not be stored (TEMPORARILY_UNAVAILABLE), or the app's definition could not be loaded (CONNECTION_APP_UNAVAILABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/{connectionId}/credentials": {
      "put": {
        "operationId": "v2-update-connection-credentials",
        "summary": "Replace secrets of a connection that signs in with typed-in values (an API key, a username and password, an app's own fields)",
        "description": "Replace secrets of a connection that signs in with typed-in values (an API key, a username and password, an app's own fields). Only the keys sent are replaced; the others keep their values. The connection is then tested when the app declares a connection test, and answered as Get Connection reads it. credentials is write-only and never answered. A connection that signs in at the provider in a browser (OAuth) answers 400 CONNECT_LINK_REQUIRED: reconnect it with POST /v2/connections/connect-links and its connectionId.\n\nRequires the API key permission credential:edit.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "credentials": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 4000
                          }
                        }
                      ]
                    },
                    "description": "Write-only. The new values by field key, from GET /v2/connections/fields: { \"apiKey\": \"…\" }. Only these keys are replaced. Never answered, logged or audited."
                  }
                },
                "required": [
                  "credentials"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, UNKNOWN_BODY_KEY), credentials is empty (NO_FIELDS_TO_UPDATE), names a field the sign-in method does not take (UNKNOWN_CREDENTIAL_FIELD), or the connection signs in in a browser (CONNECT_LINK_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks credential:edit (API_KEY_PERMISSION_DENIED), the connection is limited to roles the key's creator does not hold (CONNECTION_ACCESS_DENIED), or X-Company-Id names an organization the creator is not a member of (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company, or it is another member's personal connection, or one the key's creator may not change (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The connection could not be saved (CONNECTION_SAVE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The app's definition could not be loaded (CONNECTION_APP_UNAVAILABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/{connectionId}/test": {
      "post": {
        "operationId": "v2-test-connection",
        "summary": "Test a connection against its provider and report the verdict",
        "description": "Test a connection against its provider and report the verdict. Takes no body: the app and its version come from the connection itself. An app that declares no connection test answers 200 with supported false and status unsupported, which is a verdict rather than an error. A test writes only its own result, the same as the product's test: the status, testedOn when it passes, a renewed sign-in for an app that can renew one (authenticatedOn, expiresOn), and a refreshed name when the name was generated, never one someone typed. changes lists each field it moved.\n\nRequires the API key permission credential:edit.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "credential:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConnectionTestResult"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end-user or installation connection cannot be tested under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH), or the connection is limited to roles the API key's creator does not hold (CONNECTION_ACCESS_DENIED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company, or it is another member's personal connection (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The connection's app definition could not be loaded, so no test could run (CONNECTION_APP_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/connections/{connectionId}/shares": {
      "get": {
        "operationId": "v2-get-connection-shares",
        "summary": "The share list of a connection shared with the company: who may use it in Cirra (everyone in the organization, a role, or a team) and at which access level",
        "description": "The share list of a connection shared with the company: who may use it in Cirra (everyone in the organization, a role, or a team) and at which access level. Personal and Embedded connections answer 404.\n\nRequires the API key permission role:manage.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConnectionShares"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "An Embedded end-user or installation connection cannot be read under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company (NOT_FOUND), or it is personal or an Embedded one and has no share list (CONNECTION_NOT_SHARED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The share list could not be read right now (CONNECTION_SHARES_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-connection-shares",
        "summary": "Replace the share list of a connection shared with the company in one step: entries becomes the whole list, so nobody is cut off by a half-saved list",
        "description": "Replace the share list of a connection shared with the company in one step: entries becomes the whole list, so nobody is cut off by a half-saved list. It always holds exactly one organization entry (the access everyone else gets, \"none\" for no access) and at most one entry per role or team, each at read, readWrite, full, or custom with its own table of record types and operations (permissions). Members lose or gain access on their next action. Only a key of the organization changes who may use its connections: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "connections"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "organization",
                            "role",
                            "team"
                          ],
                          "x-enumDescriptions": {
                            "organization": "Everyone in the organization. A share list has exactly one.",
                            "role": "Everyone who holds one role (roleId).",
                            "team": "Everyone on one team (teamId)."
                          },
                          "description": "Who the entry names."
                        },
                        "roleId": {
                          "description": "The role, from List Roles. Required on a role entry; null or left out on the others.",
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 24
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "teamId": {
                          "description": "The team, from List Teams. Required on a team entry; null or left out on the others.",
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 24
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "accessLevel": {
                          "type": "string",
                          "enum": [
                            "none",
                            "read",
                            "readWrite",
                            "full",
                            "custom"
                          ],
                          "x-enumDescriptions": {
                            "none": "No access. Only on the organization entry: members no other entry matches cannot use the connection.",
                            "read": "Run only actions that read data.",
                            "readWrite": "Run actions that read, create, or update data.",
                            "full": "Run every action, deletes included.",
                            "custom": "Advanced: run what the entry's own table of record types and operations allows (permissions)."
                          },
                          "description": "What the members the entry matches may do with the connection. none is only for the organization entry."
                        },
                        "permissions": {
                          "description": "Required on a custom entry; null or left out on the others. The Advanced table of a custom entry; null on every other level. An action runs through this entry when models[its record type][its operation] is true, else when default[its operation] is true. An action with no record type follows default; one that declares no operation is \"unknown\". Record types are the canonical keys of app actions (model). Grants from all the entries that match a member add up: a member may run an action when any of them allows it, so false (Blocked) only means this entry does not grant it. A table is saved in one form: record type cells equal to default are dropped, and a table with none left whose default equals a preset is saved as that preset.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "default": {
                                  "type": "object",
                                  "properties": {
                                    "read": {
                                      "type": "boolean",
                                      "description": "Actions that read records."
                                    },
                                    "create": {
                                      "type": "boolean",
                                      "description": "Actions that create records."
                                    },
                                    "update": {
                                      "type": "boolean",
                                      "description": "Actions that update records."
                                    },
                                    "delete": {
                                      "type": "boolean",
                                      "description": "Actions that delete records."
                                    },
                                    "unknown": {
                                      "type": "boolean",
                                      "description": "Actions that declare no operation (\"Other\")."
                                    }
                                  },
                                  "required": [
                                    "read",
                                    "create",
                                    "update",
                                    "delete",
                                    "unknown"
                                  ],
                                  "additionalProperties": {},
                                  "description": "Every operation, true or false: what the entry allows on record types models does not name, and on actions with no record type."
                                },
                                "models": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "object",
                                    "properties": {
                                      "read": {
                                        "description": "Actions that read records.",
                                        "type": "boolean"
                                      },
                                      "create": {
                                        "description": "Actions that create records.",
                                        "type": "boolean"
                                      },
                                      "update": {
                                        "description": "Actions that update records.",
                                        "type": "boolean"
                                      },
                                      "delete": {
                                        "description": "Actions that delete records.",
                                        "type": "boolean"
                                      },
                                      "unknown": {
                                        "description": "Actions that declare no operation (\"Other\").",
                                        "type": "boolean"
                                      }
                                    },
                                    "additionalProperties": {}
                                  },
                                  "description": "{ \"<record type>\": { \"<operation>\": true or false } }: the cells that differ from default, by canonical record type key. An operation a record type leaves out follows default."
                                }
                              },
                              "required": [
                                "default",
                                "models"
                              ],
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "targetType",
                        "accessLevel"
                      ],
                      "additionalProperties": {}
                    },
                    "description": "The whole new share list. It replaces the current one: an entry left out is removed. Exactly one organization entry; at most one entry per role or team."
                  }
                },
                "required": [
                  "entries"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConnectionShares"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid, such as no organization entry, a role entry without roleId, or a table cell that is not true or false (INVALID_QUERY); names the same role or team twice (CONNECTION_SHARE_DUPLICATE_TARGET); names a role or team the company does not have (CONNECTION_SHARE_TARGET_UNKNOWN); gives a custom entry no valid table, such as a record type that is not canonical, or gives a preset level a table (CONNECTION_SHARE_PERMISSIONS_INVALID); or gives a team or role a custom table that allows nothing (CONNECTION_SHARE_NO_ACCESS). The last two name the entry in details.target, as \"<targetType>:<roleId or teamId>\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No connection with this id belongs to the company (NOT_FOUND), or it is personal or an Embedded one and has no share list (CONNECTION_NOT_SHARED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The share list could not be saved right now (CONNECTION_SHARES_UNAVAILABLE). Nothing changed; retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/platforms": {
      "get": {
        "operationId": "v2-list-platforms",
        "summary": "List the chat platforms Cirra answers in (Microsoft Teams, Slack): whether each is connected, and who may sign in through it with which role",
        "description": "List the chat platforms Cirra answers in (Microsoft Teams, Slack): whether each is connected, and who may sign in through it with which role.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission company:view.",
        "tags": [
          "platforms"
        ],
        "security": [
          {
            "apiKey": [
              "company:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, isConnected, directoryId, directoryName, allowedEmailDomains, autoCreateUsers, defaultRoleId, allowGuests, roleMappings, unmappedRoleId."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, isConnected, directoryId, directoryName, autoCreateUsers, defaultRoleId, allowGuests, unmappedRoleId. Default: id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, isConnected, directoryId, directoryName, autoCreateUsers, defaultRoleId, allowGuests, unmappedRoleId. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "microsoft",
                "slack"
              ]
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "isConnected",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isConnected: `isConnected=value` matches it exactly. Bracket operators: `isConnected[ne]`, `isConnected[gt]`, `isConnected[gte]`, `isConnected[lt]`, `isConnected[lte]`, and `isConnected[in]` / `isConnected[nin]` with comma-separated values."
          },
          {
            "name": "directoryId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on directoryId: `directoryId=value` matches it exactly. Bracket operators: `directoryId[ne]`, `directoryId[gt]`, `directoryId[gte]`, `directoryId[lt]`, `directoryId[lte]`, `directoryId[contains]`, `directoryId[starts]`, `directoryId[ends]`, and `directoryId[in]` / `directoryId[nin]` with comma-separated values."
          },
          {
            "name": "directoryName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on directoryName: `directoryName=value` matches it exactly. Bracket operators: `directoryName[ne]`, `directoryName[gt]`, `directoryName[gte]`, `directoryName[lt]`, `directoryName[lte]`, `directoryName[contains]`, `directoryName[starts]`, `directoryName[ends]`, and `directoryName[in]` / `directoryName[nin]` with comma-separated values."
          },
          {
            "name": "autoCreateUsers",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on autoCreateUsers: `autoCreateUsers=value` matches it exactly. Bracket operators: `autoCreateUsers[ne]`, `autoCreateUsers[gt]`, `autoCreateUsers[gte]`, `autoCreateUsers[lt]`, `autoCreateUsers[lte]`, and `autoCreateUsers[in]` / `autoCreateUsers[nin]` with comma-separated values."
          },
          {
            "name": "defaultRoleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on defaultRoleId: `defaultRoleId=value` matches it exactly. Bracket operators: `defaultRoleId[ne]`, `defaultRoleId[gt]`, `defaultRoleId[gte]`, `defaultRoleId[lt]`, `defaultRoleId[lte]`, `defaultRoleId[contains]`, `defaultRoleId[starts]`, `defaultRoleId[ends]`, and `defaultRoleId[in]` / `defaultRoleId[nin]` with comma-separated values."
          },
          {
            "name": "allowGuests",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on allowGuests: `allowGuests=value` matches it exactly. Bracket operators: `allowGuests[ne]`, `allowGuests[gt]`, `allowGuests[gte]`, `allowGuests[lt]`, `allowGuests[lte]`, and `allowGuests[in]` / `allowGuests[nin]` with comma-separated values."
          },
          {
            "name": "unmappedRoleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on unmappedRoleId: `unmappedRoleId=value` matches it exactly. Bracket operators: `unmappedRoleId[ne]`, `unmappedRoleId[gt]`, `unmappedRoleId[gte]`, `unmappedRoleId[lt]`, `unmappedRoleId[lte]`, `unmappedRoleId[contains]`, `unmappedRoleId[starts]`, `unmappedRoleId[ends]`, and `unmappedRoleId[in]` / `unmappedRoleId[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Platform"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/platforms/{platformId}": {
      "get": {
        "operationId": "v2-get-platform",
        "summary": "Get one chat platform: whether it is connected, the allowed email domains, and the role mappings",
        "description": "Get one chat platform: whether it is connected, the allowed email domains, and the role mappings.\n\nRequires the API key permission company:view.",
        "tags": [
          "platforms"
        ],
        "security": [
          {
            "apiKey": [
              "company:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "platformId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Platform"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-platform",
        "summary": "Change who may sign in to Cirra through Teams or Slack, and the roles they get: only the settings sent change (roleMappings and allowedEmailDomains replace their whole list; unmappedRoleId null refuses unmapped people)",
        "description": "Change who may sign in to Cirra through Teams or Slack, and the roles they get: only the settings sent change (roleMappings and allowedEmailDomains replace their whole list; unmappedRoleId null refuses unmapped people). People signing in later are seated in these roles with nobody present, so the key acts as the user who created it and may name only roles whose permissions its creator and the key both hold. Connecting a workspace or tenant is done in Cirra.\n\nRequires the API key permission company:edit.",
        "tags": [
          "platforms"
        ],
        "security": [
          {
            "apiKey": [
              "company:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "platformId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowedEmailDomains": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 255
                    }
                  },
                  "autoCreateUsers": {
                    "type": "boolean"
                  },
                  "defaultRoleId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "allowGuests": {
                    "type": "boolean"
                  },
                  "roleMappings": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "groupId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "description": "The directory group id."
                        },
                        "roleId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "The role it grants (List Roles)."
                        }
                      },
                      "required": [
                        "groupId",
                        "roleId"
                      ]
                    }
                  },
                  "unmappedRoleId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Platform"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), carries no setting (NO_FIELDS_TO_UPDATE), or the settings were refused, such as a consumer email domain (PLATFORM_SETTINGS_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or a role grants permissions the acting user does not hold (MEMBER_ROLE_EXCEEDS_ACTOR), or a key of the parent organization or a MindCloud admin key named the Owner role or a role with a reserved permission (PARENT_DELEGATE_OWNER_FORBIDDEN, PARENT_DELEGATE_ROLE_FORBIDDEN, MINDCLOUD_ADMIN_OWNER_FORBIDDEN, MINDCLOUD_ADMIN_ROLE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The platform is not microsoft or slack (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another change to the platform is in progress (CONNECTION_UPDATE_IN_PROGRESS). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/members": {
      "get": {
        "operationId": "v2-list-members",
        "summary": "List members of the company",
        "description": "List members of the company.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission member:view.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out. Each item then carries only those keys, whatever its schema requires. Fields: userId, name, email, isPending, roleId, roleName, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: userId, name, email, isPending, roleId, roleName, createdOn. Default: -createdOn,userId."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: userId, name, email, isPending, roleId, roleName, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on userId: `userId=value` matches it exactly. Bracket operators: `userId[ne]`, `userId[gt]`, `userId[gte]`, `userId[lt]`, `userId[lte]`, `userId[contains]`, `userId[starts]`, `userId[ends]`, and `userId[in]` / `userId[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "isPending",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPending: `isPending=value` matches it exactly. Bracket operators: `isPending[ne]`, `isPending[gt]`, `isPending[gte]`, `isPending[lt]`, `isPending[lte]`, and `isPending[in]` / `isPending[nin]` with comma-separated values."
          },
          {
            "name": "roleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleId: `roleId=value` matches it exactly. Bracket operators: `roleId[ne]`, `roleId[gt]`, `roleId[gte]`, `roleId[lt]`, `roleId[lte]`, `roleId[contains]`, `roleId[starts]`, `roleId[ends]`, and `roleId[in]` / `roleId[nin]` with comma-separated values."
          },
          {
            "name": "roleName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleName: `roleName=value` matches it exactly. Bracket operators: `roleName[ne]`, `roleName[gt]`, `roleName[gte]`, `roleName[lt]`, `roleName[lte]`, `roleName[contains]`, `roleName[starts]`, `roleName[ends]`, and `roleName[in]` / `roleName[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Member"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/members/{userId}": {
      "put": {
        "operationId": "v2-update-member",
        "summary": "Set a company member's role",
        "description": "Set a company member's role. The key acts as the user who created it: it cannot change that user's own role, it assigns only a role whose permissions its creator holds and the key holds too, and it changes an Owner only when its creator and the key both hold member:owner_edit. The last Owner cannot be demoted.\n\nRequires the API key permission member:edit.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roleId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "roleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Member"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, MEMBER_ROLE_UPDATE_INVALID_REQUEST), the role cannot be assigned (MEMBER_ROLE_ASSIGNMENT_INVALID), or the target is the last Owner (MEMBER_ROLE_LAST_OWNER_DEMOTION_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the target is the acting user (MEMBER_ROLE_SELF_UPDATE_FORBIDDEN), or the role grants permissions the acting user does not hold (MEMBER_ROLE_EXCEEDS_ACTOR), or the target is an Owner and the creator or the key lacks member:owner_edit (MEMBER_ROLE_OWNER_MODIFICATION_FORBIDDEN), or a key of the parent organization tried to change an Owner of this child organization (PARENT_DELEGATE_OWNER_FORBIDDEN) or assign a role with a reserved permission (PARENT_DELEGATE_ROLE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (MEMBER_ROLE_UPDATE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The role update transaction failed (MEMBER_ROLE_UPDATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-member",
        "summary": "Remove someone from the company",
        "description": "Remove someone from the company. One route covers both cases: an active member loses access, and a person who was invited but never signed up has the pending invite cancelled. The key acts as the user who created it: it cannot remove that user, and it removes an Owner only when its creator and the key both hold member:owner_edit. The last Owner cannot be removed. Removing a user who is not in the company succeeds and changes nothing.\n\nRequires the API key permission member:delete.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, MEMBER_DELETE_INVALID_REQUEST), the target is the last Owner (MEMBER_DELETE_LAST_OWNER_FORBIDDEN), or the removal was refused (MEMBER_DELETE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the target is the acting user (MEMBER_DELETE_SELF_FORBIDDEN), or the target is an Owner and the creator or the key lacks member:owner_edit (MEMBER_DELETE_OWNER_FORBIDDEN), or a key of the parent organization tried to change an Owner of this child organization (PARENT_DELEGATE_OWNER_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v2-get-member",
        "summary": "Get one member of the company: their role, and whether their invite is pending",
        "description": "Get one member of the company: their role, and whether their invite is pending.\n\nRequires the API key permission member:view.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Member"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/members/{userId}/permissions": {
      "get": {
        "operationId": "v2-get-member-permissions",
        "summary": "List what one member may do in the company right now: their effective permissions, each with where it comes from (their role, a direct grant, their MindCloud staff role, or a company setting)",
        "description": "List what one member may do in the company right now: their effective permissions, each with where it comes from (their role, a direct grant, their MindCloud staff role, or a company setting). This is the same answer MindCloud uses to authorize them.\n\nRequires the API key permission member:view.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemberPermissions"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "421": {
            "description": "The organization's data lives in another region (COMPANY_REGION_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Authorization could not be read (AUTHORIZATION_UNAVAILABLE). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/members/{userId}/capabilities": {
      "get": {
        "operationId": "v2-get-member-capabilities",
        "summary": "List the Cirra capability rules that apply to one member, with the value Cirra enforces and the layer that decided it: the default, their role, or their own rules",
        "description": "List the Cirra capability rules that apply to one member, with the value Cirra enforces and the layer that decided it: the default, their role, or their own rules. A deny on the role always wins. Read only: to restrict one person, give them a role that denies it.\n\nRequires the API key permission member:view.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemberCapabilities"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "421": {
            "description": "The organization's data lives in another region (COMPANY_REGION_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Capabilities could not be read (AUTHORIZATION_UNAVAILABLE). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/invitations": {
      "get": {
        "operationId": "v2-list-invitations",
        "summary": "List the people invited to the company who have not signed up yet, newest first",
        "description": "List the people invited to the company who have not signed up yet, newest first. Each is also a pending member in List Members.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission member:view.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, email, roleId, roleName, status, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, email, roleId, roleName, status, createdOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, email, roleId, roleName, status, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "roleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleId: `roleId=value` matches it exactly. Bracket operators: `roleId[ne]`, `roleId[gt]`, `roleId[gte]`, `roleId[lt]`, `roleId[lte]`, `roleId[contains]`, `roleId[starts]`, `roleId[ends]`, and `roleId[in]` / `roleId[nin]` with comma-separated values."
          },
          {
            "name": "roleName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleName: `roleName=value` matches it exactly. Bracket operators: `roleName[ne]`, `roleName[gt]`, `roleName[gte]`, `roleName[lt]`, `roleName[lte]`, `roleName[contains]`, `roleName[starts]`, `roleName[ends]`, and `roleName[in]` / `roleName[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted"
              ]
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invitation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-invitation",
        "summary": "Invite one person to the company by email, as the app's invite does: MindCloud emails them a link to sign up, and they are a pending member until they do",
        "description": "Invite one person to the company by email, as the app's invite does: MindCloud emails them a link to sign up, and they are a pending member until they do. Someone who already has a MindCloud account joins at once (status accepted). Omit roleId for the built-in Member role. The key acts as the user who created it: it invites only into a role whose permissions its creator and the key both hold.\n\nRequires the API key permission member:create.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "apiKey": [
              "member:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "roleId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Invitation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or the invite was refused (MEMBER_INVITE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the role grants permissions the acting user does not hold (MEMBER_ROLE_EXCEEDS_ACTOR), the company is a personal workspace (MEMBER_PERSONAL_COMPANY_INVITES_FORBIDDEN), or a key of the parent organization tried to invite an Owner (PARENT_DELEGATE_OWNER_FORBIDDEN) or into a role with a reserved permission (PARENT_DELEGATE_ROLE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The person is already a member (MEMBER_ALREADY_IN_COMPANY), or already has a pending invitation (INVITATION_ALREADY_PENDING). Use Update Member to change a role, or Resend Invitation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/invitations/{invitationId}": {
      "get": {
        "operationId": "v2-get-invitation",
        "summary": "Get one invitation of the company: who was invited and into which role",
        "description": "Get one invitation of the company: who was invited and into which role. Once the person signs up it is gone, and they are a member.\n\nRequires the API key permission member:view.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Invitation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-revoke-invitation",
        "summary": "Revoke an invitation: the pending member is removed, as Remove Member does, and the link MindCloud emailed stops working unless another organization also invited them",
        "description": "Revoke an invitation: the pending member is removed, as Remove Member does, and the link MindCloud emailed stops working unless another organization also invited them. The key acts as the user who created it: an invitation to the Owner role needs member:owner_edit on the key and its creator, and a parent organization's key never revokes one.\n\nRequires the API key permission member:delete.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "apiKey": [
              "member:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The removal was refused (MEMBER_DELETE_FAILED, MEMBER_DELETE_LAST_OWNER_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the invitation is to the Owner role and the creator or the key lacks member:owner_edit (MEMBER_DELETE_OWNER_FORBIDDEN), or a key of the parent organization tried to remove an Owner of this child organization (PARENT_DELEGATE_OWNER_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/invitations/{invitationId}/resend": {
      "post": {
        "operationId": "v2-resend-invitation",
        "summary": "Email an invitation again, as the app's resend does: a new link to the same address, and the link sent before stops working",
        "description": "Email an invitation again, as the app's resend does: a new link to the same address, and the link sent before stops working.\n\nRequires the API key permission member:create.",
        "tags": [
          "invitations"
        ],
        "security": [
          {
            "apiKey": [
              "member:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Invitation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The email could not be sent (MEMBER_INVITE_RESEND_FAILED). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No invitation with this id is in the company: never invited, already signed up, or removed (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/members/{userId}/spend-limit": {
      "get": {
        "operationId": "v2-get-member-spend-limit",
        "summary": "Get how much of the organization's Cirra credit pool one member may use per billing period",
        "description": "Get how much of the organization's Cirra credit pool one member may use per billing period.\n\nRequires the API key permission subscription:view.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "subscription:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemberSpendLimit"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (NOT_FOUND), or the member has no Cirra plan (BILLING_MEMBER_ASSIGNMENT_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-member-spend-limit",
        "summary": "Set how much of the organization's Cirra credit pool one member may use per billing period: an amount in US dollars with up to 2 decimals, 0 for none, or null to return to the plan's default",
        "description": "Set how much of the organization's Cirra credit pool one member may use per billing period: an amount in US dollars with up to 2 decimals, 0 for none, or null to return to the plan's default.\n\nRequires the API key permission subscription:manage.",
        "tags": [
          "members"
        ],
        "security": [
          {
            "apiKey": [
              "subscription:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "creditSpendLimitUsd": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "creditSpendLimitUsd"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/MemberSpendLimit"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or the amount has more than 2 decimals (BILLING_CREDIT_LIMIT_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or the company cannot manage member limits (BILLING_UNAUTHORIZED_SCOPE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (NOT_FOUND), or the member has no Cirra plan (BILLING_MEMBER_ASSIGNMENT_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/authorization/check": {
      "post": {
        "operationId": "v2-check-authorization",
        "summary": "Ask whether a member may do something right now, and why: a permission (and where they hold it from), and/or a Cirra capability key (the decision, and the layer and rule that decided it)",
        "description": "Ask whether a member may do something right now, and why: a permission (and where they hold it from), and/or a Cirra capability key (the decision, and the layer and rule that decided it). The answer comes from the same resolvers that authorize the member; nothing changes.\n\nRequires the API key permission member:view.",
        "tags": [
          "authorization"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "permission": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "capability": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AuthorizationCheck"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), asks about nothing (AUTHORIZATION_CHECK_EMPTY), or names a capability key outside the catalog (CAPABILITY_KEY_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No member with this user id is in the company (NOT_FOUND), or an action key names no action of the app (UNIVERSAL_ACTION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "421": {
            "description": "The organization's data lives in another region (COMPANY_REGION_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Authorization could not be read (AUTHORIZATION_UNAVAILABLE). Retry; it is never answered as allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/roles": {
      "get": {
        "operationId": "v2-list-roles",
        "summary": "List roles available to the company, including global platform roles (isGlobal)",
        "description": "List roles available to the company, including global platform roles (isGlobal). Fetch a single role for its permissions.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission member:view.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, isAdmin, isGlobal, createdOn, memberCount."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, description, isAdmin, isGlobal, createdOn, memberCount. Default: name."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, description, isAdmin, isGlobal, createdOn, memberCount. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "isAdmin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isAdmin: `isAdmin=value` matches it exactly. Bracket operators: `isAdmin[ne]`, `isAdmin[gt]`, `isAdmin[gte]`, `isAdmin[lt]`, `isAdmin[lte]`, and `isAdmin[in]` / `isAdmin[nin]` with comma-separated values."
          },
          {
            "name": "isGlobal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isGlobal: `isGlobal=value` matches it exactly. Bracket operators: `isGlobal[ne]`, `isGlobal[gt]`, `isGlobal[gte]`, `isGlobal[lt]`, `isGlobal[lte]`, and `isGlobal[in]` / `isGlobal[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "memberCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on memberCount: `memberCount=value` matches it exactly. Bracket operators: `memberCount[ne]`, `memberCount[gt]`, `memberCount[gte]`, `memberCount[lt]`, `memberCount[lte]`, and `memberCount[in]` / `memberCount[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RoleSummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-role",
        "summary": "Create a role in the company",
        "description": "Create a role in the company. Names are unique per company, case insensitively. Permissions are given as keys such as \"workflow:run\".\n\nRequires the API key permission role:manage.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "permissions": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Role"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY, ROLE_CREATE_INVALID_REQUEST), names permission keys that do not exist (ROLE_PERMISSIONS_UNKNOWN_KEYS), or the write was refused (ROLE_CREATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the acting user cannot grant admin permissions (ROLE_PERMISSIONS_ADMIN_FORBIDDEN), the permission is Owner-only (ROLE_PERMISSIONS_OWNER_ONLY), the acting user does not hold a permission it adds (ROLE_PERMISSIONS_EXCEED_ACTOR), or a key of the parent organization tried to grant a reserved permission (ROLE_PERMISSIONS_PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A role with this name already exists in the company (ROLE_CREATE_DUPLICATE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The role write failed (ROLE_CREATE_QUERY_FAILED), or the role was written but could not be read back (ROLE_RELOAD_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/roles/{roleId}": {
      "get": {
        "operationId": "v2-get-role",
        "summary": "Get one role with its permissions",
        "description": "Get one role with its permissions.\n\nRequires the API key permission member:view.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Role"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-role",
        "summary": "Update a role the company owns",
        "description": "Update a role the company owns. Global platform roles answer 404 and cannot be changed here. A \"permissions\" array replaces the role's whole permission set; leave it out to keep the current set.\n\nRequires the API key permission role:manage.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "permissions": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Role"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY, ROLE_UPDATE_INVALID_REQUEST), carries none of name, description or permissions (NO_FIELDS_TO_UPDATE), names permission keys that do not exist (ROLE_PERMISSIONS_UNKNOWN_KEYS), or the write was refused (ROLE_UPDATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the acting user cannot grant admin permissions (ROLE_PERMISSIONS_ADMIN_FORBIDDEN), the permission is Owner-only (ROLE_PERMISSIONS_OWNER_ONLY), the acting user does not hold a permission it adds (ROLE_PERMISSIONS_EXCEED_ACTOR), or a key of the parent organization tried to grant a reserved permission (ROLE_PERMISSIONS_PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No role with this id belongs to the company; global roles answer here too (ROLE_UPDATE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another role in the company already has this name (ROLE_UPDATE_DUPLICATE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The role write failed (ROLE_UPDATE_QUERY_FAILED), or the role was written but could not be read back (ROLE_RELOAD_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-role",
        "summary": "Delete a role the company owns",
        "description": "Delete a role the company owns. A role that still has members answers 400; move those members to another role first. Global platform roles answer 404 because they are not the company's to delete.\n\nRequires the API key permission role:manage.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY, ROLE_DELETE_INVALID_REQUEST), the role still has members (ROLE_DELETE_ASSIGNED_USERS_FORBIDDEN), or the delete was refused (ROLE_DELETE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No role with this id belongs to the company; global roles answer here too (ROLE_DELETE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The delete query failed (ROLE_DELETE_QUERY_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/teams": {
      "get": {
        "operationId": "v2-list-teams",
        "summary": "List the company's teams, each with the userIds of its members",
        "description": "List the company's teams, each with the userIds of its members. Teams group people for sharing connections and Analytics pages; they grant no permission of their own.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission member:view.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, memberUserIds, memberCount, createdBy, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, memberCount, createdBy, createdOn, updatedOn. Default: name,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, memberCount, createdBy, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "memberCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on memberCount: `memberCount=value` matches it exactly. Bracket operators: `memberCount[ne]`, `memberCount[gt]`, `memberCount[gte]`, `memberCount[lt]`, `memberCount[lte]`, and `memberCount[in]` / `memberCount[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-team",
        "summary": "Create an empty team in the company",
        "description": "Create an empty team in the company. The key acts as the user who created it, who is recorded as createdBy. Only a key of the organization manages its teams: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or the request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another team in the company already has this name, ignoring case (TEAM_NAME_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be written right now (COMPANY_TEAM_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/teams/{teamId}": {
      "get": {
        "operationId": "v2-get-team",
        "summary": "Get one team of the company, with the userIds of its members",
        "description": "Get one team of the company, with the userIds of its members.\n\nRequires the API key permission member:view.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-team",
        "summary": "Rename a team",
        "description": "Rename a team. Its members and everything shared with it stay as they are. Change who is on it with Add Team Member and Remove Team Member. Only a key of the organization manages its teams: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or carries no name (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or the request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No team with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another team in the company already has this name, ignoring case (TEAM_NAME_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be written right now (COMPANY_TEAM_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-team",
        "summary": "Delete a team, members included",
        "description": "Delete a team, members included. Every connection share and Analytics share made to the team goes with it: a connection whose share list has an organization entry falls back to it, never to every member. Only a key of the organization manages its teams: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or the request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No team with this id belongs to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be written right now (COMPANY_TEAM_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/teams/{teamId}/members": {
      "get": {
        "operationId": "v2-list-team-members",
        "summary": "List the people on one team, as List Members answers them: name, email, role, and whether their invite is still pending",
        "description": "List the people on one team, as List Members answers them: name, email, role, and whether their invite is still pending.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission member:view.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out. Each item then carries only those keys, whatever its schema requires. Fields: userId, name, email, isPending, roleId, roleName, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: userId, name, email, isPending, roleId, roleName, createdOn. Default: -createdOn,userId."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: userId, name, email, isPending, roleId, roleName, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on userId: `userId=value` matches it exactly. Bracket operators: `userId[ne]`, `userId[gt]`, `userId[gte]`, `userId[lt]`, `userId[lte]`, `userId[contains]`, `userId[starts]`, `userId[ends]`, and `userId[in]` / `userId[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "isPending",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPending: `isPending=value` matches it exactly. Bracket operators: `isPending[ne]`, `isPending[gt]`, `isPending[gte]`, `isPending[lt]`, `isPending[lte]`, and `isPending[in]` / `isPending[nin]` with comma-separated values."
          },
          {
            "name": "roleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleId: `roleId=value` matches it exactly. Bracket operators: `roleId[ne]`, `roleId[gt]`, `roleId[gte]`, `roleId[lt]`, `roleId[lte]`, `roleId[contains]`, `roleId[starts]`, `roleId[ends]`, and `roleId[in]` / `roleId[nin]` with comma-separated values."
          },
          {
            "name": "roleName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleName: `roleName=value` matches it exactly. Bracket operators: `roleName[ne]`, `roleName[gt]`, `roleName[gte]`, `roleName[lt]`, `roleName[lte]`, `roleName[contains]`, `roleName[starts]`, `roleName[ends]`, and `roleName[in]` / `roleName[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Member"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-add-team-member",
        "summary": "Add a member of the company to a team, and answer the member",
        "description": "Add a member of the company to a team, and answer the member. They gain, right away, every connection and Analytics page shared with the team. Anyone with a role in the company can join, a person whose invite is pending included. Adding someone already on the team succeeds and changes nothing. The key acts as the user who created it, who cannot change their own team membership. Only a key of the organization manages its teams: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Member"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the person is the key's own creator (TEAM_MEMBERSHIP_SELF_CHANGE_FORBIDDEN), or the request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No team with this id belongs to the company (NOT_FOUND), or the person is not a member of the company (TEAM_MEMBER_NOT_IN_COMPANY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The person belongs to the company without a role in it, so cannot join a team (TEAM_MEMBER_ROLE_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be written right now (COMPANY_TEAM_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/teams/{teamId}/members/{userId}": {
      "delete": {
        "operationId": "v2-remove-team-member",
        "summary": "Take someone off a team, and answer their userId",
        "description": "Take someone off a team, and answer their userId. They lose, right away, whatever was shared with the team alone; their role and other teams are unchanged. The key acts as the user who created it, who cannot change their own team membership. Only a key of the organization manages its teams: a request through X-Company-Id for another organization is refused.\n\nRequires the API key permission role:manage.",
        "tags": [
          "teams"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), the person is the key's own creator (TEAM_MEMBERSHIP_SELF_CHANGE_FORBIDDEN), or the request acts on another organization through X-Company-Id as its parent organization or through MindCloud staff access (PARENT_DELEGATE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The person is not on this team, or the team does not belong to the company (TEAM_MEMBER_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be written right now (COMPANY_TEAM_UNAVAILABLE). Retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/permissions": {
      "get": {
        "operationId": "v2-list-permissions",
        "summary": "List the permissions roles and API keys are built from: what each one governs, whether a custom role may carry it, whether it is Owner-only, and whether an API key may hold it",
        "description": "List the permissions roles and API keys are built from: what each one governs, whether a custom role may carry it, whether it is Owner-only, and whether an API key may hold it.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires no API key permission.",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out. Each item then carries only those keys, whatever its schema requires. Fields: key, name, area, assignableToCustomRoles, ownerOnly, apiKeyGrantable."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: key, name, area, assignableToCustomRoles, ownerOnly, apiKeyGrantable. Default: key."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: key, name, area, assignableToCustomRoles, ownerOnly, apiKeyGrantable. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on key: `key=value` matches it exactly. Bracket operators: `key[ne]`, `key[gt]`, `key[gte]`, `key[lt]`, `key[lte]`, `key[contains]`, `key[starts]`, `key[ends]`, and `key[in]` / `key[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "area",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on area: `area=value` matches it exactly. Bracket operators: `area[ne]`, `area[gt]`, `area[gte]`, `area[lt]`, `area[lte]`, `area[contains]`, `area[starts]`, `area[ends]`, and `area[in]` / `area[nin]` with comma-separated values."
          },
          {
            "name": "assignableToCustomRoles",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on assignableToCustomRoles: `assignableToCustomRoles=value` matches it exactly. Bracket operators: `assignableToCustomRoles[ne]`, `assignableToCustomRoles[gt]`, `assignableToCustomRoles[gte]`, `assignableToCustomRoles[lt]`, `assignableToCustomRoles[lte]`, and `assignableToCustomRoles[in]` / `assignableToCustomRoles[nin]` with comma-separated values."
          },
          {
            "name": "ownerOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on ownerOnly: `ownerOnly=value` matches it exactly. Bracket operators: `ownerOnly[ne]`, `ownerOnly[gt]`, `ownerOnly[gte]`, `ownerOnly[lt]`, `ownerOnly[lte]`, and `ownerOnly[in]` / `ownerOnly[nin]` with comma-separated values."
          },
          {
            "name": "apiKeyGrantable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on apiKeyGrantable: `apiKeyGrantable=value` matches it exactly. Bracket operators: `apiKeyGrantable[ne]`, `apiKeyGrantable[gt]`, `apiKeyGrantable[gte]`, `apiKeyGrantable[lt]`, `apiKeyGrantable[lte]`, and `apiKeyGrantable[in]` / `apiKeyGrantable[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Permission"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/capabilities": {
      "get": {
        "operationId": "v2-get-capability-catalog",
        "summary": "Describe the Cirra capability keys: what each governs, its default, the key that decides when it is not set, and the values a role and a person may set",
        "description": "Describe the Cirra capability keys: what each governs, its default, the key that decides when it is not set, and the values a role and a person may set. The role decides first: its rule for an action, else its most specific rule for the model and operation, and a deny there always wins; otherwise the most specific rule decides, the person over the role.\n\nRequires no API key permission.",
        "tags": [
          "capabilities"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CapabilityCatalog"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/roles/{roleId}/capabilities": {
      "get": {
        "operationId": "v2-get-role-capabilities",
        "summary": "List the Cirra rules a role sets for its members: allow or deny per capability key",
        "description": "List the Cirra rules a role sets for its members: allow or deny per capability key. Keys it does not set follow the defaults (Get Capability Catalog).\n\nRequires the API key permission member:view.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "member:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoleCapabilities"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-role-capabilities",
        "summary": "Change the Cirra rules a role sets: each key set to allow or deny, or null to clear it so it follows its fallback",
        "description": "Change the Cirra rules a role sets: each key set to allow or deny, or null to clear it so it follows its fallback. Keys not sent keep their rule. Keys and their grammar come from Get Capability Catalog. The key acts as the user who created it: it changes only a role whose permissions its creator and the key both hold.\n\nRequires the API key permission role:manage.",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "apiKey": [
              "role:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "capabilities": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "allow",
                            "deny"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "{ capabilityKey: value }: allow, deny, or null to clear the rule so the key follows its fallback. Keys come from Get Capability Catalog."
                  }
                },
                "required": [
                  "capabilities"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoleCapabilities"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or names a key or value outside the capability catalog (CAPABILITY_RULES_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key has no resolvable acting user (MEMBER_ACTOR_NOT_RESOLVED), or the role grants permissions the acting user does not hold (ROLE_CAPABILITIES_EXCEED_ACTOR), or it is the acting user's own role and they are not an Owner (ROLE_CAPABILITIES_OWN_ROLE_FORBIDDEN), or a key of a parent organization or a MindCloud admin key named the Owner role or a role with a reserved permission (PARENT_DELEGATE_ROLE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No role with this id is available to the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/companies": {
      "get": {
        "operationId": "v2-list-companies",
        "summary": "List every organization this API key can act in, and how it reaches each one (access): its own organization, its child organizations, and, with \"Use this key across all of your organizations\" on, every organization its creator can open in the app",
        "description": "List every organization this API key can act in, and how it reaches each one (access): its own organization, its child organizations, and, with \"Use this key across all of your organizations\" on, every organization its creator can open in the app. Send one of these ids in X-Company-Id. The list is the same whatever X-Company-Id names.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission company:view.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "company:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, timezone, plan, memberCount, isPersonal, isDeleted, subscriptionIsLegacy, subscriptionUpdatedOn, createdOn, updatedOn, access, staffApprovedApps."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, description, timezone, plan, memberCount, isPersonal, isDeleted, subscriptionIsLegacy, subscriptionUpdatedOn, createdOn, updatedOn, access. Default: name."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, description, timezone, plan, memberCount, isPersonal, isDeleted, subscriptionIsLegacy, subscriptionUpdatedOn, createdOn, updatedOn, access. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on timezone: `timezone=value` matches it exactly. Bracket operators: `timezone[ne]`, `timezone[gt]`, `timezone[gte]`, `timezone[lt]`, `timezone[lte]`, `timezone[contains]`, `timezone[starts]`, `timezone[ends]`, and `timezone[in]` / `timezone[nin]` with comma-separated values."
          },
          {
            "name": "plan",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on plan: `plan=value` matches it exactly. Bracket operators: `plan[ne]`, `plan[gt]`, `plan[gte]`, `plan[lt]`, `plan[lte]`, `plan[contains]`, `plan[starts]`, `plan[ends]`, and `plan[in]` / `plan[nin]` with comma-separated values."
          },
          {
            "name": "memberCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on memberCount: `memberCount=value` matches it exactly. Bracket operators: `memberCount[ne]`, `memberCount[gt]`, `memberCount[gte]`, `memberCount[lt]`, `memberCount[lte]`, and `memberCount[in]` / `memberCount[nin]` with comma-separated values."
          },
          {
            "name": "isPersonal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPersonal: `isPersonal=value` matches it exactly. Bracket operators: `isPersonal[ne]`, `isPersonal[gt]`, `isPersonal[gte]`, `isPersonal[lt]`, `isPersonal[lte]`, and `isPersonal[in]` / `isPersonal[nin]` with comma-separated values."
          },
          {
            "name": "isDeleted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDeleted: `isDeleted=value` matches it exactly. Bracket operators: `isDeleted[ne]`, `isDeleted[gt]`, `isDeleted[gte]`, `isDeleted[lt]`, `isDeleted[lte]`, and `isDeleted[in]` / `isDeleted[nin]` with comma-separated values."
          },
          {
            "name": "subscriptionIsLegacy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on subscriptionIsLegacy: `subscriptionIsLegacy=value` matches it exactly. Bracket operators: `subscriptionIsLegacy[ne]`, `subscriptionIsLegacy[gt]`, `subscriptionIsLegacy[gte]`, `subscriptionIsLegacy[lt]`, `subscriptionIsLegacy[lte]`, and `subscriptionIsLegacy[in]` / `subscriptionIsLegacy[nin]` with comma-separated values."
          },
          {
            "name": "subscriptionUpdatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on subscriptionUpdatedOn: `subscriptionUpdatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `subscriptionUpdatedOn[ne]`, `subscriptionUpdatedOn[gt]`, `subscriptionUpdatedOn[gte]`, `subscriptionUpdatedOn[lt]`, `subscriptionUpdatedOn[lte]`, and `subscriptionUpdatedOn[in]` / `subscriptionUpdatedOn[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "name": "access",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "own",
                "child",
                "member",
                "staff",
                "staffLimited",
                "approvalRequired"
              ]
            },
            "description": "Filter on access: `access=value` matches it exactly. Bracket operators: `access[ne]`, `access[gt]`, `access[gte]`, `access[lt]`, `access[lte]`, `access[contains]`, `access[starts]`, `access[ends]`, and `access[in]` / `access[nin]` with comma-separated values."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Search text: organizations whose name contains it, ignoring case, or whose id is exactly it. * is a wildcard."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/companies/{companyId}": {
      "put": {
        "operationId": "v2-update-company",
        "summary": "Update the company name, description, timezone, logo, or domain discovery switch, and answer the company as Get Company does",
        "description": "Update the company name, description, timezone, logo, or domain discovery switch, and answer the company as Get Company does. The path company id must be the company the request acts on: the API key's company, or the one X-Company-Id names.\n\nRequires the API key permission company:edit.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "company:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2048
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "logo": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 512,
                        "format": "starts_with",
                        "pattern": "^https:\\/\\/.*"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "domainDiscovery": {
                    "type": "object",
                    "properties": {
                      "isEnabled": {
                        "type": "boolean",
                        "description": "true lets people who sign up with an email at a company domain find and join it; false turns that off."
                      }
                    },
                    "required": [
                      "isEnabled"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyProfile"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), carries none of name, description, timezone, logo or domainDiscovery (NO_FIELDS_TO_UPDATE), or names an unsupported timezone key (INVALID_TIMEZONE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The path company id is not the company the request acts on (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The company was not found, or is deleted (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another company already has this name (DUPLICATE_COMPANY_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v2-get-company",
        "summary": "Get the company the request acts on: profile, region, parent organization, member and role counts, and the domain discovery and Embedded switches",
        "description": "Get the company the request acts on: profile, region, parent organization, member and role counts, and the domain discovery and Embedded switches. The path company id must be that company: the API key's company, or the one X-Company-Id names.\n\nRequires the API key permission company:view.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "company:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyProfile"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key lacks company:view (API_KEY_PERMISSION_DENIED), or the path company id is not the company the request acts on (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The company was not found, or is deleted (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/environments": {
      "get": {
        "operationId": "v2-list-environments",
        "summary": "List company environments with the number of scheduled workflows targeting each",
        "description": "List company environments with the number of scheduled workflows targeting each. Use environment ids to filter runs.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission company:view.",
        "tags": [
          "environments"
        ],
        "security": [
          {
            "apiKey": [
              "company:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, isDefault, workflowCount, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, isDefault, workflowCount, createdOn. Default: -isDefault,name,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, isDefault, workflowCount, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "isDefault",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDefault: `isDefault=value` matches it exactly. Bracket operators: `isDefault[ne]`, `isDefault[gt]`, `isDefault[gte]`, `isDefault[lt]`, `isDefault[lte]`, and `isDefault[in]` / `isDefault[nin]` with comma-separated values."
          },
          {
            "name": "workflowCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on workflowCount: `workflowCount=value` matches it exactly. Bracket operators: `workflowCount[ne]`, `workflowCount[gt]`, `workflowCount[gte]`, `workflowCount[lt]`, `workflowCount[lte]`, and `workflowCount[in]` / `workflowCount[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Environment"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-environment",
        "summary": "Create an environment, such as Staging",
        "description": "Create an environment, such as Staging. Names are unique in the company, ignoring case.\n\nRequires the API key permission environment:edit.",
        "tags": [
          "environments"
        ],
        "security": [
          {
            "apiKey": [
              "environment:edit"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Environment"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY, ENVIRONMENT_NAME_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The company already has an environment with this name (ENVIRONMENT_NAME_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/environments/{environmentId}": {
      "put": {
        "operationId": "v2-update-environment",
        "summary": "Rename an environment",
        "description": "Rename an environment. Production and Sandbox, the built-in environments, keep their names.\n\nRequires the API key permission environment:edit.",
        "tags": [
          "environments"
        ],
        "security": [
          {
            "apiKey": [
              "environment:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "environmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Environment"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY, ENVIRONMENT_NAME_REQUIRED), or the environment is built in (ENVIRONMENT_PREDEFINED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No environment with this id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Another environment of the company has this name (ENVIRONMENT_NAME_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-environment",
        "summary": "Delete an environment",
        "description": "Delete an environment. The built-in environments (Production, Sandbox) cannot be deleted, nor can one that Cirra workflows still use.\n\nRequires the API key permission environment:edit.",
        "tags": [
          "environments"
        ],
        "security": [
          {
            "apiKey": [
              "environment:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "environmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The environment is built in (ENVIRONMENT_PREDEFINED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No environment with this id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Cirra workflows still use the environment (ENVIRONMENT_IN_USE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/api-keys": {
      "get": {
        "operationId": "v2-list-api-keys",
        "summary": "List API keys for the company, and the live all-organizations keys (isAllOrganizations) of other organizations made by the calling key's creator or by a member of this one with a role, read-only (companyId names where each lives): name, last use, and revocation state",
        "description": "List API keys for the company, and the live all-organizations keys (isAllOrganizations) of other organizations made by the calling key's creator or by a member of this one with a role, read-only (companyId names where each lives): name, last use, and revocation state. Key material is never included.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "api-keys"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, companyId, isAllOrganizations, accessLevel, permissions, usedOn, revokedOn, createdOn, createdBy, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, companyId, isAllOrganizations, accessLevel, usedOn, revokedOn, createdOn, createdBy, updatedOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, companyId, isAllOrganizations, accessLevel, usedOn, revokedOn, createdOn, createdBy, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "companyId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on companyId: `companyId=value` matches it exactly. Bracket operators: `companyId[ne]`, `companyId[gt]`, `companyId[gte]`, `companyId[lt]`, `companyId[lte]`, `companyId[contains]`, `companyId[starts]`, `companyId[ends]`, and `companyId[in]` / `companyId[nin]` with comma-separated values."
          },
          {
            "name": "isAllOrganizations",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isAllOrganizations: `isAllOrganizations=value` matches it exactly. Bracket operators: `isAllOrganizations[ne]`, `isAllOrganizations[gt]`, `isAllOrganizations[gte]`, `isAllOrganizations[lt]`, `isAllOrganizations[lte]`, and `isAllOrganizations[in]` / `isAllOrganizations[nin]` with comma-separated values."
          },
          {
            "name": "accessLevel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "read_only",
                "run_workflows",
                "full_access",
                "none"
              ]
            },
            "description": "Filter on accessLevel: `accessLevel=value` matches it exactly. Bracket operators: `accessLevel[ne]`, `accessLevel[gt]`, `accessLevel[gte]`, `accessLevel[lt]`, `accessLevel[lte]`, `accessLevel[contains]`, `accessLevel[starts]`, `accessLevel[ends]`, and `accessLevel[in]` / `accessLevel[nin]` with comma-separated values."
          },
          {
            "name": "usedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on usedOn: `usedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `usedOn[ne]`, `usedOn[gt]`, `usedOn[gte]`, `usedOn[lt]`, `usedOn[lte]`, and `usedOn[in]` / `usedOn[nin]` with comma-separated values."
          },
          {
            "name": "revokedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on revokedOn: `revokedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `revokedOn[ne]`, `revokedOn[gt]`, `revokedOn[gte]`, `revokedOn[lt]`, `revokedOn[lte]`, and `revokedOn[in]` / `revokedOn[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiKeySummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-api-key",
        "summary": "Create an API key for the company with an explicit set of permissions, all within the calling key's own",
        "description": "Create an API key for the company with an explicit set of permissions, all within the calling key's own. The key material is returned once, in this response, and can never be retrieved again.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "api-keys"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "permissions": {
                    "maxItems": 36,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "workflow:view",
                        "workflow:create",
                        "workflow:edit",
                        "workflow:delete",
                        "workflow:run",
                        "log:view",
                        "credential:view",
                        "credential:create",
                        "credential:edit",
                        "credential:delete",
                        "universal:read",
                        "universal:create",
                        "universal:update",
                        "universal:delete",
                        "member:view",
                        "member:create",
                        "member:edit",
                        "member:delete",
                        "member:owner_edit",
                        "role:manage",
                        "company:view",
                        "company:edit",
                        "environment:edit",
                        "company:parent:manage",
                        "subscription:view",
                        "subscription:manage",
                        "api_key:manage",
                        "embedded:view",
                        "embedded:create",
                        "embedded:edit",
                        "embedded:delete",
                        "analytics:page:view",
                        "analytics:page:create",
                        "analytics:page:edit",
                        "child_company:access",
                        "child_company:manage"
                      ],
                      "x-enumDescriptions": {
                        "workflow:view": "Workflows: View workflows.",
                        "workflow:create": "Workflows: Create workflows.",
                        "workflow:edit": "Workflows: Edit workflows.",
                        "workflow:delete": "Workflows: Delete workflows.",
                        "workflow:run": "Workflows: Run and cancel workflows.",
                        "log:view": "Runs: View runs and logs.",
                        "credential:view": "Connections: View connections.",
                        "credential:create": "Connections: Create connections and connect links.",
                        "credential:edit": "Connections: Edit, reconnect, and test connections.",
                        "credential:delete": "Connections: Delete connections.",
                        "universal:read": "Universal API: Run read actions and lookups.",
                        "universal:create": "Universal API: Run create actions.",
                        "universal:update": "Universal API: Run update actions.",
                        "universal:delete": "Universal API: Run delete actions.",
                        "member:view": "Members and roles: View members and roles.",
                        "member:create": "Members and roles: Invite members.",
                        "member:edit": "Members and roles: Change member roles.",
                        "member:delete": "Members and roles: Remove members.",
                        "member:owner_edit": "Members and roles: Invite, change, or remove Owners.",
                        "role:manage": "Members and roles: Create, edit, and delete roles.",
                        "company:view": "Company: View company and environments.",
                        "company:edit": "Company: Edit company profile.",
                        "environment:edit": "Company: Create, edit, and delete environments.",
                        "company:parent:manage": "Company: Accept, decline, or leave a parent organization.",
                        "subscription:view": "Company: View usage and spend limits.",
                        "subscription:manage": "Company: Set member spend limits.",
                        "api_key:manage": "API keys: See and revoke all API keys.",
                        "embedded:view": "Embedded: View end users and their connections.",
                        "embedded:create": "Embedded: Create end users and connect links.",
                        "embedded:edit": "Embedded: Edit end users.",
                        "embedded:delete": "Embedded: Delete end users.",
                        "analytics:page:view": "Analytics: View Analytics pages, panels and data sources.",
                        "analytics:page:create": "Analytics: Create Analytics pages and manage data sources, publications, themes, folder shares and template installs.",
                        "analytics:page:edit": "Analytics: Edit, publish, share and delete Analytics pages.",
                        "child_company:access": "Child organizations: Act in child organizations.",
                        "child_company:manage": "Child organizations: Create, link, release, and close child organizations."
                      }
                    }
                  },
                  "accessLevel": {
                    "type": "string",
                    "enum": [
                      "read_only",
                      "run_workflows",
                      "full_access"
                    ]
                  },
                  "isAllOrganizations": {
                    "description": "\"Use this key across all of your organizations\". Only a key that has it may give it.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiKey"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or it sends both permissions and accessLevel (API_KEY_PERMISSIONS_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The calling key lacks api_key:manage (API_KEY_PERMISSION_DENIED), the new key would hold a permission the calling key cannot use (API_KEY_PERMISSION_EXCEEDS_ACTOR), or isAllOrganizations is sent by a key without it (API_KEY_ALL_ORGANIZATIONS_EXCEEDS_ACTOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/api-keys/{apiKeyId}": {
      "delete": {
        "operationId": "v2-revoke-api-key",
        "summary": "Revoke an API key",
        "description": "Revoke an API key. The key stops working immediately. Revoking an already revoked key changes nothing and succeeds.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "api-keys"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "apiKeyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v2-get-api-key",
        "summary": "Get one API key of the company, or one of the calling key creator's own all-organizations keys: its permissions, last use, and revocation state",
        "description": "Get one API key of the company, or one of the calling key creator's own all-organizations keys: its permissions, last use, and revocation state. Key material is never included.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "api-keys"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "apiKeyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiKeySummary"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-api-key",
        "summary": "Rename an API key or replace its permissions",
        "description": "Rename an API key or replace its permissions. Only keys made by the calling key's creator can be changed. A permissions array replaces the whole set: each permission it adds must be one the calling key holds and its creator still holds (removing is always allowed), so a key can never make a key stronger than itself. A revoked key cannot be changed.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "api-keys"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "apiKeyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "permissions": {
                    "maxItems": 36,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "workflow:view",
                        "workflow:create",
                        "workflow:edit",
                        "workflow:delete",
                        "workflow:run",
                        "log:view",
                        "credential:view",
                        "credential:create",
                        "credential:edit",
                        "credential:delete",
                        "universal:read",
                        "universal:create",
                        "universal:update",
                        "universal:delete",
                        "member:view",
                        "member:create",
                        "member:edit",
                        "member:delete",
                        "member:owner_edit",
                        "role:manage",
                        "company:view",
                        "company:edit",
                        "environment:edit",
                        "company:parent:manage",
                        "subscription:view",
                        "subscription:manage",
                        "api_key:manage",
                        "embedded:view",
                        "embedded:create",
                        "embedded:edit",
                        "embedded:delete",
                        "analytics:page:view",
                        "analytics:page:create",
                        "analytics:page:edit",
                        "child_company:access",
                        "child_company:manage"
                      ],
                      "x-enumDescriptions": {
                        "workflow:view": "Workflows: View workflows.",
                        "workflow:create": "Workflows: Create workflows.",
                        "workflow:edit": "Workflows: Edit workflows.",
                        "workflow:delete": "Workflows: Delete workflows.",
                        "workflow:run": "Workflows: Run and cancel workflows.",
                        "log:view": "Runs: View runs and logs.",
                        "credential:view": "Connections: View connections.",
                        "credential:create": "Connections: Create connections and connect links.",
                        "credential:edit": "Connections: Edit, reconnect, and test connections.",
                        "credential:delete": "Connections: Delete connections.",
                        "universal:read": "Universal API: Run read actions and lookups.",
                        "universal:create": "Universal API: Run create actions.",
                        "universal:update": "Universal API: Run update actions.",
                        "universal:delete": "Universal API: Run delete actions.",
                        "member:view": "Members and roles: View members and roles.",
                        "member:create": "Members and roles: Invite members.",
                        "member:edit": "Members and roles: Change member roles.",
                        "member:delete": "Members and roles: Remove members.",
                        "member:owner_edit": "Members and roles: Invite, change, or remove Owners.",
                        "role:manage": "Members and roles: Create, edit, and delete roles.",
                        "company:view": "Company: View company and environments.",
                        "company:edit": "Company: Edit company profile.",
                        "environment:edit": "Company: Create, edit, and delete environments.",
                        "company:parent:manage": "Company: Accept, decline, or leave a parent organization.",
                        "subscription:view": "Company: View usage and spend limits.",
                        "subscription:manage": "Company: Set member spend limits.",
                        "api_key:manage": "API keys: See and revoke all API keys.",
                        "embedded:view": "Embedded: View end users and their connections.",
                        "embedded:create": "Embedded: Create end users and connect links.",
                        "embedded:edit": "Embedded: Edit end users.",
                        "embedded:delete": "Embedded: Delete end users.",
                        "analytics:page:view": "Analytics: View Analytics pages, panels and data sources.",
                        "analytics:page:create": "Analytics: Create Analytics pages and manage data sources, publications, themes, folder shares and template installs.",
                        "analytics:page:edit": "Analytics: Edit, publish, share and delete Analytics pages.",
                        "child_company:access": "Child organizations: Act in child organizations.",
                        "child_company:manage": "Child organizations: Create, link, release, and close child organizations."
                      }
                    }
                  },
                  "isAllOrganizations": {
                    "description": "\"Use this key across all of your organizations\". Only a key that has it may turn it on.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ApiKeySummary"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or carries none of name, permissions and isAllOrganizations (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The calling key lacks api_key:manage (API_KEY_PERMISSION_DENIED), the change adds a permission the calling key cannot use (API_KEY_PERMISSION_EXCEEDS_ACTOR), or a key without isAllOrganizations turns it on or renames or adds permissions to a key that has it (API_KEY_ALL_ORGANIZATIONS_EXCEEDS_ACTOR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No live key with this id in the company was made by the calling key's creator (API_KEY_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/me": {
      "get": {
        "operationId": "v2-get-me",
        "summary": "Describe the calling API key, its effective company scope, and which MindCloud capabilities that company has enabled",
        "description": "Describe the calling API key, its effective company scope, and which MindCloud capabilities that company has enabled. Useful to verify credentials.\n\nRequires no API key permission.",
        "tags": [
          "me"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/usage": {
      "get": {
        "operationId": "v2-get-usage",
        "summary": "Get the company task usage summary for the current accounting period (trailing 30 days): used tasks, task limit, and soft-limit flag",
        "description": "Get the company task usage summary for the current accounting period (trailing 30 days): used tasks, task limit, and soft-limit flag.\n\nRequires the API key permission subscription:view.",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "apiKey": [
              "subscription:view"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UsageSummary"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/usage/daily": {
      "get": {
        "operationId": "v2-get-usage-daily",
        "summary": "Get the daily task usage series",
        "description": "Get the daily task usage series. Defaults to the trailing 30 days; pass from/to (YYYY-MM-DD) to re-window. The window is capped at 45 days.\n\nRequires the API key permission subscription:view.",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "apiKey": [
              "subscription:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DailyUsage"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/usage/workflows": {
      "get": {
        "operationId": "v2-get-usage-workflows",
        "summary": "Get task usage broken down by workflow, highest first",
        "description": "Get task usage broken down by workflow, highest first. Embedded usage is broken down further by installation inside each workflow. Defaults to the trailing 30 days; pass from/to (YYYY-MM-DD) to re-window. The window is capped at 45 days.\n\nRequires the API key permission subscription:view.",
        "tags": [
          "usage"
        ],
        "security": [
          {
            "apiKey": [
              "subscription:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowUsage"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/universal/apps": {
      "get": {
        "operationId": "v2-list-universal-apps",
        "summary": "List published Universal API apps that have executable actions, and with includeBuiltins=true the built-in workflow step types",
        "description": "List published Universal API apps that have executable actions, and with includeBuiltins=true the built-in workflow step types. With actionQ, meta.suggestedAction names the one action that clearly matches it.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires no API key permission.",
        "tags": [
          "universal"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, slug, icon, category, type, aliases, publishedVersion, actionsTotal, actionSlugsPreview, kind, usableAsStep, usableAsTrigger."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, slug, icon, category, type, publishedVersion, actionsTotal, kind, usableAsStep, usableAsTrigger. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, slug, icon, category, type, publishedVersion, actionsTotal, kind, usableAsStep, usableAsTrigger. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on slug: `slug=value` matches it exactly. Bracket operators: `slug[ne]`, `slug[gt]`, `slug[gte]`, `slug[lt]`, `slug[lte]`, `slug[contains]`, `slug[starts]`, `slug[ends]`, and `slug[in]` / `slug[nin]` with comma-separated values."
          },
          {
            "name": "icon",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on icon: `icon=value` matches it exactly. Bracket operators: `icon[ne]`, `icon[gt]`, `icon[gte]`, `icon[lt]`, `icon[lte]`, `icon[contains]`, `icon[starts]`, `icon[ends]`, and `icon[in]` / `icon[nin]` with comma-separated values."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on category: `category=value` matches it exactly. Bracket operators: `category[ne]`, `category[gt]`, `category[gte]`, `category[lt]`, `category[lte]`, `category[contains]`, `category[starts]`, `category[ends]`, and `category[in]` / `category[nin]` with comma-separated values."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on type: `type=value` matches it exactly. Bracket operators: `type[ne]`, `type[gt]`, `type[gte]`, `type[lt]`, `type[lte]`, `type[contains]`, `type[starts]`, `type[ends]`, and `type[in]` / `type[nin]` with comma-separated values."
          },
          {
            "name": "publishedVersion",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on publishedVersion: `publishedVersion=value` matches it exactly. Bracket operators: `publishedVersion[ne]`, `publishedVersion[gt]`, `publishedVersion[gte]`, `publishedVersion[lt]`, `publishedVersion[lte]`, `publishedVersion[contains]`, `publishedVersion[starts]`, `publishedVersion[ends]`, and `publishedVersion[in]` / `publishedVersion[nin]` with comma-separated values."
          },
          {
            "name": "actionsTotal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on actionsTotal: `actionsTotal=value` matches it exactly. Bracket operators: `actionsTotal[ne]`, `actionsTotal[gt]`, `actionsTotal[gte]`, `actionsTotal[lt]`, `actionsTotal[lte]`, and `actionsTotal[in]` / `actionsTotal[nin]` with comma-separated values."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "app",
                "builtin"
              ]
            },
            "description": "Filter on kind: `kind=value` matches it exactly. Bracket operators: `kind[ne]`, `kind[gt]`, `kind[gte]`, `kind[lt]`, `kind[lte]`, `kind[contains]`, `kind[starts]`, `kind[ends]`, and `kind[in]` / `kind[nin]` with comma-separated values."
          },
          {
            "name": "usableAsStep",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on usableAsStep: `usableAsStep=value` matches it exactly. Bracket operators: `usableAsStep[ne]`, `usableAsStep[gt]`, `usableAsStep[gte]`, `usableAsStep[lt]`, `usableAsStep[lte]`, and `usableAsStep[in]` / `usableAsStep[nin]` with comma-separated values."
          },
          {
            "name": "usableAsTrigger",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on usableAsTrigger: `usableAsTrigger=value` matches it exactly. Bracket operators: `usableAsTrigger[ne]`, `usableAsTrigger[gt]`, `usableAsTrigger[gte]`, `usableAsTrigger[lt]`, `usableAsTrigger[lte]`, and `usableAsTrigger[in]` / `usableAsTrigger[nin]` with comma-separated values."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional app search text matched against name, slug, category, type, and aliases."
          },
          {
            "name": "actionQ",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional action intent search text. When there is one clear deterministic match, meta.suggestedAction names it without using AI."
          },
          {
            "name": "includeBuiltins",
            "in": "query",
            "required": false,
            "schema": {
              "default": "false",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "true adds the built-in workflow step types (kind builtin: If, Iterate, Schedule, Webhook, ...). They are workflow building blocks with no Universal actions to run. Defaults to false."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UniversalApp"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/universal/apps/{appSlug}/actions": {
      "get": {
        "operationId": "v2-list-universal-actions",
        "summary": "List published Universal API actions with the appSlug, appVersion, and actionSlug needed to run them",
        "description": "List published Universal API actions with the appSlug, appVersion, and actionSlug needed to run them.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires no API key permission.",
        "tags": [
          "universal"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, appSlug, appVersion, actionSlug, name, kind, method, operation, supports, queryCapabilities, requiredArguments, optionalArguments, responseFields, slugConflict, appId, appName, description, model, controls, responseSchema, isSchemaDynamic, capabilityKey, actionCapabilityKey."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, appSlug, appVersion, actionSlug, name, kind, method, operation, slugConflict, appId, appName, description, model, isSchemaDynamic, capabilityKey, actionCapabilityKey. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, appSlug, appVersion, actionSlug, name, kind, method, operation, slugConflict, appId, appName, description, model, isSchemaDynamic, capabilityKey, actionCapabilityKey. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "appVersion",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appVersion: `appVersion=value` matches it exactly. Bracket operators: `appVersion[ne]`, `appVersion[gt]`, `appVersion[gte]`, `appVersion[lt]`, `appVersion[lte]`, `appVersion[contains]`, `appVersion[starts]`, `appVersion[ends]`, and `appVersion[in]` / `appVersion[nin]` with comma-separated values."
          },
          {
            "name": "actionSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionSlug: `actionSlug=value` matches it exactly. Bracket operators: `actionSlug[ne]`, `actionSlug[gt]`, `actionSlug[gte]`, `actionSlug[lt]`, `actionSlug[lte]`, `actionSlug[contains]`, `actionSlug[starts]`, `actionSlug[ends]`, and `actionSlug[in]` / `actionSlug[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "action",
                "trigger"
              ]
            },
            "description": "Filter on kind: `kind=value` matches it exactly. Bracket operators: `kind[ne]`, `kind[gt]`, `kind[gte]`, `kind[lt]`, `kind[lte]`, `kind[contains]`, `kind[starts]`, `kind[ends]`, and `kind[in]` / `kind[nin]` with comma-separated values."
          },
          {
            "name": "method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on method: `method=value` matches it exactly. Bracket operators: `method[ne]`, `method[gt]`, `method[gte]`, `method[lt]`, `method[lte]`, `method[contains]`, `method[starts]`, `method[ends]`, and `method[in]` / `method[nin]` with comma-separated values."
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on operation: `operation=value` matches it exactly. Bracket operators: `operation[ne]`, `operation[gt]`, `operation[gte]`, `operation[lt]`, `operation[lte]`, `operation[contains]`, `operation[starts]`, `operation[ends]`, and `operation[in]` / `operation[nin]` with comma-separated values."
          },
          {
            "name": "slugConflict",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on slugConflict: `slugConflict=value` matches it exactly. Bracket operators: `slugConflict[ne]`, `slugConflict[gt]`, `slugConflict[gte]`, `slugConflict[lt]`, `slugConflict[lte]`, and `slugConflict[in]` / `slugConflict[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "appName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appName: `appName=value` matches it exactly. Bracket operators: `appName[ne]`, `appName[gt]`, `appName[gte]`, `appName[lt]`, `appName[lte]`, `appName[contains]`, `appName[starts]`, `appName[ends]`, and `appName[in]` / `appName[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on model: `model=value` matches it exactly. Bracket operators: `model[ne]`, `model[gt]`, `model[gte]`, `model[lt]`, `model[lte]`, `model[contains]`, `model[starts]`, `model[ends]`, and `model[in]` / `model[nin]` with comma-separated values."
          },
          {
            "name": "isSchemaDynamic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isSchemaDynamic: `isSchemaDynamic=value` matches it exactly. Bracket operators: `isSchemaDynamic[ne]`, `isSchemaDynamic[gt]`, `isSchemaDynamic[gte]`, `isSchemaDynamic[lt]`, `isSchemaDynamic[lte]`, and `isSchemaDynamic[in]` / `isSchemaDynamic[nin]` with comma-separated values."
          },
          {
            "name": "capabilityKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on capabilityKey: `capabilityKey=value` matches it exactly. Bracket operators: `capabilityKey[ne]`, `capabilityKey[gt]`, `capabilityKey[gte]`, `capabilityKey[lt]`, `capabilityKey[lte]`, `capabilityKey[contains]`, `capabilityKey[starts]`, `capabilityKey[ends]`, and `capabilityKey[in]` / `capabilityKey[nin]` with comma-separated values."
          },
          {
            "name": "actionCapabilityKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionCapabilityKey: `actionCapabilityKey=value` matches it exactly. Bracket operators: `actionCapabilityKey[ne]`, `actionCapabilityKey[gt]`, `actionCapabilityKey[gte]`, `actionCapabilityKey[lt]`, `actionCapabilityKey[lte]`, `actionCapabilityKey[contains]`, `actionCapabilityKey[starts]`, `actionCapabilityKey[ends]`, and `actionCapabilityKey[in]` / `actionCapabilityKey[nin]` with comma-separated values."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "latest",
              "type": "string"
            },
            "description": "App version to search. Defaults to latest."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional action search text matched against app, action, description, operation, and model."
          },
          {
            "name": "verbosity",
            "in": "query",
            "required": false,
            "schema": {
              "default": "compact",
              "type": "string",
              "enum": [
                "compact",
                "full"
              ]
            },
            "description": "How much action metadata to return. compact is optimized for agent search; full adds descriptions, the model, controls, and the response schema when available."
          },
          {
            "name": "includeArguments",
            "in": "query",
            "required": false,
            "schema": {
              "default": "required",
              "type": "string",
              "enum": [
                "none",
                "required",
                "all"
              ]
            },
            "description": "How many action argument hints to include. required is the default to support simple one-call execution."
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UniversalAction"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/universal/apps/{appSlug}/actions/{actionSlug}": {
      "get": {
        "operationId": "v2-get-universal-action",
        "summary": "Get detailed argument and response schema metadata for one Universal API action",
        "description": "Get detailed argument and response schema metadata for one Universal API action.\n\nRequires no API key permission.",
        "tags": [
          "universal"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The app, by its slug (\"slack\") or its id."
            }
          },
          {
            "name": "actionSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The action, by its docs-style slug (\"send-channel-message\") or its id."
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "latest",
              "description": "The app version to inspect. Defaults to latest.",
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Comma-separated fields to select from the action schema response.",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UniversalActionDetail"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Universal action not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Universal action slug conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/universal/apps/{appSlug}/actions/{actionSlug}/lookups/{argumentKey}": {
      "get": {
        "operationId": "v2-resolve-universal-lookup",
        "summary": "Resolve a Universal API lookup/list argument to the canonical API value without using AI",
        "description": "Resolve a Universal API lookup/list argument to the canonical API value without using AI.\n\nRequires the API key permission universal:read.",
        "tags": [
          "universal"
        ],
        "security": [
          {
            "apiKey": [
              "universal:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "appSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The app, by its slug (\"slack\") or its id."
            }
          },
          {
            "name": "actionSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The action, by its docs-style slug (\"send-channel-message\") or its id."
            }
          },
          {
            "name": "argumentKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The lookup-backed argument key to resolve."
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "default": "latest",
              "description": "The app version to inspect. Defaults to latest.",
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Search text to resolve, for example a channel, user, customer, or project name.",
              "type": "string"
            }
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The public MindCloud connection ID to use when the lookup source requires authentication.",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "endUserId",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Use only connections owned by this embedded end user. The API key company must own the end user.",
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Maximum lookup rows to request from the source action (1-200, default 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Lookup row offset when supported by the source action.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UniversalLookup"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or connection selection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Embedded access is disabled, the API key company scope does not match, or an Embedded end user, or a connection one owns, was selected under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Action, lookup, or connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "UNIVERSAL_ACTION_SLUG_CONFLICT or CONNECTION_CHOICE_REQUIRED. Multiple usable end-user accounts require a public connectionId; error.details.candidates lists them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniversalConflictErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "MindCloud could not run the lookup action (INTERNAL_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The provider answered the lookup action with a failure (PROVIDER_ERROR). error.details.reason is the provider's code and error.details.provider.status its HTTP status. MindCloud's own refusals answer 400, 403, 404, or 409 instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Embedded scope or connection storage is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/universal/apps/{appSlug}/actions/{actionSlug}/run": {
      "post": {
        "operationId": "v2-run-universal-action",
        "summary": "Run one Universal API action using a company connection, an embedded installation, or a connected account owned by an embedded end user",
        "description": "Run one Universal API action using a company connection, an embedded installation, or a connected account owned by an embedded end user.\n\nRequires the Universal permission for the action's declared operation: universal:read, universal:create, universal:update, or universal:delete (all four when the action declares none).",
        "tags": [
          "universal"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "appSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The app, by its slug (\"slack\") or its id."
            }
          },
          {
            "name": "actionSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The action, by its docs-style slug (\"send-channel-message\") or its id."
            }
          },
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arguments": {
                    "description": "{ argumentKey: value } for the action, keyed as Get Universal Action lists them (requiredArguments and optionalArguments). Resolve a lookup argument with Resolve Universal Lookup.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "version": {
                    "default": "latest",
                    "type": "string"
                  },
                  "connectionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endUserId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "options": {
                    "description": "{ optionKey: value } for the options the action defines, as Get Universal Action lists them. Most actions take none.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "fields": {
                    "type": "string"
                  },
                  "limit": {
                    "type": [
                      "string",
                      "number"
                    ]
                  },
                  "offset": {
                    "type": [
                      "string",
                      "number"
                    ]
                  },
                  "sort": {
                    "type": "string"
                  },
                  "where": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UniversalActionResult"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request, file input, cancelled transfer, or connection selection (including installations whose end user has not connected the app).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Embedded access is disabled, the API key company scope does not match, or an Embedded end user or installation, or a connection one owns, was selected under X-Company-Id (CHILD_SCOPE_FORBIDDEN, COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Universal action, connection, or installation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "UNIVERSAL_ACTION_SLUG_CONFLICT or CONNECTION_CHOICE_REQUIRED. Multiple usable end-user accounts require a public connectionId; error.details.candidates lists them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UniversalConflictErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "A decoded file or the aggregate file inputs exceed the action limit (PAYLOAD_TOO_LARGE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "MindCloud could not run the action (INTERNAL_ERROR, for example UNEXPECTED_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The provider answered with a failure (PROVIDER_ERROR). error.details.reason is the provider's code and error.details.provider.status its HTTP status. MindCloud's own refusals before the provider call answer 400, 403, 404, or 409 instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Embedded scope, connection storage, or the Universal action policy is unavailable, or the file transfer exceeded its time or stall limit. Check the provider before retrying when remote completion is unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/embedded/end-users/{endUserId}/connect-links": {
      "post": {
        "operationId": "v2-create-embedded-connect-link",
        "summary": "Create a single-use hosted link for one end user to connect an available app or repair an owned connection",
        "description": "Create a single-use hosted link for one end user to connect an available app or repair an owned connection. Requires the embedded:create permission and a configured app integration or Embedded API catalog access.\n\nRequires the API key permission embedded:create.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The MindCloud end user ID returned by POST /v1/users."
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "app": {
                    "description": "The published app to connect, by its id or slug.",
                    "type": "string",
                    "minLength": 1
                  },
                  "appRef": {
                    "description": "The older name of app, still accepted.",
                    "type": "string",
                    "minLength": 1
                  },
                  "connectionId": {
                    "description": "The exact public connection ID owned by this end user. SDK accounts update in place. Provisioned accounts without an installation create a new SDK account; reload connections and use its new ID.",
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConnectLink"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "API key access, company scope, or app access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "End user, available app, or owned connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "API key or end-user connect-link budget exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Scope, catalog, or connection setup unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/embedded/end-users/{endUserId}/connections": {
      "get": {
        "operationId": "v2-list-embedded-end-user-connections",
        "summary": "List the non-secret app accounts owned by one end user in the API key company",
        "description": "List the non-secret app accounts owned by one end user in the API key company. Existing accounts remain visible when Embedded API catalog access is off.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission embedded:view.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, appSlug, appName, label, status, connectedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, appSlug, appName, label, status, connectedOn. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, appSlug, appName, label, status, connectedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "appSlug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appSlug: `appSlug=value` matches it exactly. Bracket operators: `appSlug[ne]`, `appSlug[gt]`, `appSlug[gte]`, `appSlug[lt]`, `appSlug[lte]`, `appSlug[contains]`, `appSlug[starts]`, `appSlug[ends]`, and `appSlug[in]` / `appSlug[nin]` with comma-separated values."
          },
          {
            "name": "appName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appName: `appName=value` matches it exactly. Bracket operators: `appName[ne]`, `appName[gt]`, `appName[gte]`, `appName[lt]`, `appName[lte]`, `appName[contains]`, `appName[starts]`, `appName[ends]`, and `appName[in]` / `appName[nin]` with comma-separated values."
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on label: `label=value` matches it exactly. Bracket operators: `label[ne]`, `label[gt]`, `label[gte]`, `label[lt]`, `label[lte]`, `label[contains]`, `label[starts]`, `label[ends]`, and `label[in]` / `label[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "connectedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on connectedOn: `connectedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `connectedOn[ne]`, `connectedOn[gt]`, `connectedOn[gte]`, `connectedOn[lt]`, `connectedOn[lte]`, and `connectedOn[in]` / `connectedOn[nin]` with comma-separated values."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EmbeddedConnection"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/embedded/end-users": {
      "get": {
        "operationId": "v2-list-end-users",
        "summary": "List the company's Embedded end users, newest first",
        "description": "List the company's Embedded end users, newest first. Find one by your own id with externalId=…. Only the key's own company.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission embedded:view.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, externalId, name, email, metadata, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, externalId, name, email, createdOn, updatedOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, externalId, name, email, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "externalId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on externalId: `externalId=value` matches it exactly. Bracket operators: `externalId[ne]`, `externalId[gt]`, `externalId[gte]`, `externalId[lt]`, `externalId[lte]`, `externalId[contains]`, `externalId[starts]`, `externalId[ends]`, and `externalId[in]` / `externalId[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndUser"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-end-user",
        "summary": "Create an Embedded end user: someone in your product who connects their own accounts",
        "description": "Create an Embedded end user: someone in your product who connects their own accounts. Only the key's own company.\n\nRequires the API key permission embedded:create.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:create"
            ]
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 48
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256,
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "metadata": {
                    "description": "Host variables for credential exchange: { name: value }, each value a host label (letters, digits and hyphens, up to 63 characters), such as { \"environment\": \"eu1\" }.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 63
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EndUser"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or a metadata value is not a host label (END_USER_METADATA_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/embedded/end-users/{endUserId}": {
      "get": {
        "operationId": "v2-get-end-user",
        "summary": "Get one Embedded end user of the company",
        "description": "Get one Embedded end user of the company. Only the key's own company.\n\nRequires the API key permission embedded:view.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EndUser"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-end-user",
        "summary": "Change an Embedded end user: only the attributes sent; metadata replaces the current values whole",
        "description": "Change an Embedded end user: only the attributes sent; metadata replaces the current values whole. Only the key's own company.\n\nRequires the API key permission embedded:edit.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 48
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 256,
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "metadata": {
                    "description": "Host variables for credential exchange: { name: value }, each value a host label (letters, digits and hyphens, up to 63 characters), such as { \"environment\": \"eu1\" }.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 63
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EndUser"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), carries nothing to change (NO_FIELDS_TO_UPDATE), or a metadata value is not a host label (END_USER_METADATA_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No end user with this id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-end-user",
        "summary": "Delete an Embedded end user that nothing depends on any more",
        "description": "Delete an Embedded end user that nothing depends on any more. One that still has connections, installations, or a member mapped to it answers 409 with what remains: delete its connections first (Delete Connection). Only the key's own company.\n\nRequires the API key permission embedded:delete.",
        "tags": [
          "embedded"
        ],
        "security": [
          {
            "apiKey": [
              "embedded:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "endUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No end user with this id is in the company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Connections, installations, or members still depend on the end user (END_USER_IN_USE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/child-companies": {
      "get": {
        "operationId": "v2-list-child-companies",
        "summary": "List the child organizations of the key's company",
        "description": "List the child organizations of the key's company. Send a child's id in X-Company-Id to call any other v2 endpoint on it with this key. Requires child_company:access on the key and its creator.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission child_company:access.",
        "tags": [
          "child-companies"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:access"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, origin, linkedOn, memberCount, ownerCount."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, description, origin, linkedOn, memberCount, ownerCount. Default: -linkedOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, description, origin, linkedOn, memberCount, ownerCount. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "created",
                "linked"
              ]
            },
            "description": "Filter on origin: `origin=value` matches it exactly. Bracket operators: `origin[ne]`, `origin[gt]`, `origin[gte]`, `origin[lt]`, `origin[lte]`, `origin[contains]`, `origin[starts]`, `origin[ends]`, and `origin[in]` / `origin[nin]` with comma-separated values."
          },
          {
            "name": "linkedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on linkedOn: `linkedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `linkedOn[ne]`, `linkedOn[gt]`, `linkedOn[gte]`, `linkedOn[lt]`, `linkedOn[lte]`, and `linkedOn[in]` / `linkedOn[nin]` with comma-separated values."
          },
          {
            "name": "memberCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on memberCount: `memberCount=value` matches it exactly. Bracket operators: `memberCount[ne]`, `memberCount[gt]`, `memberCount[gte]`, `memberCount[lt]`, `memberCount[lte]`, and `memberCount[in]` / `memberCount[nin]` with comma-separated values."
          },
          {
            "name": "ownerCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on ownerCount: `ownerCount=value` matches it exactly. Bracket operators: `ownerCount[ne]`, `ownerCount[gt]`, `ownerCount[gte]`, `ownerCount[lt]`, `ownerCount[lte]`, and `ownerCount[in]` / `ownerCount[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChildCompany"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-child-company",
        "summary": "Create a new organization as a child of the key's company",
        "description": "Create a new organization as a child of the key's company. It starts with no members: invite people with POST /v2/invitations while sending the new id in X-Company-Id, which can seat its first Owner. Requires the key creator to hold child_company:manage.\n\nRequires the API key permission child_company:manage.",
        "tags": [
          "child-companies"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ChildCompany"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks child_company:manage, or its creator no longer holds it (API_KEY_PERMISSION_DENIED), or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The name is taken (COMPANY_NAME_TAKEN), this company is a personal account (COMPANY_PARENT_PERSONAL_FORBIDDEN), is itself a child (COMPANY_PARENT_DEPTH_EXCEEDED), or has reached its child limit (COMPANY_PARENT_CHILD_LIMIT_REACHED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "This company created its daily maximum of child organizations (CHILD_COMPANY_CREATION_LIMIT_REACHED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The organization could not be created (COMPANY_REGION_PUBLISH_FAILED, CHILD_COMPANY_CREATE_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/child-companies/{companyId}": {
      "get": {
        "operationId": "v2-get-child-company",
        "summary": "Get one child organization of the key's company",
        "description": "Get one child organization of the key's company. Requires child_company:access on the key and its creator.\n\nRequires the API key permission child_company:access.",
        "tags": [
          "child-companies"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:access"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ChildCompany"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks child_company:access, or its creator no longer holds it (API_KEY_PERMISSION_DENIED), or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "This company has no active child organization with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-release-child-company",
        "summary": "Release a child organization: the link ends and this company's keys can no longer reach it",
        "description": "Release a child organization: the link ends and this company's keys can no longer reach it. The child organization and its data are not deleted. A child with no Owner cannot be released; seat one first. Requires the key creator to hold child_company:manage.\n\nRequires the API key permission child_company:manage.",
        "tags": [
          "child-companies"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks child_company:manage, or its creator no longer holds it (API_KEY_PERMISSION_DENIED), or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "This company has no active child organization with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The child has no active Owner, so releasing it would leave it unreachable (CHILD_HAS_NO_OWNER).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/child-companies/{companyId}/close": {
      "post": {
        "operationId": "v2-close-child-company",
        "summary": "Close a child organization the key's company created: the same deletion as deleting an organization in MindCloud",
        "description": "Close a child organization the key's company created: the same deletion as deleting an organization in MindCloud. Its members lose access, its subscriptions are canceled at period end, and its runs, logs, and connections are deleted. Only for a child your company created (origin created); a linked child is its own organization and can only be released. Requires the key creator to hold child_company:manage.\n\nRequires the API key permission child_company:manage.",
        "tags": [
          "child-companies"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ClosedChildCompany"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks child_company:manage, or its creator no longer holds it (API_KEY_PERMISSION_DENIED), or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "This company has no active child organization with this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Your company did not create this child organization; release it instead (CHILD_COMPANY_NOT_CREATED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The organization could not be closed (COMPANY_DELETE_FAILED). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/link-requests": {
      "get": {
        "operationId": "v2-list-link-requests",
        "summary": "List the requests to link the key's company with another organization as parent and child, newest first: the ones it sent (direction=outgoing) and the ones it received (direction=incoming), in every status",
        "description": "List the requests to link the key's company with another organization as parent and child, newest first: the ones it sent (direction=outgoing) and the ones it received (direction=incoming), in every status. Requires the key creator to hold child_company:access.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission child_company:access.",
        "tags": [
          "link-requests"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:access"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, direction, side, parentCompanyId, parentCompanyName, childCompanyId, childCompanyName, status, expiresOn, respondedOn, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, direction, side, parentCompanyId, parentCompanyName, childCompanyId, childCompanyName, status, expiresOn, respondedOn, createdOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, direction, side, parentCompanyId, parentCompanyName, childCompanyId, childCompanyName, status, expiresOn, respondedOn, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "description": "Filter on direction: `direction=value` matches it exactly. Bracket operators: `direction[ne]`, `direction[gt]`, `direction[gte]`, `direction[lt]`, `direction[lte]`, `direction[contains]`, `direction[starts]`, `direction[ends]`, and `direction[in]` / `direction[nin]` with comma-separated values."
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "parent",
                "child"
              ]
            },
            "description": "Filter on side: `side=value` matches it exactly. Bracket operators: `side[ne]`, `side[gt]`, `side[gte]`, `side[lt]`, `side[lte]`, `side[contains]`, `side[starts]`, `side[ends]`, and `side[in]` / `side[nin]` with comma-separated values."
          },
          {
            "name": "parentCompanyId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on parentCompanyId: `parentCompanyId=value` matches it exactly. Bracket operators: `parentCompanyId[ne]`, `parentCompanyId[gt]`, `parentCompanyId[gte]`, `parentCompanyId[lt]`, `parentCompanyId[lte]`, `parentCompanyId[contains]`, `parentCompanyId[starts]`, `parentCompanyId[ends]`, and `parentCompanyId[in]` / `parentCompanyId[nin]` with comma-separated values."
          },
          {
            "name": "parentCompanyName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on parentCompanyName: `parentCompanyName=value` matches it exactly. Bracket operators: `parentCompanyName[ne]`, `parentCompanyName[gt]`, `parentCompanyName[gte]`, `parentCompanyName[lt]`, `parentCompanyName[lte]`, `parentCompanyName[contains]`, `parentCompanyName[starts]`, `parentCompanyName[ends]`, and `parentCompanyName[in]` / `parentCompanyName[nin]` with comma-separated values."
          },
          {
            "name": "childCompanyId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on childCompanyId: `childCompanyId=value` matches it exactly. Bracket operators: `childCompanyId[ne]`, `childCompanyId[gt]`, `childCompanyId[gte]`, `childCompanyId[lt]`, `childCompanyId[lte]`, `childCompanyId[contains]`, `childCompanyId[starts]`, `childCompanyId[ends]`, and `childCompanyId[in]` / `childCompanyId[nin]` with comma-separated values."
          },
          {
            "name": "childCompanyName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on childCompanyName: `childCompanyName=value` matches it exactly. Bracket operators: `childCompanyName[ne]`, `childCompanyName[gt]`, `childCompanyName[gte]`, `childCompanyName[lt]`, `childCompanyName[lte]`, `childCompanyName[contains]`, `childCompanyName[starts]`, `childCompanyName[ends]`, and `childCompanyName[in]` / `childCompanyName[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "declined",
                "canceled",
                "expired"
              ]
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "expiresOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on expiresOn: `expiresOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `expiresOn[ne]`, `expiresOn[gt]`, `expiresOn[gte]`, `expiresOn[lt]`, `expiresOn[lte]`, and `expiresOn[in]` / `expiresOn[nin]` with comma-separated values."
          },
          {
            "name": "respondedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on respondedOn: `respondedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `respondedOn[ne]`, `respondedOn[gt]`, `respondedOn[gte]`, `respondedOn[lt]`, `respondedOn[lte]`, and `respondedOn[in]` / `respondedOn[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LinkRequest"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-link-request",
        "summary": "Ask an existing organization to become a child of the key's company",
        "description": "Ask an existing organization to become a child of the key's company. Nothing changes until one of its Owners accepts; the request expires after 7 days. Its Owners are emailed. Requires the key creator to hold child_company:manage.\n\nRequires the API key permission child_company:manage.",
        "tags": [
          "link-requests"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:manage"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "childCompanyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "childCompanyId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/LinkRequest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request body is invalid (INVALID_QUERY), or childCompanyId is your own company (COMPANY_LINK_REQUEST_INVALID_TARGET).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks child_company:manage, or its creator no longer holds it (API_KEY_PERMISSION_DENIED, FORBIDDEN), or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No organization has this id (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The organizations cannot be linked: one is a personal account (COMPANY_PARENT_PERSONAL_FORBIDDEN), their home regions differ (COMPANY_PARENT_REGION_MISMATCH), your company is a child or the other has children (COMPANY_PARENT_DEPTH_EXCEEDED), the other already has a parent (COMPANY_PARENT_ALREADY_LINKED), your company has its maximum of children (COMPANY_PARENT_CHILD_LIMIT_REACHED), or a request between them is already pending (COMPANY_LINK_REQUEST_ALREADY_PENDING).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Your company has 5 requests waiting for an answer (COMPANY_LINK_REQUEST_LIMIT_REACHED), or the other organization has too many (COMPANY_LINK_REQUEST_TARGET_BUSY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The request could not be sent (COMPANY_LINK_REQUEST_FAILED). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/link-requests/{requestId}/accept": {
      "post": {
        "operationId": "v2-accept-link-request",
        "summary": "Accept a link request another organization sent the key's company",
        "description": "Accept a link request another organization sent the key's company. When your company becomes the child, the parent's keys whose creator holds child_company:access can act in it by sending its id in X-Company-Id, and your company can leave at any time with Leave Parent Organization. Requires the key creator to hold company:parent:manage; when your company is the parent (the child asked from Cirra), child_company:manage too.\n\nRequires the API key permission company:parent:manage.",
        "tags": [
          "link-requests"
        ],
        "security": [
          {
            "apiKey": [
              "company:parent:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/LinkRequest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the permission, or its creator no longer holds it (API_KEY_PERMISSION_DENIED); when your company is the parent, the key also needs child_company:manage (FORBIDDEN); your company sent this request, so the other organization has to accept it (COMPANY_LINK_REQUEST_SELF_ACCEPT_FORBIDDEN); or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No link request with this id was sent or received by your company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request was already answered or withdrawn (COMPANY_LINK_REQUEST_CLOSED), its sender can no longer approve it for their organization (COMPANY_LINK_REQUEST_INITIATOR_REVOKED), or the organizations can no longer be linked (COMPANY_PARENT_ALREADY_LINKED, COMPANY_PARENT_DEPTH_EXCEEDED, COMPANY_PARENT_CHILD_LIMIT_REACHED, COMPANY_PARENT_REGION_MISMATCH, COMPANY_PARENT_PERSONAL_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "The request expired (COMPANY_LINK_REQUEST_EXPIRED). Ask for a new one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The request could not be accepted (COMPANY_LINK_REQUEST_FAILED). Retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/link-requests/{requestId}/decline": {
      "post": {
        "operationId": "v2-decline-link-request",
        "summary": "Decline a link request another organization sent the key's company: nothing is linked, and the sender is emailed",
        "description": "Decline a link request another organization sent the key's company: nothing is linked, and the sender is emailed. Requires the key creator to hold company:parent:manage; when your company would be the parent (the child asked from Cirra), child_company:manage too.\n\nRequires the API key permission company:parent:manage.",
        "tags": [
          "link-requests"
        ],
        "security": [
          {
            "apiKey": [
              "company:parent:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/LinkRequest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the permission, or its creator no longer holds it (API_KEY_PERMISSION_DENIED); when your company would be the parent, the key also needs child_company:manage (FORBIDDEN); your company sent this request, so cancel it instead (COMPANY_LINK_REQUEST_SELF_DECLINE_FORBIDDEN); or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No link request with this id was sent or received by your company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request was already answered or withdrawn (COMPANY_LINK_REQUEST_CLOSED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/link-requests/{requestId}/cancel": {
      "post": {
        "operationId": "v2-cancel-link-request",
        "summary": "Withdraw a link request the key's company sent, before it is answered",
        "description": "Withdraw a link request the key's company sent, before it is answered. Requires the key creator to hold child_company:manage; when your company asked to become the child (from Cirra), company:parent:manage too.\n\nRequires the API key permission child_company:manage.",
        "tags": [
          "link-requests"
        ],
        "security": [
          {
            "apiKey": [
              "child_company:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/LinkRequest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the permission, or its creator no longer holds it (API_KEY_PERMISSION_DENIED); when your company asked to become the child, the key also needs company:parent:manage (FORBIDDEN); another organization sent this request, so decline it instead (COMPANY_LINK_REQUEST_CANCEL_FORBIDDEN); or the request named another company in X-Company-Id (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No link request with this id was sent or received by your company (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request was already answered or withdrawn (COMPANY_LINK_REQUEST_CLOSED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/companies/{companyId}/leave-parent": {
      "post": {
        "operationId": "v2-leave-parent",
        "summary": "End the company's link to its parent organization: the parent's keys can no longer reach it",
        "description": "End the company's link to its parent organization: the parent's keys can no longer reach it. A parent can never block this. The company and its data are unchanged. The path company id must be the company the request acts in: the key's own, or the one X-Company-Id names among the organizations the key's creator belongs to with a role (a key with \"Use this key across all of your organizations\"). Requires company:parent:manage on the key and its creator there.\n\nRequires the API key permission company:parent:manage.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "company:parent:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyProfile"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks company:parent:manage, or its creator no longer holds it (API_KEY_PERMISSION_DENIED), or the path company id is not the company the request acts in, or X-Company-Id names an organization the key reaches only through a parent or MindCloud staff access (COMPANY_SCOPE_MISMATCH).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The company has no parent organization (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/audit-events": {
      "get": {
        "operationId": "v2-list-audit-events",
        "summary": "List the write attempts API keys made on the key's company, newest first, whatever their outcome: every POST, PUT, and DELETE through the API, refusals included",
        "description": "List the write attempts API keys made on the key's company, newest first, whatever their outcome: every POST, PUT, and DELETE through the API, refusals included. A write by a member's key from another organization shows the member, never the key; one by a parent organization's key or by MindCloud support shows only who acted, never that key or its creator. In another organization, only as one of its members (X-Company-Id).\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission api_key:manage.",
        "tags": [
          "audit-events"
        ],
        "security": [
          {
            "apiKey": [
              "api_key:manage"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, createdOn, requestId, actor, apiKeyId, endpointName, method, route, path, resourceId, statusCode, errorCode, errorReason, durationMs."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: createdOn. Default: -createdOn."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, createdOn, apiKeyId. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "apiKeyId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on apiKeyId: `apiKeyId=value` matches it exactly. Bracket operators: `apiKeyId[ne]`, `apiKeyId[gt]`, `apiKeyId[gte]`, `apiKeyId[lt]`, `apiKeyId[lte]`, `apiKeyId[contains]`, `apiKeyId[starts]`, `apiKeyId[ends]`, and `apiKeyId[in]` / `apiKeyId[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEvent"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages": {
      "get": {
        "operationId": "v2-list-analytics-pages",
        "summary": "List the Analytics pages the key's creator can open: their own and the ones shared with them, as their sidebar lists them, narrowed by their seat and role",
        "description": "List the Analytics pages the key's creator can open: their own and the ones shared with them, as their sidebar lists them, narrowed by their seat and role.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, type, access, ownerId, ownerName, folderId, icon, iconColor, isPaused, pausedByFolderId, hasShares, linkedFromPageIds, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, type, access, ownerId, ownerName, folderId, isPaused, hasShares, createdOn, updatedOn. Default: -updatedOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, type, access, ownerId, ownerName, folderId, isPaused, pausedByFolderId, hasShares, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "page",
                "report",
                "subpage"
              ]
            },
            "description": "Filter on type: `type=value` matches it exactly. Bracket operators: `type[ne]`, `type[gt]`, `type[gte]`, `type[lt]`, `type[lte]`, `type[contains]`, `type[starts]`, `type[ends]`, and `type[in]` / `type[nin]` with comma-separated values."
          },
          {
            "name": "access",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "owner",
                "edit",
                "view"
              ]
            },
            "description": "Filter on access: `access=value` matches it exactly. Bracket operators: `access[ne]`, `access[gt]`, `access[gte]`, `access[lt]`, `access[lte]`, `access[contains]`, `access[starts]`, `access[ends]`, and `access[in]` / `access[nin]` with comma-separated values."
          },
          {
            "name": "ownerId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on ownerId: `ownerId=value` matches it exactly. Bracket operators: `ownerId[ne]`, `ownerId[gt]`, `ownerId[gte]`, `ownerId[lt]`, `ownerId[lte]`, `ownerId[contains]`, `ownerId[starts]`, `ownerId[ends]`, and `ownerId[in]` / `ownerId[nin]` with comma-separated values."
          },
          {
            "name": "ownerName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on ownerName: `ownerName=value` matches it exactly. Bracket operators: `ownerName[ne]`, `ownerName[gt]`, `ownerName[gte]`, `ownerName[lt]`, `ownerName[lte]`, `ownerName[contains]`, `ownerName[starts]`, `ownerName[ends]`, and `ownerName[in]` / `ownerName[nin]` with comma-separated values."
          },
          {
            "name": "folderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on folderId: `folderId=value` matches it exactly. Bracket operators: `folderId[ne]`, `folderId[gt]`, `folderId[gte]`, `folderId[lt]`, `folderId[lte]`, `folderId[contains]`, `folderId[starts]`, `folderId[ends]`, and `folderId[in]` / `folderId[nin]` with comma-separated values."
          },
          {
            "name": "isPaused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPaused: `isPaused=value` matches it exactly. Bracket operators: `isPaused[ne]`, `isPaused[gt]`, `isPaused[gte]`, `isPaused[lt]`, `isPaused[lte]`, and `isPaused[in]` / `isPaused[nin]` with comma-separated values."
          },
          {
            "name": "pausedByFolderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on pausedByFolderId: `pausedByFolderId=value` matches it exactly. Bracket operators: `pausedByFolderId[ne]`, `pausedByFolderId[gt]`, `pausedByFolderId[gte]`, `pausedByFolderId[lt]`, `pausedByFolderId[lte]`, `pausedByFolderId[contains]`, `pausedByFolderId[starts]`, `pausedByFolderId[ends]`, and `pausedByFolderId[in]` / `pausedByFolderId[nin]` with comma-separated values."
          },
          {
            "name": "hasShares",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on hasShares: `hasShares=value` matches it exactly. Bracket operators: `hasShares[ne]`, `hasShares[gt]`, `hasShares[gte]`, `hasShares[lt]`, `hasShares[lte]`, and `hasShares[in]` / `hasShares[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Search text: pages whose name contains it, ignoring case, or whose id is exactly it. * is a wildcard."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsPageSummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-page",
        "summary": "Create an Analytics page or report owned by the key's creator, optionally with its variables and in one of their folders",
        "description": "Create an Analytics page or report owned by the key's creator, optionally with its variables and in one of their folders. It starts empty and unpublished.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The page title, such as Pipeline health."
                  },
                  "description": {
                    "description": "One line under the title saying what the page answers.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "type": {
                    "description": "page (the default) or report. A subpage is made from a panel click with Create Analytics Subpage.",
                    "type": "string",
                    "enum": [
                      "page",
                      "report"
                    ],
                    "x-enumDescriptions": {
                      "page": "An ordinary page of panels on a grid. The default.",
                      "report": "A report: one written panel that fills the page."
                    }
                  },
                  "folderId": {
                    "description": "One of the creator's folders to file it in, from List Analytics Folders. Left out, it goes at the top of their sidebar.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "variables": {
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "dateRange",
                              "description": "A date window."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: a preset id (last30d when left out), a rolling window such as last21d or last2Months, or a range such as 2026-01-01..2026-06-30.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "presets": {
                              "description": "The preset menu, in order. Left out, the standard menu shows. One of: today, yesterday, last7d, last14d, last30d, last90d, thisWeek, lastWeek, thisMonth, lastMonth, last3Months, lastQuarter, thisYear, last12Months, allTime.",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "today",
                                  "yesterday",
                                  "last7d",
                                  "last14d",
                                  "last30d",
                                  "last90d",
                                  "thisWeek",
                                  "lastWeek",
                                  "thisMonth",
                                  "lastMonth",
                                  "last3Months",
                                  "lastQuarter",
                                  "thisYear",
                                  "last12Months",
                                  "allTime"
                                ]
                              }
                            },
                            "showCalendar": {
                              "description": "Whether viewers can pick a custom range on a calendar. Defaults to true.",
                              "type": "boolean"
                            },
                            "timeGranularity": {
                              "description": "Whether custom ranges carry start and end times instead of whole days. Defaults to false.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "select",
                              "description": "One value, or several with multiple, from a list of choices."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: all (nothing picked, the default) or one choice value.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "multiple": {
                              "description": "Whether viewers can pick several choices. $<name> is then a list: read it with ($<name>_all OR list_contains($<name>, column)).",
                              "type": "boolean"
                            },
                            "labeledBy": {
                              "description": "When a row click sets this variable: the clicked row field that names the value for people.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "options": {
                              "type": "object",
                              "properties": {
                                "dataSourceId": {
                                  "description": "The data source whose records supply the choices, from List Analytics Data Sources.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "query": {
                                  "description": "SQL over the source (as src) answering value and optionally label columns, such as SELECT DISTINCT region AS value FROM src ORDER BY value.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "valueField": {
                                  "description": "Without a query: the source column whose values are the choices.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "labelField": {
                                  "description": "Without a query: the source column shown for each choice.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "values": {
                                  "description": "Instead of a data source: the choices typed out, up to 100.",
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "The choice value queries see."
                                      },
                                      "label": {
                                        "description": "What viewers see for it. Defaults to the value.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "description": "Where the choices come from: a data source with a query or value and label columns, or typed values."
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "options"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "search",
                              "description": "Free text a viewer types; it always starts empty."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "toggle",
                              "description": "An on or off switch, usually set by a stat tile wired to it."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "default": {
                              "description": "Whether it starts on. Defaults to true.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    },
                    "description": "The page variables (its filters), in page order, at most 12. Each declares its type: dateRange, select, search or toggle."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is invalid, or a variable declaration is not usable (ANALYTICS_PAGE_VARIABLES_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot create Analytics pages: no builder seat, or their role lacks it (ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}": {
      "get": {
        "operationId": "v2-get-analytics-page",
        "summary": "Get one Analytics page: its settings, variables, tabs, and its panels with where each sits",
        "description": "Get one Analytics page: its settings, variables, tabs, and its panels with where each sits. A published page answers the version viewers see unless an editor asks for the draft.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Which version to read. Left out: the published version when there is one, otherwise the draft.",
              "type": "string",
              "enum": [
                "draft",
                "published"
              ],
              "x-enumDescriptions": {
                "draft": "The draft, with the changes not yet published. Editors and owners only.",
                "published": "The version viewers see."
              }
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot open the page or, for version=draft, edit it (ANALYTICS_PAGE_DRAFT_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-analytics-page",
        "summary": "Change a page's title, description, icon, display, theme, style or pause, or file it in another folder",
        "description": "Change a page's title, description, icon, display, theme, style or pause, or file it in another folder. Only the fields sent change. Owners and editors may change it, under the same editor rules as page settings in the app.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The page title.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "description": "The line under the title.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "icon": {
                    "description": "An icon id from the app icon catalog, such as chart-bar. An unknown id is refused with the closest ids.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "iconColor": {
                    "description": "An icon colour from the app palette. An unknown value is refused with the palette.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "fullWidth": {
                    "description": "Whether the page spans the whole window.",
                    "type": "boolean"
                  },
                  "showPanelSources": {
                    "description": "Whether each panel shows its data sources' app icons.",
                    "type": "boolean"
                  },
                  "themeId": {
                    "description": "A theme id from List Analytics Themes, or null to follow the folder or company default.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "style": {
                    "description": "Style overrides on top of the theme, by option key, such as { \"seriesColors\": [...] }. Each option sent replaces that option, null clears one, and style null clears every override. Values are checked against the theme's option registry.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "maxLength": 64
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isPaused": {
                    "description": "true stops the page's data from refreshing; false resumes it (a folder above it can still keep it paused).",
                    "type": "boolean"
                  },
                  "folderId": {
                    "description": "One of the creator's folders to file the page in, from List Analytics Folders, or null for the top of the sidebar. Filing is the creator's own and changes nothing for anyone else.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body sends nothing to change (NO_FIELDS_TO_UPDATE), or a setting is refused: an unknown icon (ANALYTICS_PAGE_ICON_UNKNOWN) or icon color (ANALYTICS_INVALID_REQUEST), or a style option a report cannot paint (ANALYTICS_REPORT_STYLE_UNSUPPORTED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot change this: view-only access, or an editor changing what only the owner may, such as the icon, theme, style, pause or a dropdown's choices (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND), or the folder is not theirs (ANALYTICS_FOLDER_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-page",
        "summary": "Delete a page the key's creator owns, with the subpages only it opens",
        "description": "Delete a page the key's creator owns, with the subpages only it opens. Everyone it is shared with loses it, its scheduled sends stop, and its public link and embeds stop working. Its data sources stay.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "confirmationReceipt",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can delete it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/convert": {
      "post": {
        "operationId": "v2-convert-analytics-page",
        "summary": "Turn a page into a subpage of the page whose click opens it, or a subpage back into an ordinary page",
        "description": "Turn a page into a subpage of the page whose click opens it, or a subpage back into an ordinary page. Owner only. A report keeps its type.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "page",
                      "subpage"
                    ],
                    "x-enumDescriptions": {
                      "page": "An ordinary page, listed in the sidebar.",
                      "subpage": "A page reached only from a click on its parent page."
                    },
                    "description": "The type the page becomes."
                  },
                  "fromPageId": {
                    "description": "Making a subpage a page: the parent whose level receives it, from linkedFromPageIds on Get Analytics Page. Needed only when it has several parents.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "placementPageId": {
                    "description": "Making a subpage a page beneath another subpage: the nearest ordinary page above it whose level receives it. Needed only when there is more than one.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is invalid, or the page cannot take that type: a report, or a subpage target the navigation does not allow. details.reason names the cause.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can change its type (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_PAGE_OWNER_REQUIRED, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/duplicate": {
      "post": {
        "operationId": "v2-duplicate-analytics-page",
        "summary": "Copy a page the key's creator owns, with its panels, variables and settings, as a new unpublished page beside it",
        "description": "Copy a page the key's creator owns, with its panels, variables and settings, as a new unpublished page beside it. Its data sources are shared with the copy, not copied.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The page is not the creator's own (ANALYTICS_PAGE_OWNER_REQUIRED), or they cannot create Analytics pages (ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/variables": {
      "put": {
        "operationId": "v2-set-analytics-page-variables",
        "summary": "Replace a page's variables (its filters: date windows, dropdowns, search boxes and switches) with the list sent, in page order",
        "description": "Replace a page's variables (its filters: date windows, dropdowns, search boxes and switches) with the list sent, in page order. An empty list removes them all. Anything the new variables leave broken comes back in meta.warnings.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "variables": {
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "dateRange",
                              "description": "A date window."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: a preset id (last30d when left out), a rolling window such as last21d or last2Months, or a range such as 2026-01-01..2026-06-30.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "presets": {
                              "description": "The preset menu, in order. Left out, the standard menu shows. One of: today, yesterday, last7d, last14d, last30d, last90d, thisWeek, lastWeek, thisMonth, lastMonth, last3Months, lastQuarter, thisYear, last12Months, allTime.",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "today",
                                  "yesterday",
                                  "last7d",
                                  "last14d",
                                  "last30d",
                                  "last90d",
                                  "thisWeek",
                                  "lastWeek",
                                  "thisMonth",
                                  "lastMonth",
                                  "last3Months",
                                  "lastQuarter",
                                  "thisYear",
                                  "last12Months",
                                  "allTime"
                                ]
                              }
                            },
                            "showCalendar": {
                              "description": "Whether viewers can pick a custom range on a calendar. Defaults to true.",
                              "type": "boolean"
                            },
                            "timeGranularity": {
                              "description": "Whether custom ranges carry start and end times instead of whole days. Defaults to false.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "select",
                              "description": "One value, or several with multiple, from a list of choices."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: all (nothing picked, the default) or one choice value.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "multiple": {
                              "description": "Whether viewers can pick several choices. $<name> is then a list: read it with ($<name>_all OR list_contains($<name>, column)).",
                              "type": "boolean"
                            },
                            "labeledBy": {
                              "description": "When a row click sets this variable: the clicked row field that names the value for people.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "options": {
                              "type": "object",
                              "properties": {
                                "dataSourceId": {
                                  "description": "The data source whose records supply the choices, from List Analytics Data Sources.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "query": {
                                  "description": "SQL over the source (as src) answering value and optionally label columns, such as SELECT DISTINCT region AS value FROM src ORDER BY value.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "valueField": {
                                  "description": "Without a query: the source column whose values are the choices.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "labelField": {
                                  "description": "Without a query: the source column shown for each choice.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "values": {
                                  "description": "Instead of a data source: the choices typed out, up to 100.",
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "The choice value queries see."
                                      },
                                      "label": {
                                        "description": "What viewers see for it. Defaults to the value.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "description": "Where the choices come from: a data source with a query or value and label columns, or typed values."
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "options"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "search",
                              "description": "Free text a viewer types; it always starts empty."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "toggle",
                              "description": "An on or off switch, usually set by a stat tile wired to it."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "default": {
                              "description": "Whether it starts on. Defaults to true.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    },
                    "description": "The page variables (its filters), in page order, at most 12. Each declares its type: dateRange, select, search or toggle."
                  }
                },
                "required": [
                  "variables"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is invalid, or a declaration is not usable (ANALYTICS_PAGE_VARIABLES_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "View-only access, or an editor changing what only the owner may, such as a dropdown's choices (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/tabs": {
      "put": {
        "operationId": "v2-set-analytics-page-tabs",
        "summary": "Set a page's tabs: the whole ordered list, or null to turn tabs off",
        "description": "Set a page's tabs: the whole ordered list, or null to turn tabs off. Keep a tab by sending its id; delete one, with its panels, by leaving it out and naming it in removeTabIds (owner only). Turning tabs on puts every panel on the first tab.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tabs": {
                    "anyOf": [
                      {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "description": "An existing tab id, from Get Analytics Page, to keep that tab. Left out: a new tab.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 24
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40,
                              "description": "The tab name."
                            }
                          },
                          "required": [
                            "name"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Every tab the page should have, in order, or null to turn tabs off."
                  },
                  "removeTabIds": {
                    "description": "Every existing tab left out of tabs, named here to confirm it is deleted with its panels. Owner only.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 24
                    }
                  },
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                },
                "required": [
                  "tabs"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is invalid, or the tab list is not a usable change, such as an existing tab neither sent nor named in removeTabIds (ANALYTICS_PAGE_TABS_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "View-only access, or an editor deleting panels with a tab (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/layout": {
      "put": {
        "operationId": "v2-update-analytics-page-layout",
        "summary": "Place panels on the 12-column grid, and on tabs, in one call",
        "description": "Place panels on the 12-column grid, and on tabs, in one call. Panels left out keep their places. Every entry is checked before anything moves, and the whole call is one undo step.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "layouts": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "panelId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24,
                          "description": "A panel on this page, from Get Analytics Page. Not a drill-down, and not a panel inside a container."
                        },
                        "x": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 11,
                          "description": "The column it starts at, 0 to 11."
                        },
                        "y": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991,
                          "description": "The row it starts at, from 0."
                        },
                        "w": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 12,
                          "description": "Its width in columns, 1 to 12."
                        },
                        "h": {
                          "description": "Its height in rows. Left out, a panel keeps its height, or keeps fitting its content.",
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "tabId": {
                          "description": "The tab to put it on, from Get Analytics Page. Left out, it stays on its tab.",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24
                        }
                      },
                      "required": [
                        "panelId",
                        "x",
                        "y",
                        "w"
                      ]
                    },
                    "description": "Where each panel goes. Sizes are fitted to what each panel type allows."
                  }
                },
                "required": [
                  "layouts"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is invalid, or an entry cannot be placed: a panel not on the page, a drill-down or contained panel, an unknown tab, or a report page, which has no grid (ANALYTICS_INVALID_REQUEST).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "View-only access (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/access-requests": {
      "post": {
        "operationId": "v2-request-analytics-page-access",
        "summary": "Ask a page's owner to share it with the key's creator, as the app's Request access button does",
        "description": "Ask a page's owner to share it with the key's creator, as the app's Request access button does. The owner gets an email and decides. A request is one per page and person, with no id of its own, so asking again answers 200 with the request still waiting rather than creating another.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageAccessRequest"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No page with this id exists in the organization (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The creator can already open the page (ANALYTICS_PAGE_ALREADY_ACCESSIBLE), or it cannot be requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The email to the owner could not be sent (ANALYTICS_ACCESS_REQUEST_NOT_SENT). Try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/definition": {
      "get": {
        "operationId": "v2-get-analytics-page-definition",
        "summary": "Read a page's whole draft in one document: settings, variables, tabs and every panel with its configuration and grid place, plus the revision Set Analytics Page Definition takes in If-Match",
        "description": "Read a page's whole draft in one document: settings, variables, tabs and every panel with its configuration and grid place, plus the revision Set Analytics Page Definition takes in If-Match. Editors and owners only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageDefinition"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-set-analytics-page-definition",
        "summary": "Build or change a page's whole draft in one call: settings, variables, tabs and every panel, as Get Analytics Page Definition answers them",
        "description": "Build or change a page's whole draft in one call: settings, variables, tabs and every panel, as Get Analytics Page Definition answers them. Every problem is answered at once before anything is written, and the whole change is one undo step. Owner only.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "page": {
                    "description": "The page settings, as Update Analytics Page takes them. Left out, they stay as they are; a setting left out of page stays too.",
                    "type": "object",
                    "properties": {
                      "name": {
                        "description": "The page title.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "description": {
                        "description": "The line under the title, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "icon": {
                        "description": "An icon id from the app icon catalog, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "iconColor": {
                        "description": "An icon color from the app palette, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fullWidth": {
                        "description": "Whether the page spans the whole window.",
                        "type": "boolean"
                      },
                      "showPanelSources": {
                        "description": "Whether each panel shows its data sources' app icons.",
                        "type": "boolean"
                      },
                      "themeId": {
                        "description": "A theme id from List Analytics Themes, or null to follow the folder or company default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 24
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "style": {
                        "description": "Style overrides on top of the theme, by option key, such as { \"seriesColors\": [...] }. Each option sent replaces that option, null clears one, and style null clears every override. Values are checked against the theme's option registry.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 64
                            },
                            "additionalProperties": {
                              "anyOf": [
                                {},
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isPaused": {
                        "description": "true stops the page's data from refreshing; false resumes it (a folder above it can still keep it paused).",
                        "type": "boolean"
                      }
                    }
                  },
                  "variables": {
                    "description": "Every variable (filter) the page should have, in page order, as Set Analytics Page Variables takes them. Left out, they stay as they are.",
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "dateRange",
                              "description": "A date window."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: a preset id (last30d when left out), a rolling window such as last21d or last2Months, or a range such as 2026-01-01..2026-06-30.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "presets": {
                              "description": "The preset menu, in order. Left out, the standard menu shows. One of: today, yesterday, last7d, last14d, last30d, last90d, thisWeek, lastWeek, thisMonth, lastMonth, last3Months, lastQuarter, thisYear, last12Months, allTime.",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "today",
                                  "yesterday",
                                  "last7d",
                                  "last14d",
                                  "last30d",
                                  "last90d",
                                  "thisWeek",
                                  "lastWeek",
                                  "thisMonth",
                                  "lastMonth",
                                  "last3Months",
                                  "lastQuarter",
                                  "thisYear",
                                  "last12Months",
                                  "allTime"
                                ]
                              }
                            },
                            "showCalendar": {
                              "description": "Whether viewers can pick a custom range on a calendar. Defaults to true.",
                              "type": "boolean"
                            },
                            "timeGranularity": {
                              "description": "Whether custom ranges carry start and end times instead of whole days. Defaults to false.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "select",
                              "description": "One value, or several with multiple, from a list of choices."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: all (nothing picked, the default) or one choice value.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "multiple": {
                              "description": "Whether viewers can pick several choices. $<name> is then a list: read it with ($<name>_all OR list_contains($<name>, column)).",
                              "type": "boolean"
                            },
                            "labeledBy": {
                              "description": "When a row click sets this variable: the clicked row field that names the value for people.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "options": {
                              "type": "object",
                              "properties": {
                                "dataSourceId": {
                                  "description": "The data source whose records supply the choices, from List Analytics Data Sources.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "query": {
                                  "description": "SQL over the source (as src) answering value and optionally label columns, such as SELECT DISTINCT region AS value FROM src ORDER BY value.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "valueField": {
                                  "description": "Without a query: the source column whose values are the choices.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "labelField": {
                                  "description": "Without a query: the source column shown for each choice.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "values": {
                                  "description": "Instead of a data source: the choices typed out, up to 100.",
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "The choice value queries see."
                                      },
                                      "label": {
                                        "description": "What viewers see for it. Defaults to the value.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "description": "Where the choices come from: a data source with a query or value and label columns, or typed values."
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "options"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "search",
                              "description": "Free text a viewer types; it always starts empty."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "toggle",
                              "description": "An on or off switch, usually set by a stat tile wired to it."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "default": {
                              "description": "Whether it starts on. Defaults to true.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "tabs": {
                    "description": "Every tab the page should have, in order, or null for no tabs. Left out, they stay as they are. A tab left out is deleted with the panels on it.",
                    "anyOf": [
                      {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "description": "An existing tab id, from Get Analytics Page Definition, to keep that tab.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 24
                            },
                            "ref": {
                              "type": "string",
                              "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,39}$",
                              "description": "Your own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40,
                              "description": "The tab name."
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "description": "One tab: an existing one by id, or a new one with a ref."
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "panels": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "description": "An existing panel id on this page, from Get Analytics Page Definition, to keep and change that panel.",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24
                        },
                        "ref": {
                          "type": "string",
                          "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,39}$",
                          "description": "Your own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got."
                        },
                        "name": {
                          "description": "The panel's title. Setting it turns off automatic renaming for this panel.",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "description": "The line under the title when the panel opens as a full-page drill-down view. An empty string clears it.",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "placement": {
                          "description": "page puts the panel on the grid; drill takes it off the grid, to open when another panel drills into it.",
                          "type": "string",
                          "enum": [
                            "page",
                            "drill"
                          ]
                        },
                        "dataSources": {
                          "description": "Every data source feeding the panel, in order. Replaces the list.",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "dataSourceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 24,
                                "description": "The data source, from List Analytics Data Sources."
                              },
                              "alias": {
                                "description": "The name the query and transform code use for the source's rows. Made from the source's name when left out.",
                                "type": "string",
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                              },
                              "query": {
                                "description": "DuckDB SQL over the source's rows, with the alias as the table name: filter, group, sort and limit here. An empty string shows every row.",
                                "type": "string",
                                "maxLength": 100000
                              },
                              "followPageDate": {
                                "description": "false keeps the page's date filter off this source (an all-time figure).",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "dataSourceId"
                            ]
                          }
                        },
                        "transformCode": {
                          "description": "JavaScript function body receiving each source as a named input ({ alias }) and returning the rows to show. Use it only for what SQL cannot do. Saving it runs it; read the result with Get Analytics Panel Output. An empty string removes it.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "displayType": {
                          "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.",
                          "type": "string",
                          "enum": [
                            "table",
                            "bar",
                            "line",
                            "combo",
                            "pareto",
                            "bump",
                            "scatter",
                            "bubble",
                            "quadrant",
                            "pie",
                            "treemap",
                            "heatmap",
                            "pivot",
                            "cohort",
                            "statusgrid",
                            "activity",
                            "funnel",
                            "waterfall",
                            "sankey",
                            "chord",
                            "statetimeline",
                            "timeline",
                            "stat",
                            "trend",
                            "progress",
                            "gauge",
                            "bullet",
                            "report",
                            "document",
                            "workbook",
                            "html",
                            "map",
                            "region",
                            "tabs",
                            "group"
                          ]
                        },
                        "columns": {
                          "description": "Table panels: the columns shown, in order. Replaces the list; an empty list lets the panel pick its columns from the rows. Null clears them.",
                          "anyOf": [
                            {
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 256,
                                    "description": "The row key to show (dot paths allowed). A button column takes an identifier you choose, which names its click event \"button:<key>\"."
                                  },
                                  "type": {
                                    "description": "How the value is formatted: string, number, percent, ratio, currency, duration, rank, boolean, date, object, list, html, button.",
                                    "type": "string",
                                    "enum": [
                                      "string",
                                      "number",
                                      "percent",
                                      "ratio",
                                      "currency",
                                      "duration",
                                      "rank",
                                      "boolean",
                                      "date",
                                      "object",
                                      "list",
                                      "html",
                                      "button"
                                    ]
                                  },
                                  "label": {
                                    "description": "Button columns: the text on the button.",
                                    "type": "string",
                                    "maxLength": 80
                                  },
                                  "tooltip": {
                                    "description": "Button columns: one sentence shown on hover.",
                                    "type": "string",
                                    "maxLength": 280
                                  },
                                  "width": {
                                    "description": "The width in pixels, 64-800. An empty string returns it to the width of its content.",
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 64,
                                        "maximum": 800
                                      },
                                      {
                                        "type": "string",
                                        "const": ""
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "key"
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "format": {
                          "description": "How each column's values are formatted, keyed by column: { \"<column>\": { \"type\": \"currency\" } }. Merged over what is stored; null for a column takes its format off. Null clears every format.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "links": {
                          "description": "Table panels: the link each cell of a column opens, keyed by column. Merged over what is stored; null for a column takes its link off. Null clears every link.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "style": {
                          "description": "The color of each series or category, keyed by its name. Merged over what is stored; null for a name takes its color off. Null clears every color.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "description": "The settings of the panel's display type, keyed by block (annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group), as Get Analytics Panel answers them. A block is refused on a type that does not draw it.",
                          "type": "object",
                          "properties": {
                            "annotations": {
                              "description": "The annotations settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tooltip": {
                              "description": "The tooltip settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "chart": {
                              "description": "The chart settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "bump": {
                              "description": "The bump settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scatter": {
                              "description": "The scatter settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pie": {
                              "description": "The pie settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "treemap": {
                              "description": "The treemap settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "cellGrid": {
                              "description": "The cellGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "statusGrid": {
                              "description": "The statusGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "activity": {
                              "description": "The activity settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "funnel": {
                              "description": "The funnel settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "waterfall": {
                              "description": "The waterfall settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sankey": {
                              "description": "The sankey settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "chord": {
                              "description": "The chord settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "statetimeline": {
                              "description": "The statetimeline settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stat": {
                              "description": "The stat settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "trend": {
                              "description": "The trend settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "target": {
                              "description": "The target settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "report": {
                              "description": "The report settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "document": {
                              "description": "The document settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "workbook": {
                              "description": "The workbook settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "html": {
                              "description": "The html settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "map": {
                              "description": "The map settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "region": {
                              "description": "The region settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tabs": {
                              "description": "The tabs settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "group": {
                              "description": "The group settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        "on": {
                          "description": "What clicking the panel's items does, keyed by event: rowClick, valueClick and the other events the display type fires, or \"button:<column key>\" for a button column. Replaces every wiring; null clears them all.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "action": {
                                        "type": "string",
                                        "enum": [
                                          "drillDown",
                                          "openModal",
                                          "navigatePage",
                                          "setVariable",
                                          "startThread",
                                          "runWorkflow",
                                          "openUrl"
                                        ],
                                        "description": "What the event does: drillDown, openModal, navigatePage, setVariable, startThread, runWorkflow, openUrl."
                                      },
                                      "pageId": {
                                        "description": "navigatePage: the page to open, from List Analytics Pages.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 24
                                      },
                                      "panelId": {
                                        "description": "drillDown or openModal: the drill-down panel on this page to open.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 24
                                      },
                                      "variable": {
                                        "description": "setVariable: the select page variable the clicked row sets.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "code": {
                                        "description": "startThread or runWorkflow: JavaScript function body receiving { row, variables }. It is run against the panel's first row when you save.",
                                        "type": "string",
                                        "maxLength": 100000
                                      },
                                      "requireApproval": {
                                        "description": "startThread or runWorkflow: false skips the confirmation before the click runs. Defaults to true.",
                                        "type": "boolean"
                                      },
                                      "workflowId": {
                                        "description": "runWorkflow: the workflow to run, from List Workflows. It needs a webhook step and a published version.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "url": {
                                        "description": "openUrl: the http(s) address to open.",
                                        "type": "string",
                                        "maxLength": 2048,
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "interaction": {
                          "description": "Stat panels: make the tile a control that flips a toggle page variable. null makes it a normal panel again.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "toggles": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The toggle page variable the tile flips."
                                }
                              },
                              "required": [
                                "toggles"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "params": {
                          "description": "Drill-down panels: labels for the $params the source SQL reads, keyed by param. Replaces them; null clears them.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                              },
                              "additionalProperties": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "description": "The param's human name on the drill-down view (\"User\").",
                                    "type": "string",
                                    "maxLength": 40
                                  },
                                  "labeledBy": {
                                    "description": "The clicked row's field whose value names the opened view (\"userName\").",
                                    "type": "string",
                                    "maxLength": 120
                                  }
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "displayCode": {
                          "description": "Advanced display: JavaScript function body that returns the display settings from the page variables. It is run when you save. An empty string goes back to the static settings and keeps the code.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "aiSnippetsCode": {
                          "description": "Report panels: JavaScript function body returning { KEY: { prompt, additionalContext } } for the {{KEY}} tokens the transform writes. An empty string removes it.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "layout": {
                          "description": "The panel's place on the grid. Null on a drill-down or a panel inside a container, which take none; null on a grid panel keeps its place.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 11,
                                  "description": "Leftmost column, 0-11."
                                },
                                "y": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991,
                                  "description": "Top row, from 0."
                                },
                                "w": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 12,
                                  "description": "Width in columns, 1-12."
                                },
                                "h": {
                                  "description": "Height in rows; null or left out keeps the panel as tall as what it shows.",
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "w"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "heightMode": {
                          "description": "auto takes a fixed height off, so the panel is as tall as what it shows.",
                          "type": "string",
                          "enum": [
                            "auto"
                          ]
                        },
                        "tabId": {
                          "description": "The tab the panel sits on: a tab id, or a tab ref from tabs. Required on a new grid panel when the page has tabs; null keeps an existing panel on its tab.",
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "description": "One panel, in the shape Get Analytics Panel answers: an existing one by id, or a new one with a ref. Its clicks (on.*.panelId) and a container's items (settings.tabs.items, settings.group.items) may name other panels by id or ref."
                    },
                    "description": "Every panel the page should have, at most 100. A panel left out is deleted."
                  },
                  "confirmationReceipts": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for this body: every confirmationReceipt such answers gave, confirming the changes to the published embeds they list. A body that deletes several embedded panels or tabs collects one receipt per deletion.",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4096
                    }
                  },
                  "revision": {
                    "description": "Ignored, so a definition read can be sent back as it is. Send the revision in If-Match.",
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "panels"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageDefinitionWrite"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The definition has problems, and nothing was changed (ANALYTICS_PAGE_DEFINITION_INVALID): error.details.issues lists every one with its JSON Pointer into the body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change deletes panels or tabs that published embeds show, and nothing was changed (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: add it to confirmationReceipts and send the same body again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Part of the definition was written and could not be undone automatically (ANALYTICS_PAGE_DEFINITION_PARTIAL): error.details.batchId names the step. Undo it with Undo Analytics Page, or read the definition again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/definition/validate": {
      "post": {
        "operationId": "v2-validate-analytics-page-definition",
        "summary": "Check a body for Set Analytics Page Definition without changing anything: it runs the same checks and answers every problem it finds",
        "description": "Check a body for Set Analytics Page Definition without changing anything: it runs the same checks and answers every problem it finds.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "page": {
                    "description": "The page settings, as Update Analytics Page takes them. Left out, they stay as they are; a setting left out of page stays too.",
                    "type": "object",
                    "properties": {
                      "name": {
                        "description": "The page title.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "description": {
                        "description": "The line under the title, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "icon": {
                        "description": "An icon id from the app icon catalog, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "iconColor": {
                        "description": "An icon color from the app palette, or null when it has none.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fullWidth": {
                        "description": "Whether the page spans the whole window.",
                        "type": "boolean"
                      },
                      "showPanelSources": {
                        "description": "Whether each panel shows its data sources' app icons.",
                        "type": "boolean"
                      },
                      "themeId": {
                        "description": "A theme id from List Analytics Themes, or null to follow the folder or company default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 24
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "style": {
                        "description": "Style overrides on top of the theme, by option key, such as { \"seriesColors\": [...] }. Each option sent replaces that option, null clears one, and style null clears every override. Values are checked against the theme's option registry.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "maxLength": 64
                            },
                            "additionalProperties": {
                              "anyOf": [
                                {},
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "isPaused": {
                        "description": "true stops the page's data from refreshing; false resumes it (a folder above it can still keep it paused).",
                        "type": "boolean"
                      }
                    }
                  },
                  "variables": {
                    "description": "Every variable (filter) the page should have, in page order, as Set Analytics Page Variables takes them. Left out, they stay as they are.",
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "dateRange",
                              "description": "A date window."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: a preset id (last30d when left out), a rolling window such as last21d or last2Months, or a range such as 2026-01-01..2026-06-30.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "presets": {
                              "description": "The preset menu, in order. Left out, the standard menu shows. One of: today, yesterday, last7d, last14d, last30d, last90d, thisWeek, lastWeek, thisMonth, lastMonth, last3Months, lastQuarter, thisYear, last12Months, allTime.",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "today",
                                  "yesterday",
                                  "last7d",
                                  "last14d",
                                  "last30d",
                                  "last90d",
                                  "thisWeek",
                                  "lastWeek",
                                  "thisMonth",
                                  "lastMonth",
                                  "last3Months",
                                  "lastQuarter",
                                  "thisYear",
                                  "last12Months",
                                  "allTime"
                                ]
                              }
                            },
                            "showCalendar": {
                              "description": "Whether viewers can pick a custom range on a calendar. Defaults to true.",
                              "type": "boolean"
                            },
                            "timeGranularity": {
                              "description": "Whether custom ranges carry start and end times instead of whole days. Defaults to false.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "select",
                              "description": "One value, or several with multiple, from a list of choices."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: all (nothing picked, the default) or one choice value.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "multiple": {
                              "description": "Whether viewers can pick several choices. $<name> is then a list: read it with ($<name>_all OR list_contains($<name>, column)).",
                              "type": "boolean"
                            },
                            "labeledBy": {
                              "description": "When a row click sets this variable: the clicked row field that names the value for people.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "options": {
                              "type": "object",
                              "properties": {
                                "dataSourceId": {
                                  "description": "The data source whose records supply the choices, from List Analytics Data Sources.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "query": {
                                  "description": "SQL over the source (as src) answering value and optionally label columns, such as SELECT DISTINCT region AS value FROM src ORDER BY value.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "valueField": {
                                  "description": "Without a query: the source column whose values are the choices.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "labelField": {
                                  "description": "Without a query: the source column shown for each choice.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "values": {
                                  "description": "Instead of a data source: the choices typed out, up to 100.",
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "The choice value queries see."
                                      },
                                      "label": {
                                        "description": "What viewers see for it. Defaults to the value.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "description": "Where the choices come from: a data source with a query or value and label columns, or typed values."
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "options"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "search",
                              "description": "Free text a viewer types; it always starts empty."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "toggle",
                              "description": "An on or off switch, usually set by a stat tile wired to it."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "default": {
                              "description": "Whether it starts on. Defaults to true.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  },
                  "tabs": {
                    "description": "Every tab the page should have, in order, or null for no tabs. Left out, they stay as they are. A tab left out is deleted with the panels on it.",
                    "anyOf": [
                      {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "description": "An existing tab id, from Get Analytics Page Definition, to keep that tab.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 24
                            },
                            "ref": {
                              "type": "string",
                              "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,39}$",
                              "description": "Your own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got."
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40,
                              "description": "The tab name."
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "description": "One tab: an existing one by id, or a new one with a ref."
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "panels": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "description": "An existing panel id on this page, from Get Analytics Page Definition, to keep and change that panel.",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24
                        },
                        "ref": {
                          "type": "string",
                          "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,39}$",
                          "description": "Your own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got."
                        },
                        "name": {
                          "description": "The panel's title. Setting it turns off automatic renaming for this panel.",
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "description": "The line under the title when the panel opens as a full-page drill-down view. An empty string clears it.",
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "placement": {
                          "description": "page puts the panel on the grid; drill takes it off the grid, to open when another panel drills into it.",
                          "type": "string",
                          "enum": [
                            "page",
                            "drill"
                          ]
                        },
                        "dataSources": {
                          "description": "Every data source feeding the panel, in order. Replaces the list.",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "dataSourceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 24,
                                "description": "The data source, from List Analytics Data Sources."
                              },
                              "alias": {
                                "description": "The name the query and transform code use for the source's rows. Made from the source's name when left out.",
                                "type": "string",
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                              },
                              "query": {
                                "description": "DuckDB SQL over the source's rows, with the alias as the table name: filter, group, sort and limit here. An empty string shows every row.",
                                "type": "string",
                                "maxLength": 100000
                              },
                              "followPageDate": {
                                "description": "false keeps the page's date filter off this source (an all-time figure).",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "dataSourceId"
                            ]
                          }
                        },
                        "transformCode": {
                          "description": "JavaScript function body receiving each source as a named input ({ alias }) and returning the rows to show. Use it only for what SQL cannot do. Saving it runs it; read the result with Get Analytics Panel Output. An empty string removes it.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "displayType": {
                          "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.",
                          "type": "string",
                          "enum": [
                            "table",
                            "bar",
                            "line",
                            "combo",
                            "pareto",
                            "bump",
                            "scatter",
                            "bubble",
                            "quadrant",
                            "pie",
                            "treemap",
                            "heatmap",
                            "pivot",
                            "cohort",
                            "statusgrid",
                            "activity",
                            "funnel",
                            "waterfall",
                            "sankey",
                            "chord",
                            "statetimeline",
                            "timeline",
                            "stat",
                            "trend",
                            "progress",
                            "gauge",
                            "bullet",
                            "report",
                            "document",
                            "workbook",
                            "html",
                            "map",
                            "region",
                            "tabs",
                            "group"
                          ]
                        },
                        "columns": {
                          "description": "Table panels: the columns shown, in order. Replaces the list; an empty list lets the panel pick its columns from the rows. Null clears them.",
                          "anyOf": [
                            {
                              "maxItems": 200,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 256,
                                    "description": "The row key to show (dot paths allowed). A button column takes an identifier you choose, which names its click event \"button:<key>\"."
                                  },
                                  "type": {
                                    "description": "How the value is formatted: string, number, percent, ratio, currency, duration, rank, boolean, date, object, list, html, button.",
                                    "type": "string",
                                    "enum": [
                                      "string",
                                      "number",
                                      "percent",
                                      "ratio",
                                      "currency",
                                      "duration",
                                      "rank",
                                      "boolean",
                                      "date",
                                      "object",
                                      "list",
                                      "html",
                                      "button"
                                    ]
                                  },
                                  "label": {
                                    "description": "Button columns: the text on the button.",
                                    "type": "string",
                                    "maxLength": 80
                                  },
                                  "tooltip": {
                                    "description": "Button columns: one sentence shown on hover.",
                                    "type": "string",
                                    "maxLength": 280
                                  },
                                  "width": {
                                    "description": "The width in pixels, 64-800. An empty string returns it to the width of its content.",
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 64,
                                        "maximum": 800
                                      },
                                      {
                                        "type": "string",
                                        "const": ""
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "key"
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "format": {
                          "description": "How each column's values are formatted, keyed by column: { \"<column>\": { \"type\": \"currency\" } }. Merged over what is stored; null for a column takes its format off. Null clears every format.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "links": {
                          "description": "Table panels: the link each cell of a column opens, keyed by column. Merged over what is stored; null for a column takes its link off. Null clears every link.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "style": {
                          "description": "The color of each series or category, keyed by its name. Merged over what is stored; null for a name takes its color off. Null clears every color.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "settings": {
                          "description": "The settings of the panel's display type, keyed by block (annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group), as Get Analytics Panel answers them. A block is refused on a type that does not draw it.",
                          "type": "object",
                          "properties": {
                            "annotations": {
                              "description": "The annotations settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tooltip": {
                              "description": "The tooltip settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "chart": {
                              "description": "The chart settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "bump": {
                              "description": "The bump settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "scatter": {
                              "description": "The scatter settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "pie": {
                              "description": "The pie settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "treemap": {
                              "description": "The treemap settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "cellGrid": {
                              "description": "The cellGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "statusGrid": {
                              "description": "The statusGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "activity": {
                              "description": "The activity settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "funnel": {
                              "description": "The funnel settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "waterfall": {
                              "description": "The waterfall settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sankey": {
                              "description": "The sankey settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "chord": {
                              "description": "The chord settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "statetimeline": {
                              "description": "The statetimeline settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stat": {
                              "description": "The stat settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "trend": {
                              "description": "The trend settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "target": {
                              "description": "The target settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "report": {
                              "description": "The report settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "document": {
                              "description": "The document settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "workbook": {
                              "description": "The workbook settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "html": {
                              "description": "The html settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "map": {
                              "description": "The map settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "region": {
                              "description": "The region settings. A block you send is merged over the stored one: send only the fields you change.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tabs": {
                              "description": "The tabs settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "group": {
                              "description": "The group settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                              "anyOf": [
                                {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        "on": {
                          "description": "What clicking the panel's items does, keyed by event: rowClick, valueClick and the other events the display type fires, or \"button:<column key>\" for a button column. Replaces every wiring; null clears them all.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "action": {
                                        "type": "string",
                                        "enum": [
                                          "drillDown",
                                          "openModal",
                                          "navigatePage",
                                          "setVariable",
                                          "startThread",
                                          "runWorkflow",
                                          "openUrl"
                                        ],
                                        "description": "What the event does: drillDown, openModal, navigatePage, setVariable, startThread, runWorkflow, openUrl."
                                      },
                                      "pageId": {
                                        "description": "navigatePage: the page to open, from List Analytics Pages.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 24
                                      },
                                      "panelId": {
                                        "description": "drillDown or openModal: the drill-down panel on this page to open.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 24
                                      },
                                      "variable": {
                                        "description": "setVariable: the select page variable the clicked row sets.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "code": {
                                        "description": "startThread or runWorkflow: JavaScript function body receiving { row, variables }. It is run against the panel's first row when you save.",
                                        "type": "string",
                                        "maxLength": 100000
                                      },
                                      "requireApproval": {
                                        "description": "startThread or runWorkflow: false skips the confirmation before the click runs. Defaults to true.",
                                        "type": "boolean"
                                      },
                                      "workflowId": {
                                        "description": "runWorkflow: the workflow to run, from List Workflows. It needs a webhook step and a published version.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "url": {
                                        "description": "openUrl: the http(s) address to open.",
                                        "type": "string",
                                        "maxLength": 2048,
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "interaction": {
                          "description": "Stat panels: make the tile a control that flips a toggle page variable. null makes it a normal panel again.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "toggles": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The toggle page variable the tile flips."
                                }
                              },
                              "required": [
                                "toggles"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "params": {
                          "description": "Drill-down panels: labels for the $params the source SQL reads, keyed by param. Replaces them; null clears them.",
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                              },
                              "additionalProperties": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "description": "The param's human name on the drill-down view (\"User\").",
                                    "type": "string",
                                    "maxLength": 40
                                  },
                                  "labeledBy": {
                                    "description": "The clicked row's field whose value names the opened view (\"userName\").",
                                    "type": "string",
                                    "maxLength": 120
                                  }
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "displayCode": {
                          "description": "Advanced display: JavaScript function body that returns the display settings from the page variables. It is run when you save. An empty string goes back to the static settings and keeps the code.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "aiSnippetsCode": {
                          "description": "Report panels: JavaScript function body returning { KEY: { prompt, additionalContext } } for the {{KEY}} tokens the transform writes. An empty string removes it.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "layout": {
                          "description": "The panel's place on the grid. Null on a drill-down or a panel inside a container, which take none; null on a grid panel keeps its place.",
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 11,
                                  "description": "Leftmost column, 0-11."
                                },
                                "y": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991,
                                  "description": "Top row, from 0."
                                },
                                "w": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 12,
                                  "description": "Width in columns, 1-12."
                                },
                                "h": {
                                  "description": "Height in rows; null or left out keeps the panel as tall as what it shows.",
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "w"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "heightMode": {
                          "description": "auto takes a fixed height off, so the panel is as tall as what it shows.",
                          "type": "string",
                          "enum": [
                            "auto"
                          ]
                        },
                        "tabId": {
                          "description": "The tab the panel sits on: a tab id, or a tab ref from tabs. Required on a new grid panel when the page has tabs; null keeps an existing panel on its tab.",
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "description": "One panel, in the shape Get Analytics Panel answers: an existing one by id, or a new one with a ref. Its clicks (on.*.panelId) and a container's items (settings.tabs.items, settings.group.items) may name other panels by id or ref."
                    },
                    "description": "Every panel the page should have, at most 100. A panel left out is deleted."
                  },
                  "confirmationReceipts": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for this body: every confirmationReceipt such answers gave, confirming the changes to the published embeds they list. A body that deletes several embedded panels or tabs collects one receipt per deletion.",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4096
                    }
                  },
                  "revision": {
                    "description": "Ignored, so a definition read can be sent back as it is. Send the revision in If-Match.",
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "panels"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageDefinitionValidation"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/edits": {
      "get": {
        "operationId": "v2-list-analytics-page-edits",
        "summary": "List a page's draft steps since its last publish, newest first, one per step however many panels it touched: who made each, whether it is undone, and which one undo or redo would take next",
        "description": "List a page's draft steps since its last publish, newest first, one per step however many panels it touched: who made each, whether it is undone, and which one undo or redo would take next. Owners and editors only.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, kind, targetId, name, changeCount, madeBy, createdBy, madeByName, isUndone, next, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: createdOn. Default: -createdOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, kind, targetId, madeBy, createdBy, isUndone, createdOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "panelUpdate",
                "panelCreate",
                "panelDelete",
                "pageUpdate"
              ]
            },
            "description": "Filter on kind: `kind=value` matches it exactly. Bracket operators: `kind[ne]`, `kind[gt]`, `kind[gte]`, `kind[lt]`, `kind[lte]`, `kind[contains]`, `kind[starts]`, `kind[ends]`, and `kind[in]` / `kind[nin]` with comma-separated values."
          },
          {
            "name": "targetId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on targetId: `targetId=value` matches it exactly. Bracket operators: `targetId[ne]`, `targetId[gt]`, `targetId[gte]`, `targetId[lt]`, `targetId[lte]`, `targetId[contains]`, `targetId[starts]`, `targetId[ends]`, and `targetId[in]` / `targetId[nin]` with comma-separated values."
          },
          {
            "name": "madeBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "you",
                "cirra",
                "colleague"
              ]
            },
            "description": "Filter on madeBy: `madeBy=value` matches it exactly. Bracket operators: `madeBy[ne]`, `madeBy[gt]`, `madeBy[gte]`, `madeBy[lt]`, `madeBy[lte]`, `madeBy[contains]`, `madeBy[starts]`, `madeBy[ends]`, and `madeBy[in]` / `madeBy[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "isUndone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isUndone: `isUndone=value` matches it exactly. Bracket operators: `isUndone[ne]`, `isUndone[gt]`, `isUndone[gte]`, `isUndone[lt]`, `isUndone[lte]`, and `isUndone[in]` / `isUndone[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsPageEdit"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/undo": {
      "post": {
        "operationId": "v2-undo-analytics-page",
        "summary": "Undo the key creator's last draft step on a page since its last publish, as the editor's Undo does",
        "description": "Undo the key creator's last draft step on a page since its last publish, as the editor's Undo does. Steps made in the app and through the API are one stack. Answers the draft.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "There is nothing of the creator's to undo (ANALYTICS_PAGE_NOTHING_TO_UNDO), or the change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, ANALYTICS_EMBED_CONFIRMATION_CHANGED): send it again with the confirmationReceipt from error.details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/redo": {
      "post": {
        "operationId": "v2-redo-analytics-page",
        "summary": "Redo the key creator's last undone draft step on a page, or with editId, bring back one of their undone steps even after later edits",
        "description": "Redo the key creator's last undone draft step on a page, or with editId, bring back one of their undone steps even after later edits. Answers the draft.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "editId": {
                    "description": "An undone step of the creator's to bring back, by its id from List Analytics Page Edits. Left out: the step Redo would take next.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the creator (ANALYTICS_PAGE_NOT_FOUND), or editId is not one of the creator's steps (ANALYTICS_PAGE_STEP_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Nothing to redo (ANALYTICS_PAGE_NOTHING_TO_REDO), the step is already applied (ANALYTICS_PAGE_STEP_APPLIED), or the change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, ANALYTICS_EMBED_CONFIRMATION_CHANGED): send it again with the confirmationReceipt from error.details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/publish": {
      "post": {
        "operationId": "v2-publish-analytics-page",
        "summary": "Publish a page's draft as a new version, which becomes what everyone it is shared with sees, as the editor's Publish button does",
        "description": "Publish a page's draft as a new version, which becomes what everyone it is shared with sees, as the editor's Publish button does. Owners and editors may publish.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageVersion"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot do this on the page: their access, seat or role does not allow it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/discard-draft": {
      "post": {
        "operationId": "v2-discard-analytics-page-draft",
        "summary": "Throw away a page's unpublished changes: the draft goes back to the version viewers see",
        "description": "Throw away a page's unpublished changes: the draft goes back to the version viewers see. The discarded changes are kept as a backup version that Restore Analytics Page Version can bring back. Owner only.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can discard its draft (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id is open to the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/versions": {
      "get": {
        "operationId": "v2-list-analytics-page-versions",
        "summary": "List a page's published versions, newest first, with the one viewers see marked",
        "description": "List a page's published versions, newest first, with the one viewers see marked. Owner only.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, version, name, notes, isPublished, createdBy, createdByName, createdOn, publishedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, version, name, isPublished, createdOn, publishedOn. Default: -version,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, version, name, isPublished, createdBy, createdOn, publishedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on version: `version=value` matches it exactly. Bracket operators: `version[ne]`, `version[gt]`, `version[gte]`, `version[lt]`, `version[lte]`, and `version[in]` / `version[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "isPublished",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPublished: `isPublished=value` matches it exactly. Bracket operators: `isPublished[ne]`, `isPublished[gt]`, `isPublished[gte]`, `isPublished[lt]`, `isPublished[lte]`, and `isPublished[in]` / `isPublished[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "publishedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on publishedOn: `publishedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `publishedOn[ne]`, `publishedOn[gt]`, `publishedOn[gte]`, `publishedOn[lt]`, `publishedOn[lte]`, and `publishedOn[in]` / `publishedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsPageVersion"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/versions/{versionId}/restore": {
      "post": {
        "operationId": "v2-restore-analytics-page-version",
        "summary": "Make an earlier version the page's draft",
        "description": "Make an earlier version the page's draft. Viewers keep seeing the published version until the draft is published. The draft it replaces is kept as a backup version. Owner only.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The version id, from List Analytics Page Versions."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can restore a version (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page or version with these ids is open to the creator (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PAGE_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/versions/{versionId}/publish": {
      "post": {
        "operationId": "v2-publish-analytics-page-version",
        "summary": "Make an earlier version the one viewers see again, without touching the draft",
        "description": "Make an earlier version the one viewers see again, without touching the draft. Owner only.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The version id, from List Analytics Page Versions."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageVersion"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can change the published version (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page or version with these ids is open to the creator (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PAGE_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/versions/{versionId}": {
      "put": {
        "operationId": "v2-update-analytics-page-version",
        "summary": "Name a version or change its notes",
        "description": "Name a version or change its notes. Only the fields sent change. Owner only.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The version id, from List Analytics Page Versions."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The version name.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "notes": {
                    "description": "Notes on what changed.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPageVersion"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body sends nothing to change (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Only the page owner can name its versions (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page or version with these ids is open to the creator (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PAGE_VERSION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels": {
      "post": {
        "operationId": "v2-create-analytics-panel",
        "summary": "Add a panel to a page the key's creator owns: a blank one, or a copy of another panel with fromPanelId",
        "description": "Add a panel to a page the key's creator owns: a blank one, or a copy of another panel with fromPanelId. Configure it with Update Analytics Panel. Send the page draft revision in If-Match.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "What the panel is called. Kept as sent: it is never renamed automatically. Left out, it is named after what it shows once it has data.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "placement": {
                    "description": "page (the default) puts it on the grid; drill makes a drill-down target that opens when another panel is clicked.",
                    "type": "string",
                    "enum": [
                      "page",
                      "drill"
                    ]
                  },
                  "layout": {
                    "description": "Where it goes on the 12-column grid. Left out, it goes below the other panels.",
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 11,
                        "description": "Leftmost column, 0-11."
                      },
                      "y": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Top row, from 0."
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12,
                        "description": "Width in columns, 1-12."
                      },
                      "h": {
                        "description": "Height in rows. Leave it out to size the panel to what it shows.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "x",
                      "y",
                      "w"
                    ]
                  },
                  "tabId": {
                    "description": "The page tab it goes on, from Get Analytics Page. Required when the page has tabs.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "fromPanelId": {
                    "description": "Copy this panel, with its sources and settings, instead of adding a blank one. From Get Analytics Page.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "fromPageId": {
                    "description": "The page fromPanelId is on, when it is not this page. It must be one the key's creator owns.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "acknowledgeWarnings": {
                    "description": "Copy anyway when the copy loses page variables or click wiring at this page. Without it, such a copy answers 409 with details.warnings.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPanel"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The page is a report, which holds one panel, or the panel to copy is a drill-down panel; details.reason names which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page (ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page or source panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The copy loses page variables or click wiring here; resend with acknowledgeWarnings (ANALYTICS_PANEL_DUPLICATE_CONFIRM).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels/{panelId}": {
      "get": {
        "operationId": "v2-get-analytics-panel",
        "summary": "Read one panel's full setup: its sources and their SQL, transform code, display settings, click wiring and layout",
        "description": "Read one panel's full setup: its sources and their SQL, transform code, display settings, click wiring and layout. Like Get Analytics Page, it reads the published version when the page has one, else the draft, unless version says otherwise.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Which version of the page to read. Left out: the published version when there is one, otherwise the draft, as Get Analytics Page reads it.",
              "type": "string",
              "enum": [
                "draft",
                "published"
              ],
              "x-enumDescriptions": {
                "draft": "The draft, with the changes not yet published. Editors and owners only.",
                "published": "The version viewers see."
              }
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPanelDetail"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot open the page, has no Analytics seat, or asked for the draft without edit access (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_DRAFT_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-analytics-panel",
        "summary": "Change a panel in the page's draft: only the fields you send change",
        "description": "Change a panel in the page's draft: only the fields you send change. Sources, transform code, display, click wiring and layout are checked before anything is saved, and a new transform or query runs at once (Get Analytics Panel Output reads the result). The change is one undo step; viewers see it once the page is published. meta.warnings lists anything saved that still needs a look.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The panel's title. Setting it turns off automatic renaming for this panel.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "description": "The line under the title when the panel opens as a full-page drill-down view. An empty string clears it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "placement": {
                    "description": "page puts the panel on the grid; drill takes it off the grid, to open when another panel drills into it.",
                    "type": "string",
                    "enum": [
                      "page",
                      "drill"
                    ]
                  },
                  "dataSources": {
                    "description": "Every data source feeding the panel, in order. Replaces the list.",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dataSourceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24,
                          "description": "The data source, from List Analytics Data Sources."
                        },
                        "alias": {
                          "description": "The name the query and transform code use for the source's rows. Made from the source's name when left out.",
                          "type": "string",
                          "maxLength": 64,
                          "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                        },
                        "query": {
                          "description": "DuckDB SQL over the source's rows, with the alias as the table name: filter, group, sort and limit here. An empty string shows every row.",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "followPageDate": {
                          "description": "false keeps the page's date filter off this source (an all-time figure).",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "dataSourceId"
                      ]
                    }
                  },
                  "transformCode": {
                    "description": "JavaScript function body receiving each source as a named input ({ alias }) and returning the rows to show. Use it only for what SQL cannot do. Saving it runs it; read the result with Get Analytics Panel Output. An empty string removes it.",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "displayType": {
                    "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.",
                    "type": "string",
                    "enum": [
                      "table",
                      "bar",
                      "line",
                      "combo",
                      "pareto",
                      "bump",
                      "scatter",
                      "bubble",
                      "quadrant",
                      "pie",
                      "treemap",
                      "heatmap",
                      "pivot",
                      "cohort",
                      "statusgrid",
                      "activity",
                      "funnel",
                      "waterfall",
                      "sankey",
                      "chord",
                      "statetimeline",
                      "timeline",
                      "stat",
                      "trend",
                      "progress",
                      "gauge",
                      "bullet",
                      "report",
                      "document",
                      "workbook",
                      "html",
                      "map",
                      "region",
                      "tabs",
                      "group"
                    ]
                  },
                  "columns": {
                    "description": "Table panels: the columns shown, in order. Replaces the list; an empty list lets the panel pick its columns from the rows.",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "description": "The row key to show (dot paths allowed). A button column takes an identifier you choose, which names its click event \"button:<key>\"."
                        },
                        "type": {
                          "description": "How the value is formatted: string, number, percent, ratio, currency, duration, rank, boolean, date, object, list, html, button.",
                          "type": "string",
                          "enum": [
                            "string",
                            "number",
                            "percent",
                            "ratio",
                            "currency",
                            "duration",
                            "rank",
                            "boolean",
                            "date",
                            "object",
                            "list",
                            "html",
                            "button"
                          ]
                        },
                        "label": {
                          "description": "Button columns: the text on the button.",
                          "type": "string",
                          "maxLength": 80
                        },
                        "tooltip": {
                          "description": "Button columns: one sentence shown on hover.",
                          "type": "string",
                          "maxLength": 280
                        },
                        "width": {
                          "description": "The width in pixels, 64-800. An empty string returns it to the width of its content.",
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 64,
                              "maximum": 800
                            },
                            {
                              "type": "string",
                              "const": ""
                            }
                          ]
                        }
                      },
                      "required": [
                        "key"
                      ]
                    }
                  },
                  "format": {
                    "description": "How each column's values are formatted, keyed by column: { \"<column>\": { \"type\": \"currency\" } }. Merged over what is stored; null for a column takes its format off.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "links": {
                    "description": "Table panels: the link each cell of a column opens, keyed by column. Merged over what is stored; null for a column takes its link off.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "style": {
                    "description": "The color of each series or category, keyed by its name. Merged over what is stored; null for a name takes its color off.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "settings": {
                    "description": "The settings of the panel's display type, keyed by block (annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group), as Get Analytics Panel answers them. A block is refused on a type that does not draw it.",
                    "type": "object",
                    "properties": {
                      "annotations": {
                        "description": "The annotations settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tooltip": {
                        "description": "The tooltip settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chart": {
                        "description": "The chart settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "bump": {
                        "description": "The bump settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "scatter": {
                        "description": "The scatter settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pie": {
                        "description": "The pie settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "treemap": {
                        "description": "The treemap settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cellGrid": {
                        "description": "The cellGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusGrid": {
                        "description": "The statusGrid settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "activity": {
                        "description": "The activity settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "funnel": {
                        "description": "The funnel settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "waterfall": {
                        "description": "The waterfall settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sankey": {
                        "description": "The sankey settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chord": {
                        "description": "The chord settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statetimeline": {
                        "description": "The statetimeline settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stat": {
                        "description": "The stat settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "trend": {
                        "description": "The trend settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "target": {
                        "description": "The target settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "report": {
                        "description": "The report settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "document": {
                        "description": "The document settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "workbook": {
                        "description": "The workbook settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "html": {
                        "description": "The html settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "map": {
                        "description": "The map settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "region": {
                        "description": "The region settings. A block you send is merged over the stored one: send only the fields you change.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tabs": {
                        "description": "The tabs settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "group": {
                        "description": "The group settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.",
                        "anyOf": [
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "on": {
                    "description": "What clicking the panel's items does, keyed by event: rowClick, valueClick and the other events the display type fires, or \"button:<column key>\" for a button column. Replaces every wiring; null clears them all.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "drillDown",
                                    "openModal",
                                    "navigatePage",
                                    "setVariable",
                                    "startThread",
                                    "runWorkflow",
                                    "openUrl"
                                  ],
                                  "description": "What the event does: drillDown, openModal, navigatePage, setVariable, startThread, runWorkflow, openUrl."
                                },
                                "pageId": {
                                  "description": "navigatePage: the page to open, from List Analytics Pages.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "panelId": {
                                  "description": "drillDown or openModal: the drill-down panel on this page to open.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "variable": {
                                  "description": "setVariable: the select page variable the clicked row sets.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "code": {
                                  "description": "startThread or runWorkflow: JavaScript function body receiving { row, variables }. It is run against the panel's first row when you save.",
                                  "type": "string",
                                  "maxLength": 100000
                                },
                                "requireApproval": {
                                  "description": "startThread or runWorkflow: false skips the confirmation before the click runs. Defaults to true.",
                                  "type": "boolean"
                                },
                                "workflowId": {
                                  "description": "runWorkflow: the workflow to run, from List Workflows. It needs a webhook step and a published version.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "url": {
                                  "description": "openUrl: the http(s) address to open.",
                                  "type": "string",
                                  "maxLength": 2048,
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "action"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "interaction": {
                    "description": "Stat panels: make the tile a control that flips a toggle page variable. null makes it a normal panel again.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "toggles": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "description": "The toggle page variable the tile flips."
                          }
                        },
                        "required": [
                          "toggles"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "params": {
                    "description": "Drill-down panels: labels for the $params the source SQL reads, keyed by param. Replaces them; null clears them.",
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "maxLength": 64,
                          "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "description": "The param's human name on the drill-down view (\"User\").",
                              "type": "string",
                              "maxLength": 40
                            },
                            "labeledBy": {
                              "description": "The clicked row's field whose value names the opened view (\"userName\").",
                              "type": "string",
                              "maxLength": 120
                            }
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "displayCode": {
                    "description": "Advanced display: JavaScript function body that returns the display settings from the page variables. It is run when you save. An empty string goes back to the static settings and keeps the code.",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "aiSnippetsCode": {
                    "description": "Report panels: JavaScript function body returning { KEY: { prompt, additionalContext } } for the {{KEY}} tokens the transform writes. An empty string removes it.",
                    "type": "string",
                    "maxLength": 100000
                  },
                  "layout": {
                    "description": "The panel's place on the page's 12-column grid.",
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 11,
                        "description": "Leftmost column, 0-11."
                      },
                      "y": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991,
                        "description": "Top row, from 0."
                      },
                      "w": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12,
                        "description": "Width in columns, 1-12."
                      },
                      "h": {
                        "description": "Height in rows (about 48px each). Leave it out to keep the current height.",
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "x",
                      "y",
                      "w"
                    ]
                  },
                  "heightMode": {
                    "description": "auto takes a fixed height off, so the panel is as tall as what it shows.",
                    "type": "string",
                    "enum": [
                      "auto"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPanel"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A field cannot apply to this panel, such as columns on a chart or an event its type never fires (ANALYTICS_INVALID_REQUEST); the message names the fix. An empty body changes nothing (NO_FIELDS_TO_UPDATE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot edit the page (ANALYTICS_PAGE_FORBIDDEN), or, as an editor, named a source the page does not use (ANALYTICS_PANEL_SOURCE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-panel",
        "summary": "Delete a panel from a page the key's creator owns",
        "description": "Delete a panel from a page the key's creator owns. The clicks that opened it, the tab or group holding it, and the drill-down panels only it opened go with it, in one undo step. A panel published in an embed asks for confirmation first: resend with confirmationReceipt.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "name": "confirmationReceipt",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A report page holds one panel, which cannot be deleted. Delete the report page instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page (ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels/{panelId}/output": {
      "get": {
        "operationId": "v2-get-analytics-panel-output",
        "summary": "Read what a panel shows: its status, the failure message when it failed, and a window of its rows, for the page's default filters",
        "description": "Read what a panel shows: its status, the failure message when it failed, and a window of its rows, for the page's default filters. Like Get Analytics Panel, it reads the published version when the page has one, else the draft, unless version says otherwise. A drill-down panel stores only its unfiltered result; Preview Analytics Panel Drill-Down shows what a click produces.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Which version of the page to read. Left out: the published version when there is one, otherwise the draft.",
              "type": "string",
              "enum": [
                "draft",
                "published"
              ],
              "x-enumDescriptions": {
                "draft": "The draft, with the changes not yet published. Editors and owners only.",
                "published": "The version viewers see."
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "description": "How many rows to answer, 1-1000. Defaults to 100.",
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many rows to skip. Defaults to 0.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPanelOutput"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot open the page, or asked for the draft without edit access (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_DRAFT_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The stored result could not be read; try again (ANALYTICS_PANEL_RESULT_READ_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels/{panelId}/transform-preview": {
      "post": {
        "operationId": "v2-preview-analytics-panel-transform",
        "summary": "Run transform code against a panel's sources without saving it, and see the rows it returns",
        "description": "Run transform code against a panel's sources without saving it, and see the rows it returns. A preview returns at most the first 100 rows; rowCount says how many the code returned in all. Needs edit access to the page and the right to build in Analytics.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "JavaScript function body receiving each source as a named input ({ alias }) and returning rows, as transformCode on Update Analytics Panel."
                  },
                  "limit": {
                    "default": 100,
                    "description": "How many rows to answer, 1-1000. Defaults to 100.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  "offset": {
                    "default": 0,
                    "description": "How many rows to skip. Defaults to 0.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsTransformPreview"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The code failed or returned something other than rows; the message says where.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot edit the page (ANALYTICS_PAGE_FORBIDDEN) or build in Analytics (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels/{panelId}/drill-down-preview": {
      "post": {
        "operationId": "v2-preview-analytics-panel-drill-down",
        "summary": "Run a drill-down panel with the values a click would hand it, and see the rows it shows",
        "description": "Run a drill-down panel with the values a click would hand it, and see the rows it shows. Nothing is saved. A drill-down panel's stored output is its unfiltered result, so this is how you check what a click really produces.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "params": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 200
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        }
                      ]
                    },
                    "description": "The clicked row's values the panel's SQL reads as $params, keyed by param: { \"userId\": \"u_81Kq2\" }."
                  },
                  "variables": {
                    "description": "Page variable values to run it under, keyed by variable. Left out, the page's defaults apply.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "boolean"
                        }
                      ]
                    }
                  },
                  "version": {
                    "description": "Which version of the page to run. Left out: the published version when there is one, otherwise the draft.",
                    "type": "string",
                    "enum": [
                      "draft",
                      "published"
                    ],
                    "x-enumDescriptions": {
                      "draft": "The draft, with the changes not yet published. Editors and owners only.",
                      "published": "The version viewers see."
                    }
                  },
                  "limit": {
                    "default": 100,
                    "description": "How many rows to answer, 1-1000. Defaults to 100.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  "offset": {
                    "default": 0,
                    "description": "How many rows to skip. Defaults to 0.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "params"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDrillDownPreview"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "params has no binding, or the panel is not a drill-down (ANALYTICS_INVALID_REQUEST).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot open the page, or asked for the draft without edit access (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_PAGE_DRAFT_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/panels/{panelId}/subpages": {
      "post": {
        "operationId": "v2-create-analytics-subpage",
        "summary": "Create a subpage that a panel's click opens: the page and the click's navigatePage wiring are made together",
        "description": "Create a subpage that a panel's click opens: the page and the click's navigatePage wiring are made together. The event must not be wired yet. Build the subpage's panels with Create Analytics Panel. It changes the parent page's draft, so send that draft's revision in If-Match.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "panelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The panel id, from Get Analytics Page."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "What the subpage is called, such as \"Customer detail\"."
                  },
                  "description": {
                    "description": "One line under its title saying what it answers.",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "event": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The unused click on the panel that opens it: rowClick, valueClick, or \"button:<column key>\" for a button column."
                  },
                  "variables": {
                    "description": "The variables the subpage receives, in page order, as Set Analytics Page Variables takes them. A select takes the clicked row's field of the same name.",
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "dateRange",
                              "description": "A date window."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: a preset id (last30d when left out), a rolling window such as last21d or last2Months, or a range such as 2026-01-01..2026-06-30.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "presets": {
                              "description": "The preset menu, in order. Left out, the standard menu shows. One of: today, yesterday, last7d, last14d, last30d, last90d, thisWeek, lastWeek, thisMonth, lastMonth, last3Months, lastQuarter, thisYear, last12Months, allTime.",
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "today",
                                  "yesterday",
                                  "last7d",
                                  "last14d",
                                  "last30d",
                                  "last90d",
                                  "thisWeek",
                                  "lastWeek",
                                  "thisMonth",
                                  "lastMonth",
                                  "last3Months",
                                  "lastQuarter",
                                  "thisYear",
                                  "last12Months",
                                  "allTime"
                                ]
                              }
                            },
                            "showCalendar": {
                              "description": "Whether viewers can pick a custom range on a calendar. Defaults to true.",
                              "type": "boolean"
                            },
                            "timeGranularity": {
                              "description": "Whether custom ranges carry start and end times instead of whole days. Defaults to false.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "select",
                              "description": "One value, or several with multiple, from a list of choices."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "default": {
                              "description": "What the page opens with: all (nothing picked, the default) or one choice value.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "multiple": {
                              "description": "Whether viewers can pick several choices. $<name> is then a list: read it with ($<name>_all OR list_contains($<name>, column)).",
                              "type": "boolean"
                            },
                            "labeledBy": {
                              "description": "When a row click sets this variable: the clicked row field that names the value for people.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "options": {
                              "type": "object",
                              "properties": {
                                "dataSourceId": {
                                  "description": "The data source whose records supply the choices, from List Analytics Data Sources.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 24
                                },
                                "query": {
                                  "description": "SQL over the source (as src) answering value and optionally label columns, such as SELECT DISTINCT region AS value FROM src ORDER BY value.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2000
                                },
                                "valueField": {
                                  "description": "Without a query: the source column whose values are the choices.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "labelField": {
                                  "description": "Without a query: the source column shown for each choice.",
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "values": {
                                  "description": "Instead of a data source: the choices typed out, up to 100.",
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "The choice value queries see."
                                      },
                                      "label": {
                                        "description": "What viewers see for it. Defaults to the value.",
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      }
                                    },
                                    "required": [
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "description": "Where the choices come from: a data source with a query or value and label columns, or typed values."
                            }
                          },
                          "required": [
                            "name",
                            "type",
                            "options"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "search",
                              "description": "Free text a viewer types; it always starts empty."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "label": {
                              "description": "The picker label. Required for a second picker of the same type on a page.",
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
                              "description": "The variable name, camelCase and starting with a letter, such as region or date. Queries read it as $<name>; a dateRange also exposes $<name>_from and $<name>_to, and a select $<name>_all."
                            },
                            "type": {
                              "type": "string",
                              "const": "toggle",
                              "description": "An on or off switch, usually set by a stat tile wired to it."
                            },
                            "control": {
                              "description": "Whether the variable shows a picker on the page. Defaults to chip for dateRange, select and search, and none for toggle.",
                              "type": "string",
                              "enum": [
                                "chip",
                                "none"
                              ],
                              "x-enumDescriptions": {
                                "chip": "Shows a picker on the page title row that every viewer can use.",
                                "none": "No picker: only clicks and wired tiles set it, and it still narrows queries."
                              }
                            },
                            "default": {
                              "description": "Whether it starts on. Defaults to true.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "name",
                            "type"
                          ]
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "name",
                  "event"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsSubpage"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The panel does not fire this event, or a variable is invalid; the message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page (ANALYTICS_PAGE_FORBIDDEN) or cannot build in Analytics (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The page has no panel with this id (ANALYTICS_PANEL_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The event is already wired to something (ANALYTICS_SUBPAGE_EVENT_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the page draft since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources": {
      "get": {
        "operationId": "v2-list-analytics-data-sources",
        "summary": "List the data sources of the key's creator, as the app's Data sources page lists them, with each one's freshness",
        "description": "List the data sources of the key's creator, as the app's Data sources page lists them, with each one's freshness.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, createdBy, type, appId, actionId, actionName, connectionId, status, rowCount, fetchedOn, message, refreshIntervalSeconds, isIncrementalEnabled, incrementalIntervalSeconds, isPaused, panelCount, isUnused, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, createdBy, type, appId, actionId, actionName, connectionId, status, rowCount, fetchedOn, refreshIntervalSeconds, panelCount, createdOn, updatedOn. Default: -updatedOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, description, createdBy, type, appId, actionId, actionName, connectionId, status, rowCount, fetchedOn, refreshIntervalSeconds, isIncrementalEnabled, isPaused, panelCount, isUnused, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "createdBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdBy: `createdBy=value` matches it exactly. Bracket operators: `createdBy[ne]`, `createdBy[gt]`, `createdBy[gte]`, `createdBy[lt]`, `createdBy[lte]`, `createdBy[contains]`, `createdBy[starts]`, `createdBy[ends]`, and `createdBy[in]` / `createdBy[nin]` with comma-separated values."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "sync",
                "live",
                "merge",
                "fixed"
              ]
            },
            "description": "Filter on type: `type=value` matches it exactly. Bracket operators: `type[ne]`, `type[gt]`, `type[gte]`, `type[lt]`, `type[lte]`, `type[contains]`, `type[starts]`, `type[ends]`, and `type[in]` / `type[nin]` with comma-separated values."
          },
          {
            "name": "appId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on appId: `appId=value` matches it exactly. Bracket operators: `appId[ne]`, `appId[gt]`, `appId[gte]`, `appId[lt]`, `appId[lte]`, `appId[contains]`, `appId[starts]`, `appId[ends]`, and `appId[in]` / `appId[nin]` with comma-separated values."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionId: `actionId=value` matches it exactly. Bracket operators: `actionId[ne]`, `actionId[gt]`, `actionId[gte]`, `actionId[lt]`, `actionId[lte]`, `actionId[contains]`, `actionId[starts]`, `actionId[ends]`, and `actionId[in]` / `actionId[nin]` with comma-separated values."
          },
          {
            "name": "actionName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on actionName: `actionName=value` matches it exactly. Bracket operators: `actionName[ne]`, `actionName[gt]`, `actionName[gte]`, `actionName[lt]`, `actionName[lte]`, `actionName[contains]`, `actionName[starts]`, `actionName[ends]`, and `actionName[in]` / `actionName[nin]` with comma-separated values."
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on connectionId: `connectionId=value` matches it exactly. Bracket operators: `connectionId[ne]`, `connectionId[gt]`, `connectionId[gte]`, `connectionId[lt]`, `connectionId[lte]`, `connectionId[contains]`, `connectionId[starts]`, `connectionId[ends]`, and `connectionId[in]` / `connectionId[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "neverFetched",
                "noData",
                "draft",
                "queued",
                "refreshing",
                "ready",
                "empty",
                "failed"
              ]
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "rowCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on rowCount: `rowCount=value` matches it exactly. Bracket operators: `rowCount[ne]`, `rowCount[gt]`, `rowCount[gte]`, `rowCount[lt]`, `rowCount[lte]`, and `rowCount[in]` / `rowCount[nin]` with comma-separated values."
          },
          {
            "name": "fetchedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on fetchedOn: `fetchedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `fetchedOn[ne]`, `fetchedOn[gt]`, `fetchedOn[gte]`, `fetchedOn[lt]`, `fetchedOn[lte]`, and `fetchedOn[in]` / `fetchedOn[nin]` with comma-separated values."
          },
          {
            "name": "refreshIntervalSeconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on refreshIntervalSeconds: `refreshIntervalSeconds=value` matches it exactly. Bracket operators: `refreshIntervalSeconds[ne]`, `refreshIntervalSeconds[gt]`, `refreshIntervalSeconds[gte]`, `refreshIntervalSeconds[lt]`, `refreshIntervalSeconds[lte]`, and `refreshIntervalSeconds[in]` / `refreshIntervalSeconds[nin]` with comma-separated values."
          },
          {
            "name": "isIncrementalEnabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isIncrementalEnabled: `isIncrementalEnabled=value` matches it exactly. Bracket operators: `isIncrementalEnabled[ne]`, `isIncrementalEnabled[gt]`, `isIncrementalEnabled[gte]`, `isIncrementalEnabled[lt]`, `isIncrementalEnabled[lte]`, and `isIncrementalEnabled[in]` / `isIncrementalEnabled[nin]` with comma-separated values."
          },
          {
            "name": "isPaused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPaused: `isPaused=value` matches it exactly. Bracket operators: `isPaused[ne]`, `isPaused[gt]`, `isPaused[gte]`, `isPaused[lt]`, `isPaused[lte]`, and `isPaused[in]` / `isPaused[nin]` with comma-separated values."
          },
          {
            "name": "panelCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on panelCount: `panelCount=value` matches it exactly. Bracket operators: `panelCount[ne]`, `panelCount[gt]`, `panelCount[gte]`, `panelCount[lt]`, `panelCount[lte]`, and `panelCount[in]` / `panelCount[nin]` with comma-separated values."
          },
          {
            "name": "isUnused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isUnused: `isUnused=value` matches it exactly. Bracket operators: `isUnused[ne]`, `isUnused[gt]`, `isUnused[gte]`, `isUnused[lt]`, `isUnused[lte]`, and `isUnused[in]` / `isUnused[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Search text: sources whose name contains it (case-insensitive; * matches anything), or whose id is exactly it."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsDataSourceSummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-data-source",
        "summary": "Create a data source for Analytics panels to read, owned by the key's creator, and start its first fetch",
        "description": "Create a data source for Analytics panels to read, owned by the key's creator, and start its first fetch.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "sync",
                      "live",
                      "merge",
                      "fixed"
                    ],
                    "x-enumDescriptions": {
                      "sync": "Fetched from an app action on a schedule and stored.",
                      "live": "Fetched from an app action when a drill-down opens, with its values; never stored.",
                      "merge": "Combines other sources with SQL and code.",
                      "fixed": "Rows you supply; never refetched."
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "A name for the source. Left out, one is written from what it fetches."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "What the data holds, in a sentence. Left out, one is written from the data."
                  },
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "The app to fetch from, by id or slug, from List Universal Apps."
                  },
                  "action": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The app's read action, by id or slug, from List Universal Actions."
                  },
                  "connectionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24,
                    "description": "The connection to fetch with, from List Connections."
                  },
                  "arguments": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "The action's arguments, { argumentKey: value }, as Get Universal Action lists them. Values may use date expressions such as {{now-2y}}."
                  },
                  "options": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "The action's options, such as { \"pagination\": { \"mode\": \"all\" } }."
                  },
                  "query": {
                    "type": "object",
                    "properties": {
                      "filter": {
                        "description": "The filter the app applies, as Get Universal Action describes it. Values must be literals."
                      },
                      "sort": {
                        "description": "The sort the app applies."
                      }
                    },
                    "description": "A filter and sort the app applies before the rows are stored. The action must support them exactly, or the request is refused."
                  },
                  "refreshIntervalSeconds": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 604800,
                    "description": "How often a sync or merge source refreshes in full, in seconds, up to 604800. A source that takes long to fetch may be held to a longer interval; the answer says what was set."
                  },
                  "dataSources": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dataSourceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24,
                          "description": "The input source, a sync or fixed source of yours, from List Analytics Data Sources."
                        },
                        "alias": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "The name the merge SQL and code read this input by."
                        },
                        "query": {
                          "description": "SQL that shapes this input before the merge, reading it as `src`. Leave it out to use the input as is.",
                          "type": "string",
                          "maxLength": 20000
                        }
                      },
                      "required": [
                        "dataSourceId",
                        "alias"
                      ]
                    },
                    "description": "For a merge source: the sources it combines."
                  },
                  "transformCode": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "For a merge source: JavaScript that receives each input by its alias and returns the combined rows. Required when there is more than one input."
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "description": "For a fixed source: the rows, as objects with the same keys, up to 1000. They replace the source's data."
                  },
                  "dateKeys": {
                    "type": "object",
                    "properties": {
                      "primaryDateKey": {
                        "description": "The column page date filters use.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "primaryDateKeyGrain": {
                        "description": "That column's grain, such as day or month.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 32
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdDateKey": {
                        "description": "The column holding when each record was created.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updatedDateKey": {
                        "description": "The column holding when each record last changed.",
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "hasNoDates": {
                        "description": "True when the source has no date column.",
                        "type": "boolean"
                      }
                    },
                    "description": "Which columns hold dates, for page date filters. Left out (or null on update), they are worked out from the data after each refresh."
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body does not fit the source type, or the merge, arguments or rows are invalid (ANALYTICS_DATA_SOURCE_INVALID), the app or action was not found (APP_NOT_FOUND, ACTION_NOT_FOUND), the action does not read (ANALYTICS_ACTION_NOT_READABLE), or the action cannot apply the query exactly (ANALYTICS_SOURCE_QUERY_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/{dataSourceId}": {
      "get": {
        "operationId": "v2-get-analytics-data-source",
        "summary": "Get one of the creator's data sources: what it fetches, how it refreshes, and its latest result",
        "description": "Get one of the creator's data sources: what it fetches, how it refreshes, and its latest result.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The data sources could not be read just now; try again (ANALYTICS_DATA_SOURCES_READ_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-analytics-data-source",
        "summary": "Change one of the creator's data sources: what it fetches (then fetched again), or how it is kept",
        "description": "Change one of the creator's data sources: what it fetches (then fetched again), or how it is kept.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "A name for the source. Left out, one is written from what it fetches."
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000,
                        "description": "What the data holds, in a sentence. Left out, one is written from the data."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "app": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "The app to fetch from, by id or slug, from List Universal Apps."
                  },
                  "action": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The app's read action, by id or slug, from List Universal Actions."
                  },
                  "connectionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24,
                    "description": "The connection to fetch with, from List Connections."
                  },
                  "arguments": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "The action's arguments, { argumentKey: value }, as Get Universal Action lists them. Values may use date expressions such as {{now-2y}}."
                  },
                  "options": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {},
                    "description": "The action's options, such as { \"pagination\": { \"mode\": \"all\" } }."
                  },
                  "query": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "filter": {
                            "description": "The filter the app applies, as Get Universal Action describes it. Values must be literals."
                          },
                          "sort": {
                            "description": "The sort the app applies."
                          }
                        },
                        "description": "A filter and sort the app applies before the rows are stored. The action must support them exactly, or the request is refused."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dataSources": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dataSourceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24,
                          "description": "The input source, a sync or fixed source of yours, from List Analytics Data Sources."
                        },
                        "alias": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "The name the merge SQL and code read this input by."
                        },
                        "query": {
                          "description": "SQL that shapes this input before the merge, reading it as `src`. Leave it out to use the input as is.",
                          "type": "string",
                          "maxLength": 20000
                        }
                      },
                      "required": [
                        "dataSourceId",
                        "alias"
                      ]
                    },
                    "description": "For a merge source: the sources it combines."
                  },
                  "transformCode": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "For a merge source: JavaScript that receives each input by its alias and returns the combined rows. Required when there is more than one input."
                  },
                  "rows": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "description": "For a fixed source: the rows, as objects with the same keys, up to 1000. They replace the source's data."
                  },
                  "dateKeys": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "primaryDateKey": {
                            "description": "The column page date filters use.",
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 255
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "primaryDateKeyGrain": {
                            "description": "That column's grain, such as day or month.",
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 32
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdDateKey": {
                            "description": "The column holding when each record was created.",
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 255
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updatedDateKey": {
                            "description": "The column holding when each record last changed.",
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 255
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hasNoDates": {
                            "description": "True when the source has no date column.",
                            "type": "boolean"
                          }
                        },
                        "description": "Which columns hold dates, for page date filters. Left out (or null on update), they are worked out from the data after each refresh."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sheetName": {
                    "description": "For a fixed source made from a spreadsheet file: the sheet to read.",
                    "type": "string",
                    "maxLength": 255
                  },
                  "useHeader": {
                    "description": "For a fixed source made from a spreadsheet file: whether its first row holds the column names.",
                    "type": "boolean"
                  },
                  "removeTopRows": {
                    "description": "For a fixed source made from a spreadsheet file: how many rows above the header to skip.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "refreshIntervalSeconds": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 604800,
                    "description": "How often a sync or merge source refreshes in full, in seconds, up to 604800. A source that takes long to fetch may be held to a longer interval; the answer says what was set."
                  },
                  "isIncrementalEnabled": {
                    "description": "For a sync source: switch incremental refreshes on or off. On needs incremental details whose status is active, saved now or before.",
                    "type": "boolean"
                  },
                  "incrementalIntervalSeconds": {
                    "description": "For a sync source: how often incremental refreshes run, in seconds. Held between the shortest and longest the app allows, and shorter than the full refresh.",
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "incrementalDetails": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "description": "Whether this source can fetch only changed records: active or unavailable.",
                        "type": "string",
                        "enum": [
                          "active",
                          "unavailable"
                        ],
                        "x-enumDescriptions": {
                          "active": "This source can fetch only changed records.",
                          "unavailable": "It cannot."
                        }
                      },
                      "dedupKey": {
                        "description": "The field paths that identify a record, such as [\"id\"].",
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sinceArguments": {
                        "description": "The extra action arguments that ask the app for records changed since the last check, keyed like the source's arguments, such as { \"updatedAfter\": \"{{since}}\" }.",
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "catches": {
                        "description": "What the change check finds: newAndChanged or newOnly. Left out, it is measured.",
                        "type": "string",
                        "enum": [
                          "newAndChanged",
                          "newOnly"
                        ],
                        "x-enumDescriptions": {
                          "newAndChanged": "The check finds new and edited records.",
                          "newOnly": "It finds new records only."
                        }
                      },
                      "overlapSeconds": {
                        "description": "How far back before the last check each check looks, in seconds: one of 300, 900, 1800, 3600, 7200, 21600.",
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "description": "How this sync source fetches only changed records. Setting status active checks the dedupKey and sinceArguments against the stored rows and the app first, and saves nothing if they fail."
                  },
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE), a field does not fit the source type (ANALYTICS_DATA_SOURCE_INVALID), the app or action was not found or does not read (APP_NOT_FOUND, ACTION_NOT_FOUND, ANALYTICS_ACTION_NOT_READABLE), the query cannot be applied exactly (ANALYTICS_SOURCE_QUERY_INVALID), incremental refreshes were turned on without details of your own (ANALYTICS_INCREMENTAL_DETAILS_REQUIRED), or the incremental details failed their check (ANALYTICS_INCREMENTAL_DETAILS_INVALID, ANALYTICS_SINCE_ARGUMENTS_INVALID, ANALYTICS_DEDUP_KEY_REJECTED, ANALYTICS_SINCE_FILTER_REJECTED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm. Also: the source changed while it was being saved (ANALYTICS_DATA_SOURCE_CONFLICT), or the incremental details cannot be checked until a full refresh finishes (ANALYTICS_SNAPSHOT_NOT_READY, ANALYTICS_SNAPSHOT_TRUNCATED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-data-source",
        "summary": "Delete one of the creator's data sources, as the app's Delete does: panels that read it lose that data",
        "description": "Delete one of the creator's data sources, as the app's Delete does: panels that read it lose that data.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "name": "confirmationReceipt",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/{dataSourceId}/fetch": {
      "post": {
        "operationId": "v2-fetch-analytics-data-source",
        "summary": "Start a fresh fetch of a sync, merge or fixed data source without changing it, as the app's Refresh does",
        "description": "Start a fresh fetch of a sync, merge or fixed data source without changing it, as the app's Refresh does.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "description": "For a source another member owns: the id of a page shared with the key's creator that uses it, from List Analytics Pages.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSourceFetch"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The source is a live source, which fetches only when its drill-down opens (ANALYTICS_SOURCE_LIVE_NOT_FETCHABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED). Or the creator can only view the page and the data was refreshed too recently (ANALYTICS_VIEWER_REFRESH_TOO_SOON).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A fetch would start the source's automatic incremental setup, which the API never starts: settle its incremental refreshes first with Update Analytics Data Source (ANALYTICS_INCREMENTAL_SETUP_PENDING).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many writes with this key in the last minute (RATE_LIMITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The refresh could not be queued just now (ANALYTICS_REFRESH_RESULT_READ_FAILED). Try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/{dataSourceId}/result": {
      "get": {
        "operationId": "v2-get-analytics-data-source-result",
        "summary": "Read a data source's stored rows and the state of its last fetch, a window of rows at a time",
        "description": "Read a data source's stored rows and the state of its last fetch, a window of rows at a time.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "name": "pageId",
            "in": "query",
            "required": false,
            "schema": {
              "description": "For a source another member owns: the id of a page shared with the key's creator that uses it, from List Analytics Pages.",
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "description": "How many rows to answer, 1-1000. Defaults to 100.",
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many rows to skip. Defaults to 0.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSourceResult"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The stored rows could not be read; try again (ANALYTICS_RESULT_READ_FAILED, ANALYTICS_RESULT_PAYLOAD_READ_FAILED, ANALYTICS_RESULT_PAYLOAD_MISSING).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/{dataSourceId}/query": {
      "post": {
        "operationId": "v2-query-analytics-data-source",
        "summary": "Run one read-only SQL statement over a data source's stored rows, which the SQL reads as `src`",
        "description": "Run one read-only SQL statement over a data source's stored rows, which the SQL reads as `src`.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sql": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000,
                    "description": "One read-only SELECT statement over the stored rows, read as `src`. DuckDB SQL."
                  },
                  "limit": {
                    "default": 200,
                    "description": "How many rows to answer, 1 to 200. Defaults to 200. Page past it with LIMIT and OFFSET in the SQL.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200
                  },
                  "pageId": {
                    "description": "For a source another member owns: the id of a page shared with the key's creator that uses it, from List Analytics Pages.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "sql"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSourceQuery"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The SQL failed or is not read-only, the source is a live source with no stored rows, or it has no fetched data yet (ANALYTICS_SOURCE_QUERY_FAILED; the message says which).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/merge-preview": {
      "post": {
        "operationId": "v2-preview-analytics-merge",
        "summary": "Try a merge source before saving it: each input after its SQL, and what the code combines them into",
        "description": "Try a merge source before saving it: each input after its SQL, and what the code combines them into. Nothing is saved.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dataSources": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dataSourceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24,
                          "description": "The input source, a sync or fixed source of yours, from List Analytics Data Sources."
                        },
                        "alias": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "The name the merge SQL and code read this input by."
                        },
                        "query": {
                          "description": "SQL that shapes this input before the merge, reading it as `src`. Leave it out to use the input as is.",
                          "type": "string",
                          "maxLength": 20000
                        }
                      },
                      "required": [
                        "dataSourceId",
                        "alias"
                      ]
                    },
                    "description": "The sources to combine, as Create Analytics Data Source takes them for a merge source."
                  },
                  "transformCode": {
                    "description": "The code that combines them, as for a merge source. Leave it out to see the inputs only.",
                    "type": "string",
                    "maxLength": 100000
                  }
                },
                "required": [
                  "dataSources"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsMergePreview"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The inputs or code are not a valid merge, such as an input that is not one of your sync or fixed sources (ANALYTICS_MERGE_CONFIG_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "An input has no fetched data to merge yet (ANALYTICS_MERGE_PREVIEW_SOURCE_NOT_READY), or could not be read (ANALYTICS_MERGE_PREVIEW_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/data-sources/{dataSourceId}/table": {
      "get": {
        "operationId": "v2-get-analytics-data-source-table",
        "summary": "Read a fixed source's table as the app's Edit table shows it: its columns, its rows in order, and the revision an update must send",
        "description": "Read a fixed source's table as the app's Edit table shows it: its columns, its rows in order, and the revision an update must send.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 100,
              "description": "How many rows to answer, 1-1000. Defaults to 100.",
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "description": "How many rows to skip. Defaults to 0.",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSourceTable"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The source is not a fixed source, or its last update could not be processed (ANALYTICS_TABLE_UNSUPPORTED, ANALYTICS_TABLE_UNSUPPORTED_SCHEMA, ANALYTICS_TABLE_PROCESSING_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The table is still processing an update; try again shortly (ANALYTICS_TABLE_PROCESSING).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The table could not be loaded just now; try again (ANALYTICS_TABLE_READ_FAILED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-analytics-data-source-table",
        "summary": "Change some rows of a fixed source's table, add rows, remove rows or add columns, and save, as the app's Edit table does",
        "description": "Change some rows of a fixed source's table, add rows, remove rows or add columns, and save, as the app's Edit table does.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "dataSourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The data source id, from List Analytics Data Sources."
            }
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operations": {
                    "default": [],
                    "description": "The changes, applied in order: setCells, insertRows and deleteRows. Row indexes count from 0 in the table as it stands after the operations before it. All of them apply, or none.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "setCells",
                              "description": "Change some values."
                            },
                            "cells": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "rowIndex": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991,
                                    "description": "The row, counted from 0."
                                  },
                                  "columnKey": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "description": "The column's key."
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The new value as text, or null to empty it."
                                  }
                                },
                                "required": [
                                  "rowIndex",
                                  "columnKey",
                                  "value"
                                ]
                              },
                              "description": "The values to set."
                            }
                          },
                          "required": [
                            "type",
                            "cells"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "insertRows",
                              "description": "Add rows."
                            },
                            "index": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991,
                              "description": "Where to insert them, counted from 0; the row count adds them at the end."
                            },
                            "rows": {
                              "minItems": 1,
                              "maxItems": 10000,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 10000
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "description": "The rows, each keyed by column as Get Analytics Data Source Table answers them. A column left out is empty."
                            }
                          },
                          "required": [
                            "type",
                            "index",
                            "rows"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deleteRows",
                              "description": "Remove rows."
                            },
                            "indexes": {
                              "minItems": 1,
                              "maxItems": 10000,
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "description": "The rows to remove, counted from 0."
                            }
                          },
                          "required": [
                            "type",
                            "indexes"
                          ]
                        }
                      ]
                    }
                  },
                  "addColumns": {
                    "default": [],
                    "description": "Columns to add after the existing ones, empty until operations fill them.",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255,
                          "description": "The new column's key."
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "wholeNumber",
                            "decimal",
                            "yesNo",
                            "date",
                            "dateTime"
                          ],
                          "x-enumDescriptions": {
                            "text": "Text.",
                            "wholeNumber": "A whole number.",
                            "decimal": "A decimal number.",
                            "yesNo": "Yes or no.",
                            "date": "A date.",
                            "dateTime": "A date and time."
                          },
                          "description": "What the column holds: text, wholeNumber, decimal, yesNo, date or dateTime."
                        }
                      },
                      "required": [
                        "name",
                        "type"
                      ]
                    }
                  },
                  "confirmationReceipt": {
                    "description": "Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for the same request: the confirmationReceipt from its error.details, confirming the change to the published embeds it lists.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsDataSourceTable"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE), an operation names a row or column the table does not have or a value does not fit its column (ANALYTICS_TABLE_INVALID_CELL, ANALYTICS_TABLE_LIMIT_EXCEEDED), a column type is unknown (ANALYTICS_TABLE_COLUMN_TYPE_UNKNOWN), or the source is not a fixed source (ANALYTICS_TABLE_UNSUPPORTED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator cannot build in Analytics: no Analytics seat or not a builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED), or their role cannot create pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No data source with this id is the key creator's, or, with pageId, used by that page (ANALYTICS_DATA_SOURCE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The table is still processing an update; try again shortly (ANALYTICS_TABLE_PROCESSING). The change reaches published embeds (ANALYTICS_EMBED_CONFIRMATION_REQUIRED, or ANALYTICS_EMBED_CONFIRMATION_CHANGED when they changed since the receipt). error.details lists the embeddings and carries a confirmationReceipt: send the same request again with it to confirm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "412": {
            "description": "Someone changed the table since the revision in If-Match (REVISION_MISMATCH). error.details.revision is the current one: read the definition again and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "428": {
            "description": "The If-Match header is missing (REVISION_REQUIRED). Send the revision you last read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/publications": {
      "get": {
        "operationId": "v2-list-analytics-publications",
        "summary": "List a page's publications: the schedules that send it by email, Slack or Microsoft Teams",
        "description": "List a page's publications: the schedules that send it by email, Slack or Microsoft Teams. Only the page's owner manages them.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, pageId, name, isActive, channel, scheduleType, intervalMinutes, days, monthDays, runDates, runTimes, timeZone, isOrganizationTimeZone, nextRunOn, autoPausedOn, autoPauseReason, recipientUserIds, externalRecipients, unsubscribedRecipientUserIds, unsubscribedExternalRecipients, subject, connectionId, destination, variables, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, pageId, name, isActive, channel, scheduleType, nextRunOn, connectionId, createdOn, updatedOn. Default: -createdOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, pageId, name, isActive, channel, scheduleType, timeZone, isOrganizationTimeZone, nextRunOn, connectionId, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "isActive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isActive: `isActive=value` matches it exactly. Bracket operators: `isActive[ne]`, `isActive[gt]`, `isActive[gte]`, `isActive[lt]`, `isActive[lte]`, and `isActive[in]` / `isActive[nin]` with comma-separated values."
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "slack",
                "teams"
              ]
            },
            "description": "Filter on channel: `channel=value` matches it exactly. Bracket operators: `channel[ne]`, `channel[gt]`, `channel[gte]`, `channel[lt]`, `channel[lte]`, `channel[contains]`, `channel[starts]`, `channel[ends]`, and `channel[in]` / `channel[nin]` with comma-separated values."
          },
          {
            "name": "scheduleType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "fixed",
                "interval",
                "monthly",
                "once"
              ]
            },
            "description": "Filter on scheduleType: `scheduleType=value` matches it exactly. Bracket operators: `scheduleType[ne]`, `scheduleType[gt]`, `scheduleType[gte]`, `scheduleType[lt]`, `scheduleType[lte]`, `scheduleType[contains]`, `scheduleType[starts]`, `scheduleType[ends]`, and `scheduleType[in]` / `scheduleType[nin]` with comma-separated values."
          },
          {
            "name": "timeZone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on timeZone: `timeZone=value` matches it exactly. Bracket operators: `timeZone[ne]`, `timeZone[gt]`, `timeZone[gte]`, `timeZone[lt]`, `timeZone[lte]`, `timeZone[contains]`, `timeZone[starts]`, `timeZone[ends]`, and `timeZone[in]` / `timeZone[nin]` with comma-separated values."
          },
          {
            "name": "isOrganizationTimeZone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isOrganizationTimeZone: `isOrganizationTimeZone=value` matches it exactly. Bracket operators: `isOrganizationTimeZone[ne]`, `isOrganizationTimeZone[gt]`, `isOrganizationTimeZone[gte]`, `isOrganizationTimeZone[lt]`, `isOrganizationTimeZone[lte]`, and `isOrganizationTimeZone[in]` / `isOrganizationTimeZone[nin]` with comma-separated values."
          },
          {
            "name": "nextRunOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on nextRunOn: `nextRunOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `nextRunOn[ne]`, `nextRunOn[gt]`, `nextRunOn[gte]`, `nextRunOn[lt]`, `nextRunOn[lte]`, and `nextRunOn[in]` / `nextRunOn[nin]` with comma-separated values."
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on connectionId: `connectionId=value` matches it exactly. Bracket operators: `connectionId[ne]`, `connectionId[gt]`, `connectionId[gte]`, `connectionId[lt]`, `connectionId[lte]`, `connectionId[contains]`, `connectionId[starts]`, `connectionId[ends]`, and `connectionId[in]` / `connectionId[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsPublication"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-publication",
        "summary": "Schedule a page to be sent by email, Slack or Microsoft Teams",
        "description": "Schedule a page to be sent by email, Slack or Microsoft Teams. It is created paused unless isActive is true. Only the page's owner can, with a builder seat and a role that may create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "What it is called, such as \"Weekly revenue\".",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "channel": {
                    "description": "Where it sends. Changing it clears the connection and destination; the recipients stay.",
                    "type": "string",
                    "enum": [
                      "email",
                      "slack",
                      "teams"
                    ],
                    "x-enumDescriptions": {
                      "email": "Email to the recipients, from MindCloud or from a Gmail or Outlook connection.",
                      "slack": "A message in a Slack channel, sent with a Slack connection.",
                      "teams": "A message in a Microsoft Teams channel, sent with a Microsoft Teams connection."
                    }
                  },
                  "scheduleType": {
                    "description": "How the schedule is set.",
                    "type": "string",
                    "enum": [
                      "fixed",
                      "interval",
                      "monthly",
                      "once"
                    ],
                    "x-enumDescriptions": {
                      "fixed": "On the weekdays in days, at each time in runTimes.",
                      "interval": "Every intervalMinutes, starting at the first time in runTimes.",
                      "monthly": "On the days of the month in monthDays, at each time in runTimes.",
                      "once": "Once, on the date in runDates, at the time in runTimes."
                    }
                  },
                  "intervalMinutes": {
                    "description": "For interval: minutes between sends, 360 (six hours) to 43200 (thirty days).",
                    "type": "integer",
                    "minimum": 360,
                    "maximum": 43200
                  },
                  "days": {
                    "description": "For fixed: weekdays, 0 (Sunday) to 6 (Saturday).",
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "monthDays": {
                    "description": "For monthly: days of the month, 1 to 30, or -1 for the last day.",
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "runDates": {
                    "description": "For once: the date, as YYYY-MM-DD.",
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "runTimes": {
                    "description": "Times of day, zero-padded HH:MM in timeZone, like 09:00. Activating needs at least one.",
                    "maxItems": 24,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    }
                  },
                  "timeZone": {
                    "description": "An IANA time zone, such as America/New_York, or null to follow the organization's time zone (the default).",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recipientUserIds": {
                    "description": "Member recipients by user id, from List Members. Replaces the list. At most 50.",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "externalRecipients": {
                    "description": "Email addresses outside the organization. Each one gets the page by email, from outside your organization. Replaces the list. At most 50.",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    }
                  },
                  "subject": {
                    "description": "The email subject. Leave it out to use the page's name.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "connectionId": {
                    "description": "The connection to send through, from List Connections, or null. Email: a Gmail or Outlook connection, or null for MindCloud's own sender. Slack and teams need one of that app. Its owner must let the key's creator use it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "destination": {
                    "description": "For slack and teams: where it posts. Find the ids with Resolve Universal Lookup on the app. Replaces the stored destination.",
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "description": "Slack and Teams: the channel id to post in.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "channelLabel": {
                        "description": "Slack and Teams: the channel name, shown in the app.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "teamId": {
                        "description": "Teams: the team id.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "teamLabel": {
                        "description": "Teams: the team name, shown in the app.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": {}
                  },
                  "variables": {
                    "description": "Its own filter values, by page variable name (see Get Analytics Page), each as the page's link carries it. Replaces the stored map; {} goes back to the page's defaults.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000
                    }
                  },
                  "isActive": {
                    "description": "true schedules it, false pauses it. Activating needs a complete schedule and, for slack and teams, a connection and destination.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPublication"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "An input is invalid (ANALYTICS_PUBLICATION_INVALID_ARGUMENT, ANALYTICS_PUBLICATION_VARIABLES_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks a builder seat or the permission to create Analytics pages (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No page with this id (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "It was created paused, but the connection, destination or activation could not be set (ANALYTICS_PUBLICATION_SETUP_INCOMPLETE). details.publicationId is the new one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/publications/{publicationId}": {
      "put": {
        "operationId": "v2-update-analytics-publication",
        "summary": "Change a publication's schedule, channel, recipients, destination or filter values, or turn it on or off",
        "description": "Change a publication's schedule, channel, recipients, destination or filter values, or turn it on or off. Only the fields sent change; recipientUserIds, externalRecipients, destination and variables each replace their stored value. Only the page's owner can, with a builder seat and a role that may create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The publication id, from List Analytics Publications."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "What it is called, such as \"Weekly revenue\".",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "channel": {
                    "description": "Where it sends. Changing it clears the connection and destination; the recipients stay.",
                    "type": "string",
                    "enum": [
                      "email",
                      "slack",
                      "teams"
                    ],
                    "x-enumDescriptions": {
                      "email": "Email to the recipients, from MindCloud or from a Gmail or Outlook connection.",
                      "slack": "A message in a Slack channel, sent with a Slack connection.",
                      "teams": "A message in a Microsoft Teams channel, sent with a Microsoft Teams connection."
                    }
                  },
                  "scheduleType": {
                    "description": "How the schedule is set.",
                    "type": "string",
                    "enum": [
                      "fixed",
                      "interval",
                      "monthly",
                      "once"
                    ],
                    "x-enumDescriptions": {
                      "fixed": "On the weekdays in days, at each time in runTimes.",
                      "interval": "Every intervalMinutes, starting at the first time in runTimes.",
                      "monthly": "On the days of the month in monthDays, at each time in runTimes.",
                      "once": "Once, on the date in runDates, at the time in runTimes."
                    }
                  },
                  "intervalMinutes": {
                    "description": "For interval: minutes between sends, 360 (six hours) to 43200 (thirty days).",
                    "type": "integer",
                    "minimum": 360,
                    "maximum": 43200
                  },
                  "days": {
                    "description": "For fixed: weekdays, 0 (Sunday) to 6 (Saturday).",
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "monthDays": {
                    "description": "For monthly: days of the month, 1 to 30, or -1 for the last day.",
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "runDates": {
                    "description": "For once: the date, as YYYY-MM-DD.",
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "runTimes": {
                    "description": "Times of day, zero-padded HH:MM in timeZone, like 09:00. Activating needs at least one.",
                    "maxItems": 24,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    }
                  },
                  "timeZone": {
                    "description": "An IANA time zone, such as America/New_York, or null to follow the organization's time zone (the default).",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "recipientUserIds": {
                    "description": "Member recipients by user id, from List Members. Replaces the list. At most 50.",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "externalRecipients": {
                    "description": "Email addresses outside the organization. Each one gets the page by email, from outside your organization. Replaces the list. At most 50.",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    }
                  },
                  "subject": {
                    "description": "The email subject. Leave it out to use the page's name.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "connectionId": {
                    "description": "The connection to send through, from List Connections, or null. Email: a Gmail or Outlook connection, or null for MindCloud's own sender. Slack and teams need one of that app. Its owner must let the key's creator use it.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "destination": {
                    "description": "For slack and teams: where it posts. Find the ids with Resolve Universal Lookup on the app. Replaces the stored destination.",
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "description": "Slack and Teams: the channel id to post in.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "channelLabel": {
                        "description": "Slack and Teams: the channel name, shown in the app.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "teamId": {
                        "description": "Teams: the team id.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "teamLabel": {
                        "description": "Teams: the team name, shown in the app.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": {}
                  },
                  "variables": {
                    "description": "Its own filter values, by page variable name (see Get Analytics Page), each as the page's link carries it. Replaces the stored map; {} goes back to the page's defaults.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000
                    }
                  },
                  "isActive": {
                    "description": "true schedules it, false pauses it. Activating needs a complete schedule and, for slack and teams, a connection and destination.",
                    "type": "boolean"
                  },
                  "resubscribeRecipientUserIds": {
                    "description": "Members who unsubscribed and should get it again, by user id. Only with their agreement.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "resubscribeExternalRecipients": {
                    "description": "Outside addresses that unsubscribed and should get it again. Only with their agreement.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPublication"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent, or an input is invalid (NO_FIELDS_TO_UPDATE, ANALYTICS_PUBLICATION_INVALID_ARGUMENT, ANALYTICS_PUBLICATION_VARIABLES_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks a builder seat or the permission to create Analytics pages (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page or publication (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PUBLICATION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-publication",
        "summary": "Delete a publication: it stops sending for good",
        "description": "Delete a publication: it stops sending for good. Its delivery history is kept. Only the page's owner can, with a builder seat and a role that may create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The publication id, from List Analytics Publications."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks a builder seat or the permission to create Analytics pages (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page or publication (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PUBLICATION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/publications/{publicationId}/send": {
      "post": {
        "operationId": "v2-send-analytics-publication",
        "summary": "Send a publication now, once, outside its schedule, as the app's Send now does",
        "description": "Send a publication now, once, outside its schedule, as the app's Send now does. It answers when the send starts; the run's status settles within a minute or two. Only the page's owner can, with a builder seat and a role that may create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The publication id, from List Analytics Publications."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "202": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsPublicationRun"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks a builder seat or the permission to create Analytics pages (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page or publication (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_PUBLICATION_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A send for this minute already started (ANALYTICS_PUBLICATION_WINDOW_CLAIMED). It goes out once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/publications/{publicationId}/runs": {
      "get": {
        "operationId": "v2-list-analytics-publication-runs",
        "summary": "List a publication's sends, scheduled and Send now, newest first: when each went out, to how many people, and why a failed one failed",
        "description": "List a publication's sends, scheduled and Send now, newest first: when each went out, to how many people, and why a failed one failed. Only the page's owner can.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "publicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, publicationId, pageId, isManual, status, statusOn, recipientCount, externalRecipientCount, errorCode, errorMessage, createdOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, statusOn, createdOn. Default: -statusOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: isManual, status, statusOn, errorCode. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "isManual",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isManual: `isManual=value` matches it exactly. Bracket operators: `isManual[ne]`, `isManual[gt]`, `isManual[gte]`, `isManual[lt]`, `isManual[lte]`, and `isManual[in]` / `isManual[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "claimed",
                "sending",
                "sent",
                "failed",
                "missed"
              ]
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "statusOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on statusOn: `statusOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `statusOn[ne]`, `statusOn[gt]`, `statusOn[gte]`, `statusOn[lt]`, `statusOn[lte]`, and `statusOn[in]` / `statusOn[nin]` with comma-separated values."
          },
          {
            "name": "errorCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on errorCode: `errorCode=value` matches it exactly. Bracket operators: `errorCode[ne]`, `errorCode[gt]`, `errorCode[gte]`, `errorCode[lt]`, `errorCode[lte]`, `errorCode[contains]`, `errorCode[starts]`, `errorCode[ends]`, and `errorCode[in]` / `errorCode[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsPublicationRun"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/shares": {
      "get": {
        "operationId": "v2-list-analytics-page-shares",
        "summary": "List who a page is shared with: members, roles, teams, the organization and guests, including what it inherits from its folders",
        "description": "List who a page is shared with: members, roles, teams, the organization and guests, including what it inherits from its folders. Only the page's owner can.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, viaFolderName, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, createdOn, updatedOn. Default: -createdOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "organization",
                "role",
                "team",
                "guest"
              ]
            },
            "description": "Filter on targetType: `targetType=value` matches it exactly. Bracket operators: `targetType[ne]`, `targetType[gt]`, `targetType[gte]`, `targetType[lt]`, `targetType[lte]`, `targetType[contains]`, `targetType[starts]`, `targetType[ends]`, and `targetType[in]` / `targetType[nin]` with comma-separated values."
          },
          {
            "name": "permission",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "view",
                "edit"
              ]
            },
            "description": "Filter on permission: `permission=value` matches it exactly. Bracket operators: `permission[ne]`, `permission[gt]`, `permission[gte]`, `permission[lt]`, `permission[lte]`, `permission[contains]`, `permission[starts]`, `permission[ends]`, and `permission[in]` / `permission[nin]` with comma-separated values."
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on userId: `userId=value` matches it exactly. Bracket operators: `userId[ne]`, `userId[gt]`, `userId[gte]`, `userId[lt]`, `userId[lte]`, `userId[contains]`, `userId[starts]`, `userId[ends]`, and `userId[in]` / `userId[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "roleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleId: `roleId=value` matches it exactly. Bracket operators: `roleId[ne]`, `roleId[gt]`, `roleId[gte]`, `roleId[lt]`, `roleId[lte]`, `roleId[contains]`, `roleId[starts]`, `roleId[ends]`, and `roleId[in]` / `roleId[nin]` with comma-separated values."
          },
          {
            "name": "roleName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleName: `roleName=value` matches it exactly. Bracket operators: `roleName[ne]`, `roleName[gt]`, `roleName[gte]`, `roleName[lt]`, `roleName[lte]`, `roleName[contains]`, `roleName[starts]`, `roleName[ends]`, and `roleName[in]` / `roleName[nin]` with comma-separated values."
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on teamId: `teamId=value` matches it exactly. Bracket operators: `teamId[ne]`, `teamId[gt]`, `teamId[gte]`, `teamId[lt]`, `teamId[lte]`, `teamId[contains]`, `teamId[starts]`, `teamId[ends]`, and `teamId[in]` / `teamId[nin]` with comma-separated values."
          },
          {
            "name": "teamName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on teamName: `teamName=value` matches it exactly. Bracket operators: `teamName[ne]`, `teamName[gt]`, `teamName[gte]`, `teamName[lt]`, `teamName[lte]`, `teamName[contains]`, `teamName[starts]`, `teamName[ends]`, and `teamName[in]` / `teamName[nin]` with comma-separated values."
          },
          {
            "name": "viaFolderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on viaFolderId: `viaFolderId=value` matches it exactly. Bracket operators: `viaFolderId[ne]`, `viaFolderId[gt]`, `viaFolderId[gte]`, `viaFolderId[lt]`, `viaFolderId[lte]`, `viaFolderId[contains]`, `viaFolderId[starts]`, `viaFolderId[ends]`, and `viaFolderId[in]` / `viaFolderId[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsShare"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-page-share",
        "summary": "Share a page with a member, a role, a team, the organization, or a guest outside it",
        "description": "Share a page with a member, a role, a team, the organization, or a guest outside it. Only the page's owner can. A new member share and every guest invite send an email.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "user",
                      "organization",
                      "role",
                      "team",
                      "guest"
                    ],
                    "x-enumDescriptions": {
                      "user": "One member of the organization.",
                      "organization": "Everyone in the organization.",
                      "role": "Every member whose role is this one, now and later.",
                      "team": "Every member of this team, now and later.",
                      "guest": "A person outside the organization, by email. View only, pages only. They get an email with a link that works for 30 days and asks for a code sent to that address."
                    },
                    "description": "Who the share is for."
                  },
                  "permission": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "x-enumDescriptions": {
                      "view": "Can open it.",
                      "edit": "Can open and edit it, as their role allows."
                    },
                    "description": "What they can do. A guest can only view."
                  },
                  "userId": {
                    "description": "For user: the member, from List Members.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "email": {
                    "description": "For user: the member's email, in place of userId. For guest: the address to invite.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "roleId": {
                    "description": "For role: the role, from List Roles.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "teamId": {
                    "description": "For team: the team, from List Teams.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "targetType",
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsShare"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The target is not one that can be shared with (ANALYTICS_SHARE_TARGET_REQUIRED, ANALYTICS_SHARE_TARGET_NOT_FOUND, ANALYTICS_SHARE_TARGET_AMBIGUOUS, ANALYTICS_SHARE_TARGET_IS_OWNER, ANALYTICS_SHARE_PERSONAL_ACCOUNT, ANALYTICS_SHARE_ROLE_UNKNOWN, ANALYTICS_SHARE_TEAM_UNKNOWN, ANALYTICS_SHARE_GUEST_EMAIL_INVALID, ANALYTICS_SHARE_GUEST_IS_MEMBER, ANALYTICS_SHARE_GUEST_VIEW_ONLY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks the seat or role to manage it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page of the key's creator (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "That target already has a share here (ANALYTICS_SHARE_EXISTS); error.details.shareId names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/shares/{shareId}": {
      "put": {
        "operationId": "v2-update-analytics-page-share",
        "summary": "Change what one share's target can do on the page",
        "description": "Change what one share's target can do on the page. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The share id, from List Analytics Page Shares."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "x-enumDescriptions": {
                      "view": "Can open it.",
                      "edit": "Can open and edit it, as their role allows."
                    },
                    "description": "What the target can do now. A guest can only view."
                  }
                },
                "required": [
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsShare"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A guest can only view (ANALYTICS_SHARE_GUEST_VIEW_ONLY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks the seat or role to manage it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page, or it has no share with this id (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_SHARE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The share comes from a folder the page is in; change it on the folder (ANALYTICS_SHARE_INHERITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-page-share",
        "summary": "Remove one share from the page",
        "description": "Remove one share from the page. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The share id, from List Analytics Page Shares."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks the seat or role to manage it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page, or it has no share with this id (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_SHARE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The share comes from a folder the page is in; remove it on the folder (ANALYTICS_SHARE_INHERITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/pages/{pageId}/shares/{shareId}/resend": {
      "post": {
        "operationId": "v2-resend-analytics-page-share",
        "summary": "Email a guest a fresh link to the page",
        "description": "Email a guest a fresh link to the page. The old link stops working at once. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The page id, from List Analytics Pages."
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The share id, from List Analytics Page Shares."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsShare"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Only a guest share has a link to resend (ANALYTICS_SHARE_NOT_GUEST).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page, or lacks the seat or role to manage it (ANALYTICS_PAGE_FORBIDDEN, ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page, or it has no share with this id (ANALYTICS_PAGE_NOT_FOUND, ANALYTICS_SHARE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The share comes from a folder the page is in (ANALYTICS_SHARE_INHERITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/folders/{folderId}/shares": {
      "get": {
        "operationId": "v2-list-analytics-folder-shares",
        "summary": "List who a folder is shared with: members, roles, teams and the organization",
        "description": "List who a folder is shared with: members, roles, teams and the organization. Every page inside follows these shares. Only the folder's owner can.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, viaFolderName, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, createdOn, updatedOn. Default: -createdOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, targetType, permission, userId, name, email, roleId, roleName, teamId, teamName, viaFolderId, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "user",
                "organization",
                "role",
                "team",
                "guest"
              ]
            },
            "description": "Filter on targetType: `targetType=value` matches it exactly. Bracket operators: `targetType[ne]`, `targetType[gt]`, `targetType[gte]`, `targetType[lt]`, `targetType[lte]`, `targetType[contains]`, `targetType[starts]`, `targetType[ends]`, and `targetType[in]` / `targetType[nin]` with comma-separated values."
          },
          {
            "name": "permission",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "view",
                "edit"
              ]
            },
            "description": "Filter on permission: `permission=value` matches it exactly. Bracket operators: `permission[ne]`, `permission[gt]`, `permission[gte]`, `permission[lt]`, `permission[lte]`, `permission[contains]`, `permission[starts]`, `permission[ends]`, and `permission[in]` / `permission[nin]` with comma-separated values."
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on userId: `userId=value` matches it exactly. Bracket operators: `userId[ne]`, `userId[gt]`, `userId[gte]`, `userId[lt]`, `userId[lte]`, `userId[contains]`, `userId[starts]`, `userId[ends]`, and `userId[in]` / `userId[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on email: `email=value` matches it exactly. Bracket operators: `email[ne]`, `email[gt]`, `email[gte]`, `email[lt]`, `email[lte]`, `email[contains]`, `email[starts]`, `email[ends]`, and `email[in]` / `email[nin]` with comma-separated values."
          },
          {
            "name": "roleId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleId: `roleId=value` matches it exactly. Bracket operators: `roleId[ne]`, `roleId[gt]`, `roleId[gte]`, `roleId[lt]`, `roleId[lte]`, `roleId[contains]`, `roleId[starts]`, `roleId[ends]`, and `roleId[in]` / `roleId[nin]` with comma-separated values."
          },
          {
            "name": "roleName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on roleName: `roleName=value` matches it exactly. Bracket operators: `roleName[ne]`, `roleName[gt]`, `roleName[gte]`, `roleName[lt]`, `roleName[lte]`, `roleName[contains]`, `roleName[starts]`, `roleName[ends]`, and `roleName[in]` / `roleName[nin]` with comma-separated values."
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on teamId: `teamId=value` matches it exactly. Bracket operators: `teamId[ne]`, `teamId[gt]`, `teamId[gte]`, `teamId[lt]`, `teamId[lte]`, `teamId[contains]`, `teamId[starts]`, `teamId[ends]`, and `teamId[in]` / `teamId[nin]` with comma-separated values."
          },
          {
            "name": "teamName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on teamName: `teamName=value` matches it exactly. Bracket operators: `teamName[ne]`, `teamName[gt]`, `teamName[gte]`, `teamName[lt]`, `teamName[lte]`, `teamName[contains]`, `teamName[starts]`, `teamName[ends]`, and `teamName[in]` / `teamName[nin]` with comma-separated values."
          },
          {
            "name": "viaFolderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on viaFolderId: `viaFolderId=value` matches it exactly. Bracket operators: `viaFolderId[ne]`, `viaFolderId[gt]`, `viaFolderId[gte]`, `viaFolderId[lt]`, `viaFolderId[lte]`, `viaFolderId[contains]`, `viaFolderId[starts]`, `viaFolderId[ends]`, and `viaFolderId[in]` / `viaFolderId[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsShare"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-folder-share",
        "summary": "Share a folder, and every page in it, with a member, a role, a team or the organization",
        "description": "Share a folder, and every page in it, with a member, a role, a team or the organization. Only the folder's owner can, with a builder seat and a role that can create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The folder id, from List Analytics Folders."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "user",
                      "organization",
                      "role",
                      "team"
                    ],
                    "x-enumDescriptions": {
                      "user": "One member of the organization.",
                      "organization": "Everyone in the organization.",
                      "role": "Every member whose role is this one, now and later.",
                      "team": "Every member of this team, now and later."
                    },
                    "description": "Who the share is for. Folders are shared inside the organization only."
                  },
                  "permission": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "x-enumDescriptions": {
                      "view": "Can open it.",
                      "edit": "Can open and edit it, as their role allows."
                    },
                    "description": "What they can do on every page in the folder."
                  },
                  "userId": {
                    "description": "For user: the member, from List Members.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "email": {
                    "description": "For user: the member's email, in place of userId.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320
                  },
                  "roleId": {
                    "description": "For role: the role, from List Roles.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "teamId": {
                    "description": "For team: the team, from List Teams.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "targetType",
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsShare"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The target is not one that can be shared with (ANALYTICS_SHARE_TARGET_REQUIRED, ANALYTICS_SHARE_TARGET_NOT_FOUND, ANALYTICS_SHARE_TARGET_AMBIGUOUS, ANALYTICS_SHARE_TARGET_IS_OWNER, ANALYTICS_SHARE_PERSONAL_ACCOUNT, ANALYTICS_SHARE_ROLE_UNKNOWN, ANALYTICS_SHARE_TEAM_UNKNOWN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator lacks the Analytics seat or role to share folders (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such folder of the key's creator (ANALYTICS_FOLDER_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "That target already has a share here (ANALYTICS_SHARE_EXISTS); error.details.shareId names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/folders/{folderId}/shares/{shareId}": {
      "put": {
        "operationId": "v2-update-analytics-folder-share",
        "summary": "Change what one share's target can do on the folder",
        "description": "Change what one share's target can do on the folder. Only the folder's owner can, with a builder seat and a role that can create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The folder id, from List Analytics Folders."
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The share id, from List Analytics Page Shares."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "x-enumDescriptions": {
                      "view": "Can open it.",
                      "edit": "Can open and edit it, as their role allows."
                    },
                    "description": "What the target can do now. A guest can only view."
                  }
                },
                "required": [
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsShare"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A guest can only view (ANALYTICS_SHARE_GUEST_VIEW_ONLY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator lacks the Analytics seat or role to share folders (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such folder, or it has no share with this id (ANALYTICS_FOLDER_NOT_FOUND, ANALYTICS_SHARE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The share comes from a folder the page is in; change it on the folder (ANALYTICS_SHARE_INHERITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-folder-share",
        "summary": "Remove one share from the folder, which every page inside loses too",
        "description": "Remove one share from the folder, which every page inside loses too. Only the folder's owner can, with a builder seat and a role that can create Analytics pages.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The folder id, from List Analytics Folders."
            }
          },
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The share id, from List Analytics Page Shares."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's creator lacks the Analytics seat or role to share folders (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED, ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such folder, or it has no share with this id (ANALYTICS_FOLDER_NOT_FOUND, ANALYTICS_SHARE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The share comes from a folder the page is in; remove it on the folder (ANALYTICS_SHARE_INHERITED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds": {
      "get": {
        "operationId": "v2-list-analytics-embeds",
        "summary": "List the embeds of the key's creator: the pages and panels they show on other sites, with their views in the last 30 days",
        "description": "List the embeds of the key's creator: the pages and panels they show on other sites, with their views in the last 30 days. Revoked embeds are left out. Needs a builder seat, as Embedded Analytics does in the app; without one the answer is 403 ANALYTICS_EMBED_FORBIDDEN.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, description, targetType, pageId, pageName, panelId, panelName, status, themeMode, themeId, style, viewsLast30Days, lastViewedOn, origins, activatedOn, revokedOn, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, targetType, pageId, pageName, status, viewsLast30Days, lastViewedOn, activatedOn, createdOn, updatedOn. Default: -updatedOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, targetType, pageId, pageName, panelId, status, themeMode, themeId, viewsLast30Days, lastViewedOn, activatedOn, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "page",
                "panel"
              ]
            },
            "description": "Filter on targetType: `targetType=value` matches it exactly. Bracket operators: `targetType[ne]`, `targetType[gt]`, `targetType[gte]`, `targetType[lt]`, `targetType[lte]`, `targetType[contains]`, `targetType[starts]`, `targetType[ends]`, and `targetType[in]` / `targetType[nin]` with comma-separated values."
          },
          {
            "name": "pageId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on pageId: `pageId=value` matches it exactly. Bracket operators: `pageId[ne]`, `pageId[gt]`, `pageId[gte]`, `pageId[lt]`, `pageId[lte]`, `pageId[contains]`, `pageId[starts]`, `pageId[ends]`, and `pageId[in]` / `pageId[nin]` with comma-separated values."
          },
          {
            "name": "pageName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on pageName: `pageName=value` matches it exactly. Bracket operators: `pageName[ne]`, `pageName[gt]`, `pageName[gte]`, `pageName[lt]`, `pageName[lte]`, `pageName[contains]`, `pageName[starts]`, `pageName[ends]`, and `pageName[in]` / `pageName[nin]` with comma-separated values."
          },
          {
            "name": "panelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on panelId: `panelId=value` matches it exactly. Bracket operators: `panelId[ne]`, `panelId[gt]`, `panelId[gte]`, `panelId[lt]`, `panelId[lte]`, `panelId[contains]`, `panelId[starts]`, `panelId[ends]`, and `panelId[in]` / `panelId[nin]` with comma-separated values."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inactive",
                "active",
                "revoked"
              ]
            },
            "description": "Filter on status: `status=value` matches it exactly. Bracket operators: `status[ne]`, `status[gt]`, `status[gte]`, `status[lt]`, `status[lte]`, `status[contains]`, `status[starts]`, `status[ends]`, and `status[in]` / `status[nin]` with comma-separated values."
          },
          {
            "name": "themeMode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inherit",
                "cirra",
                "theme"
              ]
            },
            "description": "Filter on themeMode: `themeMode=value` matches it exactly. Bracket operators: `themeMode[ne]`, `themeMode[gt]`, `themeMode[gte]`, `themeMode[lt]`, `themeMode[lte]`, `themeMode[contains]`, `themeMode[starts]`, `themeMode[ends]`, and `themeMode[in]` / `themeMode[nin]` with comma-separated values."
          },
          {
            "name": "themeId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on themeId: `themeId=value` matches it exactly. Bracket operators: `themeId[ne]`, `themeId[gt]`, `themeId[gte]`, `themeId[lt]`, `themeId[lte]`, `themeId[contains]`, `themeId[starts]`, `themeId[ends]`, and `themeId[in]` / `themeId[nin]` with comma-separated values."
          },
          {
            "name": "viewsLast30Days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on viewsLast30Days: `viewsLast30Days=value` matches it exactly. Bracket operators: `viewsLast30Days[ne]`, `viewsLast30Days[gt]`, `viewsLast30Days[gte]`, `viewsLast30Days[lt]`, `viewsLast30Days[lte]`, and `viewsLast30Days[in]` / `viewsLast30Days[nin]` with comma-separated values."
          },
          {
            "name": "lastViewedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on lastViewedOn: `lastViewedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `lastViewedOn[ne]`, `lastViewedOn[gt]`, `lastViewedOn[gte]`, `lastViewedOn[lt]`, `lastViewedOn[lte]`, and `lastViewedOn[in]` / `lastViewedOn[nin]` with comma-separated values."
          },
          {
            "name": "activatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on activatedOn: `activatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `activatedOn[ne]`, `activatedOn[gt]`, `activatedOn[gte]`, `activatedOn[lt]`, `activatedOn[lte]`, and `activatedOn[in]` / `activatedOn[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsEmbed"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-embed",
        "summary": "Create an embed of a page, or of one of its panels, to show on another site",
        "description": "Create an embed of a page, or of one of its panels, to show on another site. It starts inactive; nothing shows until Activate Analytics Embed. Only the page's owner can. Creating it publishes the page's draft when the page was never published, as the app does.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pageId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24,
                    "description": "The page to show, or the page holding the panel, from List Analytics Pages. A page embed takes an Analytics page or a written report."
                  },
                  "panelId": {
                    "description": "Only to show one panel instead of the whole page: the panel, from Get Analytics Page.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Its name, 1 to 255 characters, as the Embedded Analytics list shows it."
                  },
                  "description": {
                    "description": "A description, up to 2,000 characters, or null for none.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "themeMode": {
                    "description": "Which look it wears: \"inherit\" (The page's own look (its theme and style).), \"cirra\" (The plain Cirra look.), \"theme\" (The theme in themeId.) Sending themeId alone means \"theme\"; a new embed with neither wears \"inherit\".",
                    "type": "string",
                    "enum": [
                      "inherit",
                      "cirra",
                      "theme"
                    ]
                  },
                  "themeId": {
                    "description": "For themeMode \"theme\": the theme, from List Analytics Themes.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "style": {
                    "type": "object",
                    "properties": {
                      "fontFamily": {
                        "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "Inter, sans-serif",
                              "\"SF Pro Display\", -apple-system, sans-serif",
                              "\"Helvetica Neue\", Helvetica, sans-serif",
                              "system-ui, sans-serif",
                              "\"Segoe UI\", sans-serif",
                              "Roboto, sans-serif",
                              "\"Open Sans\", sans-serif",
                              "Lato, sans-serif",
                              "\"Source Sans 3\", sans-serif",
                              "\"IBM Plex Sans\", sans-serif",
                              "\"Atkinson Hyperlegible\", sans-serif",
                              "Georgia, \"Times New Roman\", serif",
                              "\"IBM Plex Mono\", monospace"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontScale": {
                        "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "1",
                              "0.9",
                              "1.1",
                              "1.25"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelTitleWeight": {
                        "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "regular",
                              "medium",
                              "bold"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageTitleSize": {
                        "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "large"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "seriesColors": {
                        "description": "Series colors: up to 8 light and dark color pairs, in the order charts hand colors out (the first is the first series).",
                        "anyOf": [
                          {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "light": {
                                      "type": "string",
                                      "description": "The color in light mode, as hex like #2563eb."
                                    },
                                    "dark": {
                                      "type": "string",
                                      "description": "The color in dark mode, as hex like #2563eb."
                                    }
                                  },
                                  "required": [
                                    "light",
                                    "dark"
                                  ],
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "A light and dark color pair, or null for the default color of that slot."
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusColors": {
                        "description": "Status colors: a light and dark color pair for success (Success), warning (Warning), warningBright (Caution), failure (Failure).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "success": {
                                "description": "Success: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warning": {
                                "description": "Warning: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warningBright": {
                                "description": "Caution: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failure": {
                                "description": "Failure: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartGridlines": {
                        "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "off",
                              "dashed",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartAreaFill": {
                        "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "light",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartCurve": {
                        "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "straight",
                              "smooth",
                              "natural"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartPoints": {
                        "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartValues": {
                        "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartLegend": {
                        "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberFormat": {
                        "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "point",
                              "comma",
                              "space"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberCompact": {
                        "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "always",
                              "never"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateOrder": {
                        "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "monthFirst",
                              "dayFirst"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateStyle": {
                        "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "short",
                              "medium",
                              "numeric"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelCorners": {
                        "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "square",
                              "rounded",
                              "soft"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelElevation": {
                        "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "hairline",
                              "raised"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelGap": {
                        "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "tight",
                              "regular",
                              "wide"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelPadding": {
                        "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tableDensity": {
                        "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageBackground": {
                        "description": "Page background: a light and dark color pair for page (Page).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "page": {
                                "description": "Page: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelFill": {
                        "description": "Panel fill: a light and dark color pair for panel (Panel).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "panel": {
                                "description": "Panel: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ink": {
                        "description": "Ink: a light and dark color pair for ink (Ink).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ink": {
                                "description": "Ink: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lineColor": {
                        "description": "Line color: a light and dark color pair for line (Line).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "line": {
                                "description": "Line: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "brandHeaderColor": {
                        "description": "Publication header color: a light and dark color pair for header (Header).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "header": {
                                "description": "Header: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cirraMark": {
                        "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {},
                    "description": "The look, option by option. An option left out or null uses the default."
                  }
                },
                "required": [
                  "pageId",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "An input is invalid (VALIDATION_FAILED): a style value outside its choices, a theme mode without its theme, or, as ANALYTICS_EMBED_INVALID, a theme that does not exist, a panel not in the published page, or a page type that cannot be embedded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key's creator does not own the page (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such page (ANALYTICS_PAGE_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The page could not be published for the embed, or changed while this ran (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}": {
      "get": {
        "operationId": "v2-get-analytics-embed",
        "summary": "Get one of the creator's embeds, revoked ones included",
        "description": "Get one of the creator's embeds, revoked ones included. Only the owner of its page can.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v2-update-analytics-embed",
        "summary": "Change an embed's name, description or look",
        "description": "Change an embed's name, description or look. Only the fields sent change; style replaces its style. Every installation shows the change at once, and its link stays the same. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "Its name, 1 to 255 characters, as the Embedded Analytics list shows it."
                  },
                  "description": {
                    "description": "A description, up to 2,000 characters, or null for none.",
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "themeMode": {
                    "description": "Which look it wears: \"inherit\" (The page's own look (its theme and style).), \"cirra\" (The plain Cirra look.), \"theme\" (The theme in themeId.) Sending themeId alone means \"theme\"; a new embed with neither wears \"inherit\".",
                    "type": "string",
                    "enum": [
                      "inherit",
                      "cirra",
                      "theme"
                    ]
                  },
                  "themeId": {
                    "description": "For themeMode \"theme\": the theme, from List Analytics Themes.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "style": {
                    "type": "object",
                    "properties": {
                      "fontFamily": {
                        "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "Inter, sans-serif",
                              "\"SF Pro Display\", -apple-system, sans-serif",
                              "\"Helvetica Neue\", Helvetica, sans-serif",
                              "system-ui, sans-serif",
                              "\"Segoe UI\", sans-serif",
                              "Roboto, sans-serif",
                              "\"Open Sans\", sans-serif",
                              "Lato, sans-serif",
                              "\"Source Sans 3\", sans-serif",
                              "\"IBM Plex Sans\", sans-serif",
                              "\"Atkinson Hyperlegible\", sans-serif",
                              "Georgia, \"Times New Roman\", serif",
                              "\"IBM Plex Mono\", monospace"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontScale": {
                        "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "1",
                              "0.9",
                              "1.1",
                              "1.25"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelTitleWeight": {
                        "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "regular",
                              "medium",
                              "bold"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageTitleSize": {
                        "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "large"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "seriesColors": {
                        "description": "Series colors: up to 8 light and dark color pairs, in the order charts hand colors out (the first is the first series).",
                        "anyOf": [
                          {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "light": {
                                      "type": "string",
                                      "description": "The color in light mode, as hex like #2563eb."
                                    },
                                    "dark": {
                                      "type": "string",
                                      "description": "The color in dark mode, as hex like #2563eb."
                                    }
                                  },
                                  "required": [
                                    "light",
                                    "dark"
                                  ],
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "A light and dark color pair, or null for the default color of that slot."
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusColors": {
                        "description": "Status colors: a light and dark color pair for success (Success), warning (Warning), warningBright (Caution), failure (Failure).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "success": {
                                "description": "Success: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warning": {
                                "description": "Warning: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warningBright": {
                                "description": "Caution: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failure": {
                                "description": "Failure: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartGridlines": {
                        "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "off",
                              "dashed",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartAreaFill": {
                        "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "light",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartCurve": {
                        "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "straight",
                              "smooth",
                              "natural"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartPoints": {
                        "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartValues": {
                        "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartLegend": {
                        "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberFormat": {
                        "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "point",
                              "comma",
                              "space"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberCompact": {
                        "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "always",
                              "never"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateOrder": {
                        "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "monthFirst",
                              "dayFirst"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateStyle": {
                        "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "short",
                              "medium",
                              "numeric"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelCorners": {
                        "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "square",
                              "rounded",
                              "soft"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelElevation": {
                        "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "hairline",
                              "raised"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelGap": {
                        "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "tight",
                              "regular",
                              "wide"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelPadding": {
                        "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tableDensity": {
                        "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageBackground": {
                        "description": "Page background: a light and dark color pair for page (Page).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "page": {
                                "description": "Page: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelFill": {
                        "description": "Panel fill: a light and dark color pair for panel (Panel).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "panel": {
                                "description": "Panel: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ink": {
                        "description": "Ink: a light and dark color pair for ink (Ink).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ink": {
                                "description": "Ink: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lineColor": {
                        "description": "Line color: a light and dark color pair for line (Line).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "line": {
                                "description": "Line: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "brandHeaderColor": {
                        "description": "Publication header color: a light and dark color pair for header (Header).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "header": {
                                "description": "Header: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cirraMark": {
                        "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {},
                    "description": "The look, option by option. An option left out or null uses the default."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE), or an input is invalid (VALIDATION_FAILED; ANALYTICS_EMBED_INVALID for a theme that does not exist).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The embed was revoked, or changed while this was saved (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}/activate": {
      "post": {
        "operationId": "v2-activate-analytics-embed",
        "summary": "Turn an embed on",
        "description": "Turn an embed on. From then on anyone with its link sees the published page or panel without signing in. An active embed stays as it is; one that was off gets a new link. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The published page can no longer be embedded: the panel is not in it, or the page holds content an embed cannot show (ANALYTICS_EMBED_INVALID). Publish the page again, or deactivate the embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The embed was revoked, its page has no published version, or it changed while this ran (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}/link": {
      "get": {
        "operationId": "v2-get-analytics-embed-link",
        "summary": "Get an active embed's link: the URL to put in an iframe, with the secret token it carries",
        "description": "Get an active embed's link: the URL to put in an iframe, with the secret token it carries. Anyone who has the link sees the published content without signing in. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbedLink"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The embed is inactive or revoked, so it has no link (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}/rotate-link": {
      "post": {
        "operationId": "v2-rotate-analytics-embed-link",
        "summary": "Give an active embed a new link",
        "description": "Give an active embed a new link. Its old link stops working at once, everywhere it is installed. Only the page's owner can. It is refused when the published page no longer fits the embed; Deactivate Analytics Embed always stops the old link.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The published page can no longer be embedded: the panel is not in it, or the page holds content an embed cannot show (ANALYTICS_EMBED_INVALID). Publish the page again, or deactivate the embed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Only an active embed has a link to replace; also when its page has no published version or the embed changed while this ran (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}/deactivate": {
      "post": {
        "operationId": "v2-deactivate-analytics-embed",
        "summary": "Turn an embed off",
        "description": "Turn an embed off. Every installation stops showing it at once, and its link stops working for good: activating it again gives it a new link. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The embed was revoked (ANALYTICS_EMBED_STATE_CONFLICT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/embeds/{embedId}/revoke": {
      "post": {
        "operationId": "v2-revoke-analytics-embed",
        "summary": "Turn an embed off for good",
        "description": "Turn an embed off for good. Its link never works again and it cannot be activated or changed; it leaves List Analytics Embeds. Revoking a revoked embed answers it as it is. Only the page's owner can.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "embedId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The embed id, from List Analytics Embeds."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsEmbed"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The creator's access to the embed's page changed while the request ran (ANALYTICS_EMBED_FORBIDDEN, ANALYTICS_PAGE_FORBIDDEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No embed with this id among the key's creator's embeds: none exists, its page was deleted, or the creator no longer owns its page (ANALYTICS_EMBED_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/folders": {
      "get": {
        "operationId": "v2-list-analytics-folders",
        "summary": "List the folders in the Analytics sidebar of the API key's creator, in sidebar order (position)",
        "description": "List the folders in the Analytics sidebar of the API key's creator, in sidebar order (position). Folders belong to one person: they organize that person's own pages and reports, and the pages others shared with them.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, position, name, section, parentFolderId, themeId, isPaused, pausedOn, hasShares, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, position, name, section, parentFolderId, themeId, isPaused, pausedOn, hasShares, createdOn, updatedOn. Default: position,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, position, name, section, parentFolderId, themeId, isPaused, pausedOn, hasShares, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "position",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on position: `position=value` matches it exactly. Bracket operators: `position[ne]`, `position[gt]`, `position[gte]`, `position[lt]`, `position[lte]`, and `position[in]` / `position[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "section",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pages",
                "reports",
                "sharedWithMe"
              ]
            },
            "description": "Filter on section: `section=value` matches it exactly. Bracket operators: `section[ne]`, `section[gt]`, `section[gte]`, `section[lt]`, `section[lte]`, `section[contains]`, `section[starts]`, `section[ends]`, and `section[in]` / `section[nin]` with comma-separated values."
          },
          {
            "name": "parentFolderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on parentFolderId: `parentFolderId=value` matches it exactly. Bracket operators: `parentFolderId[ne]`, `parentFolderId[gt]`, `parentFolderId[gte]`, `parentFolderId[lt]`, `parentFolderId[lte]`, `parentFolderId[contains]`, `parentFolderId[starts]`, `parentFolderId[ends]`, and `parentFolderId[in]` / `parentFolderId[nin]` with comma-separated values."
          },
          {
            "name": "themeId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on themeId: `themeId=value` matches it exactly. Bracket operators: `themeId[ne]`, `themeId[gt]`, `themeId[gte]`, `themeId[lt]`, `themeId[lte]`, `themeId[contains]`, `themeId[starts]`, `themeId[ends]`, and `themeId[in]` / `themeId[nin]` with comma-separated values."
          },
          {
            "name": "isPaused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isPaused: `isPaused=value` matches it exactly. Bracket operators: `isPaused[ne]`, `isPaused[gt]`, `isPaused[gte]`, `isPaused[lt]`, `isPaused[lte]`, and `isPaused[in]` / `isPaused[nin]` with comma-separated values."
          },
          {
            "name": "pausedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on pausedOn: `pausedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `pausedOn[ne]`, `pausedOn[gt]`, `pausedOn[gte]`, `pausedOn[lt]`, `pausedOn[lte]`, and `pausedOn[in]` / `pausedOn[nin]` with comma-separated values."
          },
          {
            "name": "hasShares",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on hasShares: `hasShares=value` matches it exactly. Bracket operators: `hasShares[ne]`, `hasShares[gt]`, `hasShares[gte]`, `hasShares[lt]`, `hasShares[lte]`, and `hasShares[in]` / `hasShares[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsFolder"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-folder",
        "summary": "Create a folder in the Analytics sidebar of the API key's creator, at the top of a section or inside another folder",
        "description": "Create a folder in the Analytics sidebar of the API key's creator, at the top of a section or inside another folder. Move pages into it with Update Analytics Page (folderId).\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The folder name, 1 to 255 characters."
                  },
                  "section": {
                    "description": "Which section the folder goes in: pages (the default), reports, or sharedWithMe. Ignored with parentFolderId, where the folder goes where its parent is.",
                    "type": "string",
                    "enum": [
                      "pages",
                      "reports",
                      "sharedWithMe"
                    ],
                    "x-enumDescriptions": {
                      "pages": "Holds your own pages (the default).",
                      "reports": "Holds your own reports.",
                      "sharedWithMe": "Organizes pages other people shared with you."
                    }
                  },
                  "parentFolderId": {
                    "description": "A folder to create this one inside, from List Analytics Folders.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 24
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsFolder"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY), or the sidebar refuses the name (ANALYTICS_FOLDER_NAME_INVALID).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator has no Analytics seat in the organization (ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "parentFolderId is not one of your folders (ANALYTICS_FOLDER_PARENT_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/folders/{folderId}": {
      "put": {
        "operationId": "v2-update-analytics-folder",
        "summary": "Rename a folder in your Analytics sidebar, move it into another folder or back to the top of its section, give its pages a theme, or pause it",
        "description": "Rename a folder in your Analytics sidebar, move it into another folder or back to the top of its section, give its pages a theme, or pause it. Only the fields sent change. Every change is checked before any is written.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The folder id, from List Analytics Folders."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The new folder name, 1 to 255 characters.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "parentFolderId": {
                    "description": "Move the folder inside this folder (from List Analytics Folders), or null to move it to the top of its section. It keeps its pages, subfolders and shares.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "themeId": {
                    "description": "The theme the folder's pages wear unless a page picks its own: a theme id from List Analytics Themes, \"cirra\" for the plain Cirra look, or null to follow the organization default.",
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isPaused": {
                    "description": "true pauses the folder: its pages stop refreshing their data. false resumes it and brings its pages up to date.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsFolder"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE), or the change cannot be made: a move into the folder itself or another section, a theme that does not exist, or a theme or pause on a Shared with me folder (ANALYTICS_FOLDER_THEME_NOT_FOUND, ANALYTICS_FOLDER_THEME_TYPE_UNSUPPORTED, ANALYTICS_FOLDER_PAUSE_TYPE_UNSUPPORTED). Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator has no Analytics seat in the organization (ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The folder, or parentFolderId, is not one of your folders (ANALYTICS_FOLDER_NOT_FOUND, ANALYTICS_FOLDER_PARENT_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The sidebar changed while the folder was being moved (ANALYTICS_FOLDER_ORDER_CONFLICT, ANALYTICS_FOLDER_ITEM_ORDER_CONFLICT). Send the request again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v2-delete-analytics-folder",
        "summary": "Delete a folder from your Analytics sidebar",
        "description": "Delete a folder from your Analytics sidebar. The pages and folders inside move up a level and nothing in them is deleted. Its shares stop granting anything, and the notes kept on it for Cirra are deleted.\n\nRequires the API key permission analytics:page:edit.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:edit"
            ]
          }
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The folder id, from List Analytics Folders."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeletedResource"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The creator has no Analytics seat in the organization (ANALYTICS_SEAT_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The folder is not one of your folders (ANALYTICS_FOLDER_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/themes": {
      "get": {
        "operationId": "v2-list-analytics-themes",
        "summary": "List the Analytics themes of the organization, most recently changed first",
        "description": "List the Analytics themes of the organization, most recently changed first. Every member can apply any of them to a page or a folder; \"cirra\" (not listed) is the plain Cirra look.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, name, isDefault, style, createdOn, updatedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, name, isDefault, createdOn, updatedOn. Default: -updatedOn,id."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, name, isDefault, createdOn, updatedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "isDefault",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isDefault: `isDefault=value` matches it exactly. Bracket operators: `isDefault[ne]`, `isDefault[gt]`, `isDefault[gte]`, `isDefault[lt]`, `isDefault[lte]`, and `isDefault[in]` / `isDefault[nin]` with comma-separated values."
          },
          {
            "name": "createdOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on createdOn: `createdOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `createdOn[ne]`, `createdOn[gt]`, `createdOn[gte]`, `createdOn[lt]`, `createdOn[lte]`, and `createdOn[in]` / `createdOn[nin]` with comma-separated values."
          },
          {
            "name": "updatedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on updatedOn: `updatedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `updatedOn[ne]`, `updatedOn[gt]`, `updatedOn[gte]`, `updatedOn[lt]`, `updatedOn[lte]`, and `updatedOn[in]` / `updatedOn[nin]` with comma-separated values."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsTheme"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v2-create-analytics-theme",
        "summary": "Create an Analytics theme for the organization: fonts, colors, chart and panel styling any member can apply to a page or a folder",
        "description": "Create an Analytics theme for the organization: fonts, colors, chart and panel styling any member can apply to a page or a folder. Needs the creator's builder seat and the create Analytics pages permission.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The theme name, 1 to 255 characters."
                  },
                  "style": {
                    "type": "object",
                    "properties": {
                      "fontFamily": {
                        "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "Inter, sans-serif",
                              "\"SF Pro Display\", -apple-system, sans-serif",
                              "\"Helvetica Neue\", Helvetica, sans-serif",
                              "system-ui, sans-serif",
                              "\"Segoe UI\", sans-serif",
                              "Roboto, sans-serif",
                              "\"Open Sans\", sans-serif",
                              "Lato, sans-serif",
                              "\"Source Sans 3\", sans-serif",
                              "\"IBM Plex Sans\", sans-serif",
                              "\"Atkinson Hyperlegible\", sans-serif",
                              "Georgia, \"Times New Roman\", serif",
                              "\"IBM Plex Mono\", monospace"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontScale": {
                        "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "1",
                              "0.9",
                              "1.1",
                              "1.25"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelTitleWeight": {
                        "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "regular",
                              "medium",
                              "bold"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageTitleSize": {
                        "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "large"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "seriesColors": {
                        "description": "Series colors: up to 8 light and dark color pairs, in the order charts hand colors out (the first is the first series).",
                        "anyOf": [
                          {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "light": {
                                      "type": "string",
                                      "description": "The color in light mode, as hex like #2563eb."
                                    },
                                    "dark": {
                                      "type": "string",
                                      "description": "The color in dark mode, as hex like #2563eb."
                                    }
                                  },
                                  "required": [
                                    "light",
                                    "dark"
                                  ],
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "A light and dark color pair, or null for the default color of that slot."
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "statusColors": {
                        "description": "Status colors: a light and dark color pair for success (Success), warning (Warning), warningBright (Caution), failure (Failure).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "success": {
                                "description": "Success: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warning": {
                                "description": "Warning: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "warningBright": {
                                "description": "Caution: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failure": {
                                "description": "Failure: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartGridlines": {
                        "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "off",
                              "dashed",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartAreaFill": {
                        "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "light",
                              "solid"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartCurve": {
                        "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "straight",
                              "smooth",
                              "natural"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartPoints": {
                        "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartValues": {
                        "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "chartLegend": {
                        "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberFormat": {
                        "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "point",
                              "comma",
                              "space"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numberCompact": {
                        "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto",
                              "always",
                              "never"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateOrder": {
                        "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "monthFirst",
                              "dayFirst"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dateStyle": {
                        "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "short",
                              "medium",
                              "numeric"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelCorners": {
                        "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "square",
                              "rounded",
                              "soft"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelElevation": {
                        "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "hairline",
                              "raised"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelGap": {
                        "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "none",
                              "tight",
                              "regular",
                              "wide"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelPadding": {
                        "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tableDensity": {
                        "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "compact",
                              "regular",
                              "comfortable"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "pageBackground": {
                        "description": "Page background: a light and dark color pair for page (Page).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "page": {
                                "description": "Page: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "panelFill": {
                        "description": "Panel fill: a light and dark color pair for panel (Panel).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "panel": {
                                "description": "Panel: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ink": {
                        "description": "Ink: a light and dark color pair for ink (Ink).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ink": {
                                "description": "Ink: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lineColor": {
                        "description": "Line color: a light and dark color pair for line (Line).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "line": {
                                "description": "Line: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "brandHeaderColor": {
                        "description": "Publication header color: a light and dark color pair for header (Header).",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "header": {
                                "description": "Header: a light and dark color pair, or null for the default.",
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "light": {
                                        "type": "string",
                                        "description": "The color in light mode, as hex like #2563eb."
                                      },
                                      "dark": {
                                        "type": "string",
                                        "description": "The color in dark mode, as hex like #2563eb."
                                      }
                                    },
                                    "required": [
                                      "light",
                                      "dark"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {}
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cirraMark": {
                        "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "shown",
                              "hidden"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {},
                    "description": "The look, option by option. An option left out or null uses the default."
                  },
                  "isDefault": {
                    "description": "true makes new pages in the organization start with this theme.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsTheme"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY), or the style holds a value the theme registry refuses; the message names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator has no builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED) or their role cannot create Analytics pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/themes/{themeId}": {
      "put": {
        "operationId": "v2-update-analytics-theme",
        "summary": "Change an Analytics theme: its name, its look, or whether new pages start with it",
        "description": "Change an Analytics theme: its name, its look, or whether new pages start with it. Only the fields sent change. style merges option by option: an option sent sets it, null clears it, and one left out stays; style null clears every option. Every page and folder wearing the theme changes with it.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "themeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The theme id, from List Analytics Themes."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "The new theme name, 1 to 255 characters.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "style": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fontFamily": {
                            "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "Inter, sans-serif",
                                  "\"SF Pro Display\", -apple-system, sans-serif",
                                  "\"Helvetica Neue\", Helvetica, sans-serif",
                                  "system-ui, sans-serif",
                                  "\"Segoe UI\", sans-serif",
                                  "Roboto, sans-serif",
                                  "\"Open Sans\", sans-serif",
                                  "Lato, sans-serif",
                                  "\"Source Sans 3\", sans-serif",
                                  "\"IBM Plex Sans\", sans-serif",
                                  "\"Atkinson Hyperlegible\", sans-serif",
                                  "Georgia, \"Times New Roman\", serif",
                                  "\"IBM Plex Mono\", monospace"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fontScale": {
                            "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "1",
                                  "0.9",
                                  "1.1",
                                  "1.25"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelTitleWeight": {
                            "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "regular",
                                  "medium",
                                  "bold"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pageTitleSize": {
                            "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "compact",
                                  "regular",
                                  "large"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "seriesColors": {
                            "description": "Series colors: up to 8 light and dark color pairs, in the order charts hand colors out (the first is the first series).",
                            "anyOf": [
                              {
                                "maxItems": 8,
                                "type": "array",
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "light": {
                                          "type": "string",
                                          "description": "The color in light mode, as hex like #2563eb."
                                        },
                                        "dark": {
                                          "type": "string",
                                          "description": "The color in dark mode, as hex like #2563eb."
                                        }
                                      },
                                      "required": [
                                        "light",
                                        "dark"
                                      ],
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "A light and dark color pair, or null for the default color of that slot."
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "statusColors": {
                            "description": "Status colors: a light and dark color pair for success (Success), warning (Warning), warningBright (Caution), failure (Failure).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "success": {
                                    "description": "Success: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "warning": {
                                    "description": "Warning: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "warningBright": {
                                    "description": "Caution: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "failure": {
                                    "description": "Failure: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartGridlines": {
                            "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "dashed",
                                  "solid"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartAreaFill": {
                            "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "light",
                                  "solid"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartCurve": {
                            "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "straight",
                                  "smooth",
                                  "natural"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartPoints": {
                            "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "shown",
                                  "hidden"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartValues": {
                            "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "shown",
                                  "hidden"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "chartLegend": {
                            "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "shown",
                                  "hidden"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "numberFormat": {
                            "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "point",
                                  "comma",
                                  "space"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "numberCompact": {
                            "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "auto",
                                  "always",
                                  "never"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dateOrder": {
                            "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "monthFirst",
                                  "dayFirst"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dateStyle": {
                            "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "short",
                                  "medium",
                                  "numeric"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelCorners": {
                            "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "square",
                                  "rounded",
                                  "soft"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelElevation": {
                            "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "hairline",
                                  "raised"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelGap": {
                            "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "tight",
                                  "regular",
                                  "wide"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelPadding": {
                            "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "compact",
                                  "regular",
                                  "comfortable"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tableDensity": {
                            "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "compact",
                                  "regular",
                                  "comfortable"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pageBackground": {
                            "description": "Page background: a light and dark color pair for page (Page).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "page": {
                                    "description": "Page: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "panelFill": {
                            "description": "Panel fill: a light and dark color pair for panel (Panel).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "panel": {
                                    "description": "Panel: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ink": {
                            "description": "Ink: a light and dark color pair for ink (Ink).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "ink": {
                                    "description": "Ink: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineColor": {
                            "description": "Line color: a light and dark color pair for line (Line).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "line": {
                                    "description": "Line: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "brandHeaderColor": {
                            "description": "Publication header color: a light and dark color pair for header (Header).",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "header": {
                                    "description": "Header: a light and dark color pair, or null for the default.",
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "light": {
                                            "type": "string",
                                            "description": "The color in light mode, as hex like #2563eb."
                                          },
                                          "dark": {
                                            "type": "string",
                                            "description": "The color in dark mode, as hex like #2563eb."
                                          }
                                        },
                                        "required": [
                                          "light",
                                          "dark"
                                        ],
                                        "additionalProperties": {}
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cirraMark": {
                            "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). null or left out uses the default.",
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "shown",
                                  "hidden"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": {},
                        "description": "The look, option by option. An option left out or null uses the default."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "isDefault": {
                    "description": "true makes new pages start with this theme; false stops it being the default, so new pages wear the plain Cirra look.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsTheme"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nothing to change was sent (NO_FIELDS_TO_UPDATE), the request is invalid (INVALID_QUERY), or the style holds a value the theme registry refuses; the message names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator has no builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED) or their role cannot create Analytics pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No theme with this id is in the organization (ANALYTICS_THEME_NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/templates": {
      "get": {
        "operationId": "v2-list-analytics-templates",
        "summary": "List the published Analytics templates the key's creator can see, as the Templates page lists them: ready-made pages and bundles from your organization, shared with it, and MindCloud's public library, in the library's order (your organization's first, then shared, then public; most installed first)",
        "description": "List the published Analytics templates the key's creator can see, as the Templates page lists them: ready-made pages and bundles from your organization, shared with it, and MindCloud's public library, in the library's order (your organization's first, then shared, then public; most installed first). Narrow it with q, app and tag, or filter on kind.\n\nEach filterable field is also a query parameter: `status=active` matches it exactly, and bracket operators (eq, ne, gt, gte, lt, lte, contains, starts, ends, in, nin) compare, e.g. `createdOn[gte]=2026-01-01` or `status[in]=failed,cancelled`. contains, starts, and ends apply to text fields only.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated fields to return; all of them when left out, and id always. Each item then carries only those keys, whatever its schema requires. Fields: id, kind, name, description, library, publisher, isOfficial, tags, appIds, installCount, canInstall, members, publishedOn."
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated sort fields; prefix one with - for descending. Sortable fields: id, kind, name, description, library, publisher, isOfficial, installCount, canInstall, publishedOn. Without sort, results keep the order the list reads them in."
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "RSQL filter expression. Filterable fields: id, kind, name, description, library, publisher, isOfficial, installCount, canInstall, publishedOn. Operators: ==, !=, >, >=, <, <=, =in=, =out=, =like=. Logical: ; (AND), , (OR); AND binds tighter than OR. Example: \"status==active;name=like=Sales*\""
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on id: `id=value` matches it exactly. Bracket operators: `id[ne]`, `id[gt]`, `id[gte]`, `id[lt]`, `id[lte]`, `id[contains]`, `id[starts]`, `id[ends]`, and `id[in]` / `id[nin]` with comma-separated values."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "page",
                "bundle"
              ]
            },
            "description": "Filter on kind: `kind=value` matches it exactly. Bracket operators: `kind[ne]`, `kind[gt]`, `kind[gte]`, `kind[lt]`, `kind[lte]`, `kind[contains]`, `kind[starts]`, `kind[ends]`, and `kind[in]` / `kind[nin]` with comma-separated values."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on name: `name=value` matches it exactly. Bracket operators: `name[ne]`, `name[gt]`, `name[gte]`, `name[lt]`, `name[lte]`, `name[contains]`, `name[starts]`, `name[ends]`, and `name[in]` / `name[nin]` with comma-separated values."
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on description: `description=value` matches it exactly. Bracket operators: `description[ne]`, `description[gt]`, `description[gte]`, `description[lt]`, `description[lte]`, `description[contains]`, `description[starts]`, `description[ends]`, and `description[in]` / `description[nin]` with comma-separated values."
          },
          {
            "name": "library",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "organization",
                "shared",
                "public"
              ]
            },
            "description": "Filter on library: `library=value` matches it exactly. Bracket operators: `library[ne]`, `library[gt]`, `library[gte]`, `library[lt]`, `library[lte]`, `library[contains]`, `library[starts]`, `library[ends]`, and `library[in]` / `library[nin]` with comma-separated values."
          },
          {
            "name": "publisher",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on publisher: `publisher=value` matches it exactly. Bracket operators: `publisher[ne]`, `publisher[gt]`, `publisher[gte]`, `publisher[lt]`, `publisher[lte]`, `publisher[contains]`, `publisher[starts]`, `publisher[ends]`, and `publisher[in]` / `publisher[nin]` with comma-separated values."
          },
          {
            "name": "isOfficial",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on isOfficial: `isOfficial=value` matches it exactly. Bracket operators: `isOfficial[ne]`, `isOfficial[gt]`, `isOfficial[gte]`, `isOfficial[lt]`, `isOfficial[lte]`, and `isOfficial[in]` / `isOfficial[nin]` with comma-separated values."
          },
          {
            "name": "installCount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Filter on installCount: `installCount=value` matches it exactly. Bracket operators: `installCount[ne]`, `installCount[gt]`, `installCount[gte]`, `installCount[lt]`, `installCount[lte]`, and `installCount[in]` / `installCount[nin]` with comma-separated values."
          },
          {
            "name": "canInstall",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter on canInstall: `canInstall=value` matches it exactly. Bracket operators: `canInstall[ne]`, `canInstall[gt]`, `canInstall[gte]`, `canInstall[lt]`, `canInstall[lte]`, and `canInstall[in]` / `canInstall[nin]` with comma-separated values."
          },
          {
            "name": "publishedOn",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter on publishedOn: `publishedOn=value` matches it exactly. A date or timestamp, such as 2026-10-01 or 2026-10-01T12:00:00Z. Bracket operators: `publishedOn[ne]`, `publishedOn[gt]`, `publishedOn[gte]`, `publishedOn[lt]`, `publishedOn[lte]`, and `publishedOn[in]` / `publishedOn[nin]` with comma-separated values."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "The library's own search over template names and descriptions: plain words, no wildcards (unlike name[contains], where * is one)."
          },
          {
            "name": "app",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "Only templates reading this app, by its id or slug, from List Universal Apps."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "description": "Only templates carrying this topic tag."
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AnalyticsTemplate"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  },
                  "required": [
                    "success",
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/templates/{templateId}/install-plan": {
      "get": {
        "operationId": "v2-get-analytics-template-install-plan",
        "summary": "Read what installing a template needs before you install it: every app its data sources read, with the connections the install accepts for each, and for a bundle the templates in it",
        "description": "Read what installing a template needs before you install it: every app its data sources read, with the connections the install accepts for each, and for a bundle the templates in it. Nothing is installed.\n\nRequires the API key permission analytics:page:view.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:view"
            ]
          }
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The template id, from List Analytics Templates."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsTemplateInstallPlan"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No template with this id is installable by the creator (ANALYTICS_TEMPLATE_NOT_FOUND, ANALYTICS_TEMPLATE_NOT_INSTALLABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/analytics/templates/{templateId}/install": {
      "post": {
        "operationId": "v2-install-analytics-template",
        "summary": "Install a template as the key's creator: a page template becomes one new page, a bundle becomes its pages in a new folder",
        "description": "Install a template as the key's creator: a page template becomes one new page, a bundle becomes its pages in a new folder. Every app the template needs takes a connection id or null (skip it); Get Analytics Template Install Plan lists them. Synced data sources start fetching at once, with incremental refreshes off; turn them on per source with Update Analytics Data Source.\n\nRequires the API key permission analytics:page:create.",
        "tags": [
          "analytics"
        ],
        "security": [
          {
            "apiKey": [
              "analytics:page:create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24,
              "description": "The template id, from List Analytics Templates."
            }
          },
          {
            "$ref": "#/components/parameters/MemberCompanyId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connections": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "maxLength": 48
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 24
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "One entry per app the template needs, keyed by the app's id or slug (from the install plan): a connection id (from the install plan or List Connections), or null to skip that app."
                  },
                  "name": {
                    "description": "A name for the new page, or for a bundle's new folder. Defaults to the template's name.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "templateIds": {
                    "description": "For a bundle, the members to install (ids from the install plan's members). Defaults to every member you can install.",
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 24
                    }
                  }
                },
                "required": [
                  "connections"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AnalyticsTemplateInstall"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Response metadata, on endpoints that answer it: the usage window, a step count, or the provider paging of a Universal action run."
                    }
                  },
                  "required": [
                    "success",
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid (INVALID_QUERY); an app the template needs has no entry in connections (ANALYTICS_TEMPLATE_CONNECTIONS_REQUIRED); templateIds names a member you cannot install (ANALYTICS_TEMPLATE_BUNDLE_MEMBER_UNAVAILABLE), or none can be (ANALYTICS_TEMPLATE_BUNDLE_EMPTY).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The creator has no builder seat (ANALYTICS_SEAT_REQUIRED, ANALYTICS_BUILDER_SEAT_REQUIRED) or their role cannot create Analytics pages (ANALYTICS_PAGE_CREATE_PERMISSION_REQUIRED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No template with this id is installable by the creator (ANALYTICS_TEMPLATE_NOT_FOUND, ANALYTICS_TEMPLATE_NOT_INSTALLABLE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/openapi.json": {
      "get": {
        "operationId": "v2-get-openapi-document",
        "summary": "Get this OpenAPI document",
        "description": "The OpenAPI 3.1 document describing the v2 surface, generated from the endpoint registry. No authentication required.",
        "tags": [
          "meta"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Company-scoped MindCloud API key sent as `Authorization: Bearer <key>`. Each key holds permissions from the MindCloud roles catalog (workflow:view, workflow:run, universal:read, api_key:manage, ...), chosen when it is created; each operation lists the ones it requires as this scheme's roles. A request may use a permission only while the user who created the key still holds it in the company the request acts on; a missing one answers 403 with details.reason API_KEY_PERMISSION_DENIED and details.required, and a key whose creator left the organization answers API_KEY_CREATOR_INACTIVE. The key's accessLevel (full_access, run_workflows, read_only, or none) summarizes its permissions. Create a key at https://app.mindcloud.co/user/api-keys."
      }
    },
    "parameters": {
      "fields": {
        "name": "fields",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Comma-separated list of fields to return (e.g. \"id,name,status\")."
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 100
        },
        "description": "Maximum number of results to return (1-1000, default 100)."
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        },
        "description": "Number of results to skip for pagination (default 0)."
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Comma-separated sort fields. Prefix with - for descending (e.g. \"-createdOn,name\")."
      },
      "CompanyId": {
        "name": "X-Company-Id",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "K3vX9qLm2RtA",
        "description": "Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with \"Use this key across all of your organizations\" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations)."
      },
      "MemberCompanyId": {
        "name": "X-Company-Id",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "K3vX9qLm2RtA",
        "description": "Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with \"Use this key across all of your organizations\" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations)."
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "\"r_8f2c41d07a9e4b6c\"",
        "description": "Required. The revision you last read: the `revision` from its read (Get Workflow Definition for a workflow, Get Analytics Page Definition for an Analytics page, Get Analytics Data Source Table for a fixed source's table), or `meta.revision` from your last change to it. The `ETag` header of either answer is the same value, ready to send back. The change applies only if nobody changed it since: otherwise it answers 412 with the current revision in `error.details.revision`. Send it as a strong entity tag (`\"r_...\"`): a weak one (`W/\"...\"`) never matches and answers 412. Without it the request answers 428."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Fixed by the status: 400 VALIDATION_FAILED, 401 UNAUTHORIZED, 403 FORBIDDEN, 404 NOT_FOUND, 409 CONFLICT, 410 GONE, 412 PRECONDITION_FAILED, 413 PAYLOAD_TOO_LARGE, 421 and 503 UNAVAILABLE, 428 PRECONDITION_REQUIRED, 429 RATE_LIMITED, 500 INTERNAL_ERROR, 502 PROVIDER_ERROR.",
                "examples": [
                  "VALIDATION_FAILED",
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "NOT_FOUND",
                  "CONFLICT",
                  "GONE",
                  "PRECONDITION_FAILED",
                  "PAYLOAD_TOO_LARGE",
                  "PRECONDITION_REQUIRED",
                  "RATE_LIMITED",
                  "INTERNAL_ERROR",
                  "PROVIDER_ERROR",
                  "UNAVAILABLE"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "description": "The specific cause (reason) and any evidence for it. Absent when the code says everything.",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "The specific cause, for example UNKNOWN_FILTER_FIELD or CONNECTION_IN_USE."
                  },
                  "field": {
                    "type": "string",
                    "description": "The parameter, filter, sort, or body field a 400 refused."
                  },
                  "accepted": {
                    "type": "array",
                    "items": {},
                    "description": "What a 400 would have accepted instead: parameter names, field names, or enum values."
                  },
                  "provider": {
                    "type": "object",
                    "description": "On 502 PROVIDER_ERROR: the provider answer that failed.",
                    "properties": {
                      "status": {
                        "type": "integer",
                        "description": "The provider's HTTP status."
                      },
                      "code": {
                        "type": "string",
                        "description": "The provider's own error code, when it sends one."
                      }
                    }
                  }
                }
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "success",
          "error"
        ]
      },
      "ListMeta": {
        "type": "object",
        "properties": {
          "pagination": {
            "type": "object",
            "properties": {
              "totalCount": {
                "type": "integer",
                "description": "Matching records. A list read in SQL stops counting at 10000."
              },
              "totalCountExact": {
                "type": "boolean",
                "description": "False when totalCount stopped at that cap."
              },
              "hasNextPage": {
                "type": "boolean",
                "description": "True when another page follows. Page with this, not totalCount."
              },
              "hasPreviousPage": {
                "type": "boolean"
              }
            },
            "required": [
              "totalCount",
              "totalCountExact",
              "hasNextPage",
              "hasPreviousPage"
            ]
          }
        },
        "required": [
          "pagination"
        ]
      },
      "ConnectionInUseErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "const": "CONFLICT"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "const": "CONNECTION_IN_USE"
                  },
                  "workflows": {
                    "type": "array",
                    "description": "The active workflows using the connection. Move them off it before deleting.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "usageCount": {
                          "type": "integer",
                          "description": "How many steps in that workflow use the connection."
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "usageCount"
                      ]
                    }
                  }
                },
                "required": [
                  "reason",
                  "workflows"
                ]
              }
            },
            "required": [
              "code",
              "message",
              "details"
            ]
          }
        }
      },
      "UniversalConflictErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "const": "CONFLICT"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "examples": [
                      "UNIVERSAL_ACTION_SLUG_CONFLICT",
                      "CONNECTION_CHOICE_REQUIRED"
                    ]
                  },
                  "candidates": {
                    "type": "array",
                    "description": "Present for CONNECTION_CHOICE_REQUIRED. Pass one id as connectionId and retry.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "status"
                      ]
                    }
                  }
                },
                "required": [
                  "reason"
                ]
              }
            },
            "required": [
              "code",
              "message",
              "details"
            ]
          }
        },
        "required": [
          "success",
          "error"
        ]
      },
      "AddedWorkflowTrigger": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The trigger's id."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The trigger's display name."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app event the trigger listens for. Null for a built-in trigger."
          },
          "isDisabled": {
            "type": "boolean",
            "description": "True when the trigger is turned off."
          },
          "isConfigured": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
          },
          "webhookUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a webhook trigger, the URL that starts the workflow. Null for other triggers."
          }
        },
        "required": [
          "id",
          "name",
          "appSlug",
          "appVersion",
          "actionId",
          "isDisabled",
          "isConfigured",
          "webhookUrl"
        ]
      },
      "AnalyticsDataSource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source's id."
          },
          "name": {
            "type": "string",
            "description": "The data source's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the data holds, in a sentence."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The userId of the member who created it, from List Members: the key's creator for their own sources."
          },
          "type": {
            "type": "string",
            "enum": [
              "sync",
              "live",
              "merge",
              "fixed"
            ],
            "description": "sync: fetched from an app action on a schedule and stored; live: fetched from an app action when a drill-down opens, with its values, and never stored; merge: combines other sources with SQL and code; fixed: rows you supply, never refetched."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app a sync or live source fetches from, from List Universal Apps. Null for merge and fixed sources."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action it fetches with, from List Universal Actions. Null for merge and fixed sources."
          },
          "actionName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action's name."
          },
          "connectionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connection it fetches with, from List Connections. Null for merge and fixed sources."
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "neverFetched",
              "noData",
              "draft",
              "queued",
              "refreshing",
              "ready",
              "empty",
              "failed"
            ],
            "description": "Where its data stands. live: a live source, which has no stored data; neverFetched: no fetch has run yet; noData: a fixed source with no rows yet; draft: waiting for its first fetch; queued: a fetch is waiting to start; refreshing: a fetch is running; ready: its rows are stored; empty: the last fetch returned no rows; failed: the last fetch failed (see message)."
          },
          "rowCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many rows the last fetch stored."
          },
          "fetchedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the stored rows were fetched."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last fetch failed, when it did."
          },
          "refreshIntervalSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How often a sync or merge source refreshes in full, in seconds. Null for live and fixed sources."
          },
          "isIncrementalEnabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "For a sync source, whether incremental refreshes (fetching only changed records between full refreshes) are switched on. Null for other types."
          },
          "incrementalIntervalSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How often incremental refreshes run, in seconds, while they run. Null otherwise."
          },
          "isPaused": {
            "type": "boolean",
            "description": "True when every page that uses it is paused or deleted, so its scheduled refresh is skipped."
          },
          "panelCount": {
            "type": "integer",
            "description": "How many panels on its owner's pages read it."
          },
          "isUnused": {
            "type": "boolean",
            "description": "True when no panel reads it and it has not changed for a day: the sources the app's cleanup offers to delete."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it last changed."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app version a sync or live source is pinned to."
          },
          "latestAppVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's current published version, when the source is pinned to an older one. Null when it is current."
          },
          "arguments": {
            "description": "The action's arguments, as stored: each value in its stored form. Send them back as they are, or as plain values. Null for merge and fixed sources."
          },
          "options": {
            "description": "The action's options, such as pagination. Null for merge and fixed sources."
          },
          "query": {
            "description": "The filter and sort the app applies before the rows are stored: { filter, sort }. Null when there is none."
          },
          "inputs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "dataSourceId": {
                  "type": "string",
                  "description": "The input source, from List Analytics Data Sources."
                },
                "alias": {
                  "type": "string",
                  "description": "The name the merge SQL and code read this input by."
                },
                "query": {
                  "type": "string",
                  "description": "The SQL that shapes this input, reading it as `src`. Empty when it is used as is."
                }
              }
            },
            "description": "For a merge source, the sources it combines. Null for other types."
          },
          "transformCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a merge source, the code that combines its inputs. Null for other types."
          },
          "file": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "origin": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "rows",
                  "attachment",
                  "tableEditor",
                  null
                ],
                "description": "Where the rows came from. rows: rows sent in a request; attachment: an uploaded file; tableEditor: an edit to the table."
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The file's name, or the label given to rows sent in a request."
              },
              "format": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The file format, such as csv, xlsx or json."
              },
              "mimeType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The file's media type."
              },
              "sizeBytes": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The size of the stored data in bytes."
              },
              "uploadedOn": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the data was stored."
              },
              "rowCount": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many rows the data holds."
              },
              "sheetName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For a spreadsheet, the sheet the rows are read from."
              },
              "useHeader": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "For a spreadsheet, whether its first row holds the column names."
              },
              "removeTopRows": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "For a spreadsheet, how many rows above the header are skipped."
              }
            },
            "description": "For a fixed source, the data it holds. Null for other types, or before any data is stored."
          },
          "dateKeys": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "primaryDateKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The column page date filters use for this source."
              },
              "primaryDateKeyGrain": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The primary date column's grain: day for dates, timestamp for dates with times."
              },
              "createdDateKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The column holding when each record was created."
              },
              "updatedDateKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The column holding when each record last changed."
              },
              "hasNoDates": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "True when the source has no date column."
              }
            },
            "description": "Which columns hold dates, for page date filters. Null until they are known."
          },
          "isIncrementalActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "For a sync source, whether incremental refreshes actually run: switched on, and the source can fetch only changed records. Null for other types."
          },
          "incremental": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "active",
                  "unavailable",
                  null
                ],
                "description": "Whether this source can fetch only changed records. active: it can; unavailable: it cannot."
              },
              "dedupKey": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "The field paths that identify a record, used to replace changed records."
              },
              "sinceArguments": {
                "description": "The extra action arguments that ask the app for records changed since the last check."
              },
              "catches": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "newAndChanged",
                  "newOnly",
                  null
                ],
                "description": "What the change check finds. newAndChanged: new and edited records; newOnly: new records only."
              },
              "overlapSeconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How far back before the last check each check looks, in seconds."
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why changed records cannot be fetched, when status is unavailable."
              },
              "checkedOn": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When these details were last checked against the source."
              }
            },
            "description": "For a sync source, how it fetches only changed records. Null when that was never set up."
          },
          "coverage": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The coverage verdict, such as COVERED, TRUNCATED or FILTER_NOT_APPLIED."
              },
              "level": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "ok",
                  "info",
                  "warn",
                  null
                ],
                "description": "How the verdict reads: ok, info or warn."
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The verdict in words."
              },
              "coverageFrom": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "The earliest record date the data holds."
              },
              "coverageTo": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "The latest record date the data holds."
              }
            },
            "description": "For a sync source, how much time its stored rows span. Null when not measured."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "createdBy",
          "type",
          "appId",
          "actionId",
          "actionName",
          "connectionId",
          "status",
          "rowCount",
          "fetchedOn",
          "message",
          "refreshIntervalSeconds",
          "isIncrementalEnabled",
          "incrementalIntervalSeconds",
          "isPaused",
          "panelCount",
          "isUnused",
          "createdOn",
          "updatedOn",
          "appVersion",
          "latestAppVersion",
          "arguments",
          "options",
          "query",
          "inputs",
          "transformCode",
          "file",
          "dateKeys",
          "isIncrementalActive",
          "incremental",
          "coverage"
        ]
      },
      "AnalyticsDataSourceFetch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source's id."
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "neverFetched",
              "noData",
              "draft",
              "queued",
              "refreshing",
              "ready",
              "empty",
              "failed"
            ],
            "description": "Where its data stands. live: a live source, which has no stored data; neverFetched: no fetch has run yet; noData: a fixed source with no rows yet; draft: waiting for its first fetch; queued: a fetch is waiting to start; refreshing: a fetch is running; ready: its rows are stored; empty: the last fetch returned no rows; failed: the last fetch failed (see message). A fetch that started answers queued or refreshing."
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "AnalyticsDataSourceQuery": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names of the answer, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows the SQL answered, as objects keyed by column."
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when more rows match than limit answered: narrow the SQL, or page with LIMIT and OFFSET in it."
          }
        },
        "required": [
          "columns",
          "rows",
          "hasMore"
        ]
      },
      "AnalyticsDataSourceResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source's id."
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "neverFetched",
              "noData",
              "draft",
              "queued",
              "refreshing",
              "ready",
              "empty",
              "failed"
            ],
            "description": "Where its data stands. live: a live source, which has no stored data; neverFetched: no fetch has run yet; noData: a fixed source with no rows yet; draft: waiting for its first fetch; queued: a fetch is waiting to start; refreshing: a fetch is running; ready: its rows are stored; empty: the last fetch returned no rows; failed: the last fetch failed (see message)."
          },
          "fetchedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the stored rows were fetched."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last fetch failed, when it did."
          },
          "isTruncated": {
            "type": "boolean",
            "description": "True when the fetch stopped at a size limit, so the stored rows are not the whole set."
          },
          "isPartial": {
            "type": "boolean",
            "description": "True while a first fetch is still running: these are the rows stored so far, and their shape is final."
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names the rows carry, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows in this window, as objects keyed by column."
          },
          "rowCount": {
            "type": "integer",
            "description": "How many rows there are in all."
          },
          "offset": {
            "type": "integer",
            "description": "Where this window starts."
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The offset of the next window, or null when this is the last."
          }
        },
        "required": [
          "id",
          "status",
          "fetchedOn",
          "message",
          "isTruncated",
          "isPartial",
          "columns",
          "rows",
          "rowCount",
          "offset",
          "nextOffset"
        ]
      },
      "AnalyticsDataSourceSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source's id."
          },
          "name": {
            "type": "string",
            "description": "The data source's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the data holds, in a sentence."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The userId of the member who created it, from List Members: the key's creator for their own sources."
          },
          "type": {
            "type": "string",
            "enum": [
              "sync",
              "live",
              "merge",
              "fixed"
            ],
            "description": "sync: fetched from an app action on a schedule and stored; live: fetched from an app action when a drill-down opens, with its values, and never stored; merge: combines other sources with SQL and code; fixed: rows you supply, never refetched."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app a sync or live source fetches from, from List Universal Apps. Null for merge and fixed sources."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action it fetches with, from List Universal Actions. Null for merge and fixed sources."
          },
          "actionName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action's name."
          },
          "connectionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connection it fetches with, from List Connections. Null for merge and fixed sources."
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "neverFetched",
              "noData",
              "draft",
              "queued",
              "refreshing",
              "ready",
              "empty",
              "failed"
            ],
            "description": "Where its data stands. live: a live source, which has no stored data; neverFetched: no fetch has run yet; noData: a fixed source with no rows yet; draft: waiting for its first fetch; queued: a fetch is waiting to start; refreshing: a fetch is running; ready: its rows are stored; empty: the last fetch returned no rows; failed: the last fetch failed (see message)."
          },
          "rowCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many rows the last fetch stored."
          },
          "fetchedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the stored rows were fetched."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last fetch failed, when it did."
          },
          "refreshIntervalSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How often a sync or merge source refreshes in full, in seconds. Null for live and fixed sources."
          },
          "isIncrementalEnabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "For a sync source, whether incremental refreshes (fetching only changed records between full refreshes) are switched on. Null for other types."
          },
          "incrementalIntervalSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How often incremental refreshes run, in seconds, while they run. Null otherwise."
          },
          "isPaused": {
            "type": "boolean",
            "description": "True when every page that uses it is paused or deleted, so its scheduled refresh is skipped."
          },
          "panelCount": {
            "type": "integer",
            "description": "How many panels on its owner's pages read it."
          },
          "isUnused": {
            "type": "boolean",
            "description": "True when no panel reads it and it has not changed for a day: the sources the app's cleanup offers to delete."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "createdBy",
          "type",
          "appId",
          "actionId",
          "actionName",
          "connectionId",
          "status",
          "rowCount",
          "fetchedOn",
          "message",
          "refreshIntervalSeconds",
          "isIncrementalEnabled",
          "incrementalIntervalSeconds",
          "isPaused",
          "panelCount",
          "isUnused",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsDataSourceTable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source's id."
          },
          "revision": {
            "type": "string",
            "description": "The table as read, also in the ETag header. Send it in If-Match to Update Analytics Data Source Table; an update to a table changed since is refused."
          },
          "columnTypes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The column's key."
                },
                "type": {
                  "type": "string",
                  "description": "The column's stored type, such as VARCHAR, BIGINT or DATE."
                }
              }
            },
            "description": "Every column, in order, with its stored type."
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names the rows carry, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows in this window, as objects keyed by column."
          },
          "rowCount": {
            "type": "integer",
            "description": "How many rows there are in all."
          },
          "offset": {
            "type": "integer",
            "description": "Where this window starts."
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The offset of the next window, or null when this is the last."
          }
        },
        "required": [
          "id",
          "revision",
          "columnTypes",
          "columns",
          "rows",
          "rowCount",
          "offset",
          "nextOffset"
        ]
      },
      "AnalyticsDrillDownPreview": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "empty",
              "failed",
              "pending"
            ],
            "description": "How the drill-down view came out."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the view failed or is waiting. Null when it ran."
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names the rows carry, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows in this window, as objects keyed by column."
          },
          "rowCount": {
            "type": "integer",
            "description": "How many rows there are in all."
          },
          "offset": {
            "type": "integer",
            "description": "Where this window starts."
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The offset of the next window, or null when this is the last."
          },
          "version": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "draft",
                  "published"
                ],
                "description": "draft or published."
              },
              "publishedVersionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The published version read, from List Analytics Page Versions, or null when the draft is read."
              }
            },
            "description": "Which version of the page this answer reads."
          }
        },
        "required": [
          "status",
          "message",
          "columns",
          "rows",
          "rowCount",
          "offset",
          "nextOffset",
          "version"
        ]
      },
      "AnalyticsEmbed": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The embed's id."
          },
          "name": {
            "type": "string",
            "description": "Its name, as the Embedded Analytics list shows it."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its description. Null when it has none."
          },
          "targetType": {
            "type": "string",
            "enum": [
              "page",
              "panel"
            ],
            "description": "What it shows."
          },
          "pageId": {
            "type": "string",
            "description": "The page it shows, or the page holding its panel, from List Analytics Pages."
          },
          "pageName": {
            "type": "string",
            "description": "That page's name."
          },
          "panelId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a panel embed: the panel it shows. Null for a page embed."
          },
          "panelName": {
            "type": [
              "string",
              "null"
            ],
            "description": "For a panel embed: that panel's name. Null for a page embed."
          },
          "status": {
            "type": "string",
            "enum": [
              "inactive",
              "active",
              "revoked"
            ],
            "description": "Whether it shows anywhere. List Analytics Embeds leaves revoked embeds out; Get Analytics Embed answers them."
          },
          "themeMode": {
            "type": "string",
            "enum": [
              "inherit",
              "cirra",
              "theme"
            ],
            "description": "Which look it wears."
          },
          "themeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For themeMode theme: the theme, from List Analytics Themes. Null otherwise."
          },
          "style": {
            "type": "object",
            "properties": {
              "fontFamily": {
                "type": "string",
                "enum": [
                  "Inter, sans-serif",
                  "\"SF Pro Display\", -apple-system, sans-serif",
                  "\"Helvetica Neue\", Helvetica, sans-serif",
                  "system-ui, sans-serif",
                  "\"Segoe UI\", sans-serif",
                  "Roboto, sans-serif",
                  "\"Open Sans\", sans-serif",
                  "Lato, sans-serif",
                  "\"Source Sans 3\", sans-serif",
                  "\"IBM Plex Sans\", sans-serif",
                  "\"Atkinson Hyperlegible\", sans-serif",
                  "Georgia, \"Times New Roman\", serif",
                  "\"IBM Plex Mono\", monospace"
                ],
                "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). Absent when the default is used."
              },
              "fontScale": {
                "type": "string",
                "enum": [
                  "0.9",
                  "1",
                  "1.1",
                  "1.25"
                ],
                "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). Absent when the default is used."
              },
              "panelTitleWeight": {
                "type": "string",
                "enum": [
                  "regular",
                  "medium",
                  "bold"
                ],
                "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). Absent when the default is used."
              },
              "pageTitleSize": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "large"
                ],
                "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). Absent when the default is used."
              },
              "seriesColors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "light": {
                      "type": "string",
                      "description": "The color in light mode, as hex."
                    },
                    "dark": {
                      "type": "string",
                      "description": "The color in dark mode, as hex."
                    }
                  }
                },
                "description": "Series colors: light and dark color pairs in the order charts hand colors out; a null entry uses that slot's default. Absent when the defaults are used."
              },
              "statusColors": {
                "type": "object",
                "properties": {
                  "success": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Success, or null for the default."
                  },
                  "warning": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Warning, or null for the default."
                  },
                  "warningBright": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Caution, or null for the default."
                  },
                  "failure": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Failure, or null for the default."
                  }
                },
                "description": "Status colors, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "chartGridlines": {
                "type": "string",
                "enum": [
                  "off",
                  "dashed",
                  "solid"
                ],
                "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). Absent when the default is used."
              },
              "chartAreaFill": {
                "type": "string",
                "enum": [
                  "none",
                  "light",
                  "solid"
                ],
                "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). Absent when the default is used."
              },
              "chartCurve": {
                "type": "string",
                "enum": [
                  "straight",
                  "smooth",
                  "natural"
                ],
                "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). Absent when the default is used."
              },
              "chartPoints": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "chartValues": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "chartLegend": {
                "type": "string",
                "enum": [
                  "auto",
                  "shown",
                  "hidden"
                ],
                "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "numberFormat": {
                "type": "string",
                "enum": [
                  "point",
                  "comma",
                  "space"
                ],
                "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). Absent when the default is used."
              },
              "numberCompact": {
                "type": "string",
                "enum": [
                  "auto",
                  "always",
                  "never"
                ],
                "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). Absent when the default is used."
              },
              "dateOrder": {
                "type": "string",
                "enum": [
                  "monthFirst",
                  "dayFirst"
                ],
                "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). Absent when the default is used."
              },
              "dateStyle": {
                "type": "string",
                "enum": [
                  "short",
                  "medium",
                  "numeric"
                ],
                "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). Absent when the default is used."
              },
              "panelCorners": {
                "type": "string",
                "enum": [
                  "square",
                  "rounded",
                  "soft"
                ],
                "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). Absent when the default is used."
              },
              "panelElevation": {
                "type": "string",
                "enum": [
                  "none",
                  "hairline",
                  "raised"
                ],
                "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). Absent when the default is used."
              },
              "panelGap": {
                "type": "string",
                "enum": [
                  "none",
                  "tight",
                  "regular",
                  "wide"
                ],
                "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). Absent when the default is used."
              },
              "panelPadding": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "comfortable"
                ],
                "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). Absent when the default is used."
              },
              "tableDensity": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "comfortable"
                ],
                "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). Absent when the default is used."
              },
              "pageBackground": {
                "type": "object",
                "properties": {
                  "page": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Page, or null for the default."
                  }
                },
                "description": "Page background, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "panelFill": {
                "type": "object",
                "properties": {
                  "panel": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Panel, or null for the default."
                  }
                },
                "description": "Panel fill, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "ink": {
                "type": "object",
                "properties": {
                  "ink": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Ink, or null for the default."
                  }
                },
                "description": "Ink, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "lineColor": {
                "type": "object",
                "properties": {
                  "line": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Line, or null for the default."
                  }
                },
                "description": "Line color, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "brandHeaderColor": {
                "type": "object",
                "properties": {
                  "header": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Header, or null for the default."
                  }
                },
                "description": "Publication header color, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "cirraMark": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              }
            },
            "description": "Its own style options over that look. Empty uses the look as it is."
          },
          "viewsLast30Days": {
            "type": "integer",
            "description": "How many times it was viewed in the last 30 days."
          },
          "lastViewedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last viewed. Null when it never was."
          },
          "origins": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "type": "string",
                  "description": "The site it was viewed on, as its origin (https://app.example.com), or \"unknown\" when the browser did not say."
                },
                "views": {
                  "type": "integer",
                  "description": "Views from that site in the last 30 days."
                }
              }
            },
            "description": "The sites it was viewed on most in the last 30 days, up to 20, with views from each, most viewed first."
          },
          "activatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was turned on. Null while it is inactive or revoked."
          },
          "revokedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was revoked. Null unless it was."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "targetType",
          "pageId",
          "pageName",
          "panelId",
          "panelName",
          "status",
          "themeMode",
          "themeId",
          "style",
          "viewsLast30Days",
          "lastViewedOn",
          "origins",
          "activatedOn",
          "revokedOn",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsEmbedLink": {
        "type": "object",
        "properties": {
          "embedId": {
            "type": "string",
            "description": "The embed's id."
          },
          "url": {
            "type": "string",
            "description": "The link to show it: put it in an iframe src. Anyone who has it sees the content without signing in."
          },
          "token": {
            "type": "string",
            "description": "The secret in the link, after #token=. It works until the embed is deactivated, revoked or its link rotated. Keep it out of logs and URLs you share."
          }
        },
        "required": [
          "embedId",
          "url",
          "token"
        ]
      },
      "AnalyticsFolder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the folder."
          },
          "position": {
            "type": "integer",
            "description": "Its place in the sidebar, from 0: sort by it to read the folders in the order the sidebar shows them."
          },
          "name": {
            "type": "string",
            "description": "The folder name, as the Analytics sidebar shows it."
          },
          "section": {
            "type": "string",
            "enum": [
              "pages",
              "reports",
              "sharedWithMe"
            ],
            "description": "Which part of the sidebar the folder is in: pages and reports hold your own pages and reports; sharedWithMe organizes pages other people shared with you."
          },
          "parentFolderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The folder this one is inside (from List Analytics Folders), or null at the top of its section."
          },
          "themeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The theme every page in the folder wears unless the page picks its own: a theme id from List Analytics Themes, \"cirra\" for the plain Cirra look, or null to follow the organization default."
          },
          "isPaused": {
            "type": "boolean",
            "description": "Whether the folder is paused: its pages stop refreshing their data until it is resumed."
          },
          "pausedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the folder was paused, or null."
          },
          "hasShares": {
            "type": "boolean",
            "description": "Whether the folder is shared with anyone (List Analytics Folder Shares)."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the folder was created."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the folder was last changed."
          }
        },
        "required": [
          "id",
          "position",
          "name",
          "section",
          "parentFolderId",
          "themeId",
          "isPaused",
          "pausedOn",
          "hasShares",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsMergePreview": {
        "type": "object",
        "properties": {
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alias": {
                  "type": "string",
                  "description": "The alias the code reads it by."
                },
                "rowCount": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "How many rows there are in all."
                },
                "columns": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "The column names."
                },
                "rows": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {},
                  "description": "The first rows."
                }
              }
            },
            "description": "Each input after its SQL: its alias and its first 10 rows."
          },
          "isPartial": {
            "type": "boolean",
            "description": "True when an input is still on its first fetch, so only its rows so far were used."
          },
          "output": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "rowCount": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many rows there are in all."
              },
              "columns": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "The column names."
              },
              "rows": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {},
                "description": "The first rows."
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the code failed, or null when it ran."
              }
            },
            "description": "What the code returned: its first 50 rows, or error when it failed. Null when no transformCode was sent."
          }
        },
        "required": [
          "inputs",
          "isPartial",
          "output"
        ]
      },
      "AnalyticsPage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The page id."
          },
          "name": {
            "type": "string",
            "description": "The page title."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line under the title, or null."
          },
          "type": {
            "type": "string",
            "enum": [
              "page",
              "report",
              "subpage"
            ],
            "description": "What kind of page it is."
          },
          "access": {
            "type": "string",
            "enum": [
              "owner",
              "edit",
              "view"
            ],
            "description": "What the key's creator can do on it."
          },
          "ownerId": {
            "type": "string",
            "description": "The owner's userId, from List Members."
          },
          "ownerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The owner's name."
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The creator's folder the page is filed in (from List Analytics Folders), or null when it is unfiled or shared with them."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page icon id, or null."
          },
          "iconColor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page icon color, or null."
          },
          "isPaused": {
            "type": "boolean",
            "description": "Whether its data stopped refreshing, by the page itself or a folder above it."
          },
          "pausedByFolderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The folder that paused it (from List Analytics Folders), or null."
          },
          "hasShares": {
            "type": "boolean",
            "description": "Whether anyone besides the owner can open it."
          },
          "linkedFromPageIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The pages whose clicks open this one, from List Analytics Pages."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the page or one of its panels last changed."
          },
          "fullWidth": {
            "type": "boolean",
            "description": "Whether the page spans the whole window."
          },
          "showPanelSources": {
            "type": "boolean",
            "description": "Whether each panel shows its data sources' app icons."
          },
          "themeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The theme the page wears, from List Analytics Themes, or null to follow its folder or the company default."
          },
          "style": {
            "description": "Style overrides on top of the theme, by option, or null."
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable name. Queries read it as $<name>."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dateRange",
                    "select",
                    "search",
                    "toggle"
                  ],
                  "description": "What it holds."
                },
                "control": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "chip",
                    "none",
                    null
                  ],
                  "description": "chip shows a picker on the page; none has no picker."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The picker label."
                },
                "default": {
                  "description": "What the page opens with: a date preset or range, all or a choice value, or true or false for a toggle."
                },
                "multiple": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A select that takes several choices."
                },
                "labeledBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A select set by a row click: the clicked row field that names the value."
                },
                "options": {
                  "description": "A select: where its choices come from, as dataSourceId with query or valueField and labelField, or typed values."
                },
                "presets": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "A dateRange: its preset menu, in order."
                },
                "showCalendar": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: false allows presets only."
                },
                "timeGranularity": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: custom ranges carry times."
                }
              }
            },
            "description": "The page variables (its filters), in page order, in the shape Set Analytics Page Variables takes."
          },
          "tabs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The tab id."
                },
                "name": {
                  "type": "string",
                  "description": "The tab name."
                }
              }
            },
            "description": "The page tabs in order, or empty when the page has none."
          },
          "version": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "draft",
                  "published"
                ],
                "description": "draft when it shows the draft, published when it shows the version viewers see."
              },
              "publishedVersion": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The number of the version viewers see, or null when never published."
              },
              "publishedVersionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Its id, from List Analytics Page Versions, or null."
              },
              "publishedOn": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When it was published, or null."
              },
              "hasUnpublishedChanges": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Editors only: whether the draft differs from the published version. Null for viewers and never-published pages."
              }
            },
            "description": "Which version this answer shows and where the page stands."
          },
          "panels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The panel id."
                },
                "name": {
                  "type": "string",
                  "description": "The panel's title, shown in its card header."
                },
                "placement": {
                  "type": "string",
                  "enum": [
                    "page",
                    "drill"
                  ],
                  "description": "Where the panel shows."
                },
                "displayType": {
                  "type": "string",
                  "enum": [
                    "table",
                    "bar",
                    "line",
                    "combo",
                    "pareto",
                    "bump",
                    "scatter",
                    "bubble",
                    "quadrant",
                    "pie",
                    "treemap",
                    "heatmap",
                    "pivot",
                    "cohort",
                    "statusgrid",
                    "activity",
                    "funnel",
                    "waterfall",
                    "sankey",
                    "chord",
                    "statetimeline",
                    "timeline",
                    "stat",
                    "trend",
                    "progress",
                    "gauge",
                    "bullet",
                    "report",
                    "document",
                    "workbook",
                    "html",
                    "map",
                    "region",
                    "tabs",
                    "group"
                  ],
                  "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group."
                },
                "layout": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "x": {
                      "type": "integer",
                      "description": "Leftmost column on the 12-column grid, 0-11."
                    },
                    "y": {
                      "type": "integer",
                      "description": "Top row, from 0."
                    },
                    "w": {
                      "type": "integer",
                      "description": "Width in columns, 1-12."
                    },
                    "h": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Height in rows (one row is about 48px). Null when the panel is as tall as what it shows."
                    }
                  },
                  "description": "The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container."
                },
                "tabId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container."
                },
                "containedBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The container panel (tabs or group) it renders inside, or null when it sits on the grid or is a drill-down."
                }
              }
            },
            "description": "The panels in this version, with where each sits, as Get Analytics Panel answers them (which answers one in full)."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "The draft revision, when this answer shows the draft to an editor: send it in If-Match with the next change to the page. Null otherwise."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "type",
          "access",
          "ownerId",
          "ownerName",
          "folderId",
          "icon",
          "iconColor",
          "isPaused",
          "pausedByFolderId",
          "hasShares",
          "linkedFromPageIds",
          "createdOn",
          "updatedOn",
          "fullWidth",
          "showPanelSources",
          "themeId",
          "style",
          "variables",
          "tabs",
          "version",
          "panels",
          "revision"
        ]
      },
      "AnalyticsPageAccessRequest": {
        "type": "object",
        "properties": {
          "pageId": {
            "type": "string",
            "description": "The page asked for, from List Analytics Pages."
          },
          "requestedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the request was made. A request still waiting is not sent again."
          },
          "emailed": {
            "type": "boolean",
            "description": "Whether this call emailed the owner; false when a request was already waiting."
          }
        },
        "required": [
          "pageId",
          "requestedOn",
          "emailed"
        ]
      },
      "AnalyticsPageDefinition": {
        "type": "object",
        "properties": {
          "page": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The page title."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The line under the title, or null."
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page icon id, or null."
              },
              "iconColor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page icon color, or null."
              },
              "fullWidth": {
                "type": "boolean",
                "description": "Whether the page spans the whole window."
              },
              "showPanelSources": {
                "type": "boolean",
                "description": "Whether each panel shows its data sources' app icons."
              },
              "themeId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page theme, from List Analytics Themes, or null when it follows its folder or the company default."
              },
              "style": {
                "description": "Style overrides on top of the theme, by option key, or null."
              },
              "isPaused": {
                "type": "boolean",
                "description": "Whether the page's own data refreshes are paused."
              }
            },
            "description": "The page settings, as Update Analytics Page takes them."
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable name. Queries read it as $<name>."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dateRange",
                    "select",
                    "search",
                    "toggle"
                  ],
                  "description": "What it holds."
                },
                "control": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "chip",
                    "none",
                    null
                  ],
                  "description": "chip shows a picker on the page; none has no picker."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The picker label."
                },
                "default": {
                  "description": "What the page opens with: a date preset or range, all or a choice value, or true or false for a toggle."
                },
                "multiple": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A select that takes several choices."
                },
                "labeledBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A select set by a row click: the clicked row field that names the value."
                },
                "options": {
                  "description": "A select: where its choices come from, as dataSourceId with query or valueField and labelField, or typed values."
                },
                "presets": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "A dateRange: its preset menu, in order."
                },
                "showCalendar": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: false allows presets only."
                },
                "timeGranularity": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: custom ranges carry times."
                }
              }
            },
            "description": "The page variables (its filters), in page order, as Set Analytics Page Variables takes them."
          },
          "tabs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The tab id."
                },
                "name": {
                  "type": "string",
                  "description": "The tab name."
                }
              }
            },
            "description": "The page tabs, in order, or null when the page has none."
          },
          "panels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The panel id."
                },
                "name": {
                  "type": "string",
                  "description": "The panel's title, shown in its card header."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The line under the title when the panel opens as a full-page drill-down view."
                },
                "placement": {
                  "type": "string",
                  "enum": [
                    "page",
                    "drill"
                  ],
                  "description": "Where the panel shows."
                },
                "displayType": {
                  "type": "string",
                  "enum": [
                    "table",
                    "bar",
                    "line",
                    "combo",
                    "pareto",
                    "bump",
                    "scatter",
                    "bubble",
                    "quadrant",
                    "pie",
                    "treemap",
                    "heatmap",
                    "pivot",
                    "cohort",
                    "statusgrid",
                    "activity",
                    "funnel",
                    "waterfall",
                    "sankey",
                    "chord",
                    "statetimeline",
                    "timeline",
                    "stat",
                    "trend",
                    "progress",
                    "gauge",
                    "bullet",
                    "report",
                    "document",
                    "workbook",
                    "html",
                    "map",
                    "region",
                    "tabs",
                    "group"
                  ],
                  "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group."
                },
                "dataSources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "dataSourceId": {
                        "type": "string",
                        "description": "The data source, from List Analytics Data Sources."
                      },
                      "alias": {
                        "type": "string",
                        "description": "The name the source's query and the transform code use for its rows."
                      },
                      "query": {
                        "type": "string",
                        "description": "DuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored."
                      },
                      "followPageDate": {
                        "type": "boolean",
                        "description": "Whether the page's date filter narrows this source. False for an all-time figure on a date-filtered page."
                      }
                    }
                  },
                  "description": "The data sources feeding the panel, in order."
                },
                "transformCode": {
                  "type": "string",
                  "description": "JavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly."
                },
                "columns": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "The row key the column shows (dot paths allowed). For a button column, the identifier that names its click event."
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "percent",
                          "ratio",
                          "currency",
                          "duration",
                          "rank",
                          "boolean",
                          "date",
                          "object",
                          "list",
                          "html",
                          "button"
                        ],
                        "description": "How the value is formatted and aligned. Absent for plain text."
                      },
                      "label": {
                        "type": "string",
                        "description": "Button columns: the text on the button."
                      },
                      "tooltip": {
                        "type": "string",
                        "description": "Button columns: the sentence shown on hover."
                      },
                      "width": {
                        "type": "number",
                        "description": "The column width in pixels for everyone. Absent when the column is as wide as its content."
                      }
                    }
                  },
                  "description": "Table panels: the columns shown, in order. Null when the panel picks its columns from the rows."
                },
                "format": {
                  "description": "How each column's values are formatted, keyed by column, for any display type: { \"<column>\": { \"type\": \"currency\", ... } }. Null when none is set."
                },
                "links": {
                  "description": "Table panels: the link each cell of a column opens, keyed by column. Null when none is set."
                },
                "style": {
                  "description": "The color of each series or category, keyed by its name. Null when none is set."
                },
                "settings": {
                  "description": "The settings of the panel's display type, keyed by block: annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group. Only the blocks the panel stores are present."
                },
                "on": {
                  "description": "What clicking the panel's items does, keyed by event (rowClick, valueClick, \"button:<column key>\" ...): { \"rowClick\": { \"action\": \"navigatePage\", \"pageId\": \"...\" } }. Empty when nothing is wired."
                },
                "interaction": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "toggles": {
                      "type": "string",
                      "description": "The toggle page variable."
                    }
                  },
                  "description": "Stat panels: the toggle page variable a click on the tile flips. Null for a normal panel."
                },
                "params": {
                  "description": "Drill-down panels: the human label of each $param its SQL reads, keyed by param: { \"userId\": { \"label\": \"User\", \"labeledBy\": \"userName\" } }. Null when none is declared."
                },
                "displayCode": {
                  "type": "string",
                  "description": "JavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic."
                },
                "aiSnippetsCode": {
                  "type": "string",
                  "description": "Report panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none."
                },
                "layout": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "x": {
                      "type": "integer",
                      "description": "Leftmost column on the 12-column grid, 0-11."
                    },
                    "y": {
                      "type": "integer",
                      "description": "Top row, from 0."
                    },
                    "w": {
                      "type": "integer",
                      "description": "Width in columns, 1-12."
                    },
                    "h": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Height in rows (one row is about 48px). Null when the panel is as tall as what it shows."
                    }
                  },
                  "description": "The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container."
                },
                "tabId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container."
                }
              }
            },
            "description": "Every panel in the draft, in the shape Update Analytics Panel takes, with its grid place and tab."
          },
          "revision": {
            "type": "string",
            "description": "The draft revision: send it in If-Match to Set Analytics Page Definition. It changes whenever anything in this definition does."
          }
        },
        "required": [
          "page",
          "variables",
          "tabs",
          "panels",
          "revision"
        ]
      },
      "AnalyticsPageDefinitionValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when Set Analytics Page Definition would accept this body against the draft as it is now."
          },
          "revision": {
            "type": "string",
            "description": "The draft revision it was checked against."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "A JSON Pointer to the problem in the body."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, such as UNKNOWN_PANEL, DUPLICATE_REF or INVALID_ARGS."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong and how to fix it."
                }
              }
            },
            "description": "Every problem with the body, each with its JSON Pointer."
          }
        },
        "required": [
          "valid",
          "revision",
          "issues"
        ]
      },
      "AnalyticsPageDefinitionWrite": {
        "type": "object",
        "properties": {
          "page": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The page title."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The line under the title, or null."
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page icon id, or null."
              },
              "iconColor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page icon color, or null."
              },
              "fullWidth": {
                "type": "boolean",
                "description": "Whether the page spans the whole window."
              },
              "showPanelSources": {
                "type": "boolean",
                "description": "Whether each panel shows its data sources' app icons."
              },
              "themeId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The page theme, from List Analytics Themes, or null when it follows its folder or the company default."
              },
              "style": {
                "description": "Style overrides on top of the theme, by option key, or null."
              },
              "isPaused": {
                "type": "boolean",
                "description": "Whether the page's own data refreshes are paused."
              }
            },
            "description": "The page settings, as Update Analytics Page takes them."
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable name. Queries read it as $<name>."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dateRange",
                    "select",
                    "search",
                    "toggle"
                  ],
                  "description": "What it holds."
                },
                "control": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "chip",
                    "none",
                    null
                  ],
                  "description": "chip shows a picker on the page; none has no picker."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The picker label."
                },
                "default": {
                  "description": "What the page opens with: a date preset or range, all or a choice value, or true or false for a toggle."
                },
                "multiple": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A select that takes several choices."
                },
                "labeledBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A select set by a row click: the clicked row field that names the value."
                },
                "options": {
                  "description": "A select: where its choices come from, as dataSourceId with query or valueField and labelField, or typed values."
                },
                "presets": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  },
                  "description": "A dateRange: its preset menu, in order."
                },
                "showCalendar": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: false allows presets only."
                },
                "timeGranularity": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "A dateRange: custom ranges carry times."
                }
              }
            },
            "description": "The page variables (its filters), in page order, as Set Analytics Page Variables takes them."
          },
          "tabs": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The tab id."
                },
                "name": {
                  "type": "string",
                  "description": "The tab name."
                }
              }
            },
            "description": "The page tabs, in order, or null when the page has none."
          },
          "panels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The panel id."
                },
                "name": {
                  "type": "string",
                  "description": "The panel's title, shown in its card header."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The line under the title when the panel opens as a full-page drill-down view."
                },
                "placement": {
                  "type": "string",
                  "enum": [
                    "page",
                    "drill"
                  ],
                  "description": "Where the panel shows."
                },
                "displayType": {
                  "type": "string",
                  "enum": [
                    "table",
                    "bar",
                    "line",
                    "combo",
                    "pareto",
                    "bump",
                    "scatter",
                    "bubble",
                    "quadrant",
                    "pie",
                    "treemap",
                    "heatmap",
                    "pivot",
                    "cohort",
                    "statusgrid",
                    "activity",
                    "funnel",
                    "waterfall",
                    "sankey",
                    "chord",
                    "statetimeline",
                    "timeline",
                    "stat",
                    "trend",
                    "progress",
                    "gauge",
                    "bullet",
                    "report",
                    "document",
                    "workbook",
                    "html",
                    "map",
                    "region",
                    "tabs",
                    "group"
                  ],
                  "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group."
                },
                "dataSources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "dataSourceId": {
                        "type": "string",
                        "description": "The data source, from List Analytics Data Sources."
                      },
                      "alias": {
                        "type": "string",
                        "description": "The name the source's query and the transform code use for its rows."
                      },
                      "query": {
                        "type": "string",
                        "description": "DuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored."
                      },
                      "followPageDate": {
                        "type": "boolean",
                        "description": "Whether the page's date filter narrows this source. False for an all-time figure on a date-filtered page."
                      }
                    }
                  },
                  "description": "The data sources feeding the panel, in order."
                },
                "transformCode": {
                  "type": "string",
                  "description": "JavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly."
                },
                "columns": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "The row key the column shows (dot paths allowed). For a button column, the identifier that names its click event."
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "percent",
                          "ratio",
                          "currency",
                          "duration",
                          "rank",
                          "boolean",
                          "date",
                          "object",
                          "list",
                          "html",
                          "button"
                        ],
                        "description": "How the value is formatted and aligned. Absent for plain text."
                      },
                      "label": {
                        "type": "string",
                        "description": "Button columns: the text on the button."
                      },
                      "tooltip": {
                        "type": "string",
                        "description": "Button columns: the sentence shown on hover."
                      },
                      "width": {
                        "type": "number",
                        "description": "The column width in pixels for everyone. Absent when the column is as wide as its content."
                      }
                    }
                  },
                  "description": "Table panels: the columns shown, in order. Null when the panel picks its columns from the rows."
                },
                "format": {
                  "description": "How each column's values are formatted, keyed by column, for any display type: { \"<column>\": { \"type\": \"currency\", ... } }. Null when none is set."
                },
                "links": {
                  "description": "Table panels: the link each cell of a column opens, keyed by column. Null when none is set."
                },
                "style": {
                  "description": "The color of each series or category, keyed by its name. Null when none is set."
                },
                "settings": {
                  "description": "The settings of the panel's display type, keyed by block: annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group. Only the blocks the panel stores are present."
                },
                "on": {
                  "description": "What clicking the panel's items does, keyed by event (rowClick, valueClick, \"button:<column key>\" ...): { \"rowClick\": { \"action\": \"navigatePage\", \"pageId\": \"...\" } }. Empty when nothing is wired."
                },
                "interaction": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "toggles": {
                      "type": "string",
                      "description": "The toggle page variable."
                    }
                  },
                  "description": "Stat panels: the toggle page variable a click on the tile flips. Null for a normal panel."
                },
                "params": {
                  "description": "Drill-down panels: the human label of each $param its SQL reads, keyed by param: { \"userId\": { \"label\": \"User\", \"labeledBy\": \"userName\" } }. Null when none is declared."
                },
                "displayCode": {
                  "type": "string",
                  "description": "JavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic."
                },
                "aiSnippetsCode": {
                  "type": "string",
                  "description": "Report panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none."
                },
                "layout": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "x": {
                      "type": "integer",
                      "description": "Leftmost column on the 12-column grid, 0-11."
                    },
                    "y": {
                      "type": "integer",
                      "description": "Top row, from 0."
                    },
                    "w": {
                      "type": "integer",
                      "description": "Width in columns, 1-12."
                    },
                    "h": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Height in rows (one row is about 48px). Null when the panel is as tall as what it shows."
                    }
                  },
                  "description": "The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container."
                },
                "tabId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container."
                }
              }
            },
            "description": "Every panel in the draft, in the shape Update Analytics Panel takes, with its grid place and tab."
          },
          "revision": {
            "type": "string",
            "description": "The draft revision: send it in If-Match to Set Analytics Page Definition. It changes whenever anything in this definition does."
          },
          "refs": {
            "type": "object",
            "properties": {
              "panels": {
                "description": "{ <ref>: <panel id> } for each new panel."
              },
              "tabs": {
                "description": "{ <ref>: <tab id> } for each new tab."
              }
            },
            "description": "The id each new panel and tab got, by its ref."
          }
        },
        "required": [
          "page",
          "variables",
          "tabs",
          "panels",
          "revision",
          "refs"
        ]
      },
      "AnalyticsPageEdit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The step id. Redo Analytics Page takes it as editId to bring an undone step back."
          },
          "kind": {
            "type": "string",
            "enum": [
              "panelUpdate",
              "panelCreate",
              "panelDelete",
              "pageUpdate"
            ],
            "description": "What the step changed. A step touching several panels names its first."
          },
          "targetId": {
            "type": "string",
            "description": "The panel (from Get Analytics Page) or page (from List Analytics Pages) it changed."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of what it changed, or null."
          },
          "changeCount": {
            "type": "integer",
            "description": "How many changes the step made together, such as one per panel a layout pass moved."
          },
          "madeBy": {
            "type": "string",
            "enum": [
              "you",
              "cirra",
              "colleague"
            ],
            "description": "Who made it."
          },
          "createdBy": {
            "type": "string",
            "description": "The userId of the person who made it, or for whom Cirra made it, from List Members."
          },
          "madeByName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the person who made it or for whom Cirra made it, or null."
          },
          "isUndone": {
            "type": "boolean",
            "description": "Whether it is undone."
          },
          "next": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "undo",
              "redo",
              null
            ],
            "description": "For the creator's own steps: undo when Undo Analytics Page would take this step next, redo when Redo would, otherwise null."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was made."
          }
        },
        "required": [
          "id",
          "kind",
          "targetId",
          "name",
          "changeCount",
          "madeBy",
          "createdBy",
          "madeByName",
          "isUndone",
          "next",
          "createdOn"
        ]
      },
      "AnalyticsPageSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The page id."
          },
          "name": {
            "type": "string",
            "description": "The page title."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line under the title, or null."
          },
          "type": {
            "type": "string",
            "enum": [
              "page",
              "report",
              "subpage"
            ],
            "description": "What kind of page it is."
          },
          "access": {
            "type": "string",
            "enum": [
              "owner",
              "edit",
              "view"
            ],
            "description": "What the key's creator can do on it."
          },
          "ownerId": {
            "type": "string",
            "description": "The owner's userId, from List Members."
          },
          "ownerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The owner's name."
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The creator's folder the page is filed in (from List Analytics Folders), or null when it is unfiled or shared with them."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page icon id, or null."
          },
          "iconColor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page icon color, or null."
          },
          "isPaused": {
            "type": "boolean",
            "description": "Whether its data stopped refreshing, by the page itself or a folder above it."
          },
          "pausedByFolderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The folder that paused it (from List Analytics Folders), or null."
          },
          "hasShares": {
            "type": "boolean",
            "description": "Whether anyone besides the owner can open it."
          },
          "linkedFromPageIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The pages whose clicks open this one, from List Analytics Pages."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the page or one of its panels last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "type",
          "access",
          "ownerId",
          "ownerName",
          "folderId",
          "icon",
          "iconColor",
          "isPaused",
          "pausedByFolderId",
          "hasShares",
          "linkedFromPageIds",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsPageVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version id."
          },
          "version": {
            "type": "integer",
            "description": "The version number, counting up from 1."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its name, or null."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its notes, or null."
          },
          "isPublished": {
            "type": "boolean",
            "description": "Whether it is the version viewers see."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The userId of who published it, from List Members, or null."
          },
          "createdByName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who published it, or null."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was made."
          },
          "publishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last made the version viewers see, or null."
          }
        },
        "required": [
          "id",
          "version",
          "name",
          "notes",
          "isPublished",
          "createdBy",
          "createdByName",
          "createdOn",
          "publishedOn"
        ]
      },
      "AnalyticsPanel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The panel id."
          },
          "pageId": {
            "type": "string",
            "description": "The page the panel is on, from List Analytics Pages."
          },
          "name": {
            "type": "string",
            "description": "The panel's title, shown in its card header."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line under the title when the panel opens as a full-page drill-down view."
          },
          "placement": {
            "type": "string",
            "enum": [
              "page",
              "drill"
            ],
            "description": "Where the panel shows."
          },
          "displayType": {
            "type": "string",
            "enum": [
              "table",
              "bar",
              "line",
              "combo",
              "pareto",
              "bump",
              "scatter",
              "bubble",
              "quadrant",
              "pie",
              "treemap",
              "heatmap",
              "pivot",
              "cohort",
              "statusgrid",
              "activity",
              "funnel",
              "waterfall",
              "sankey",
              "chord",
              "statetimeline",
              "timeline",
              "stat",
              "trend",
              "progress",
              "gauge",
              "bullet",
              "report",
              "document",
              "workbook",
              "html",
              "map",
              "region",
              "tabs",
              "group"
            ],
            "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group."
          },
          "dataSources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "dataSourceId": {
                  "type": "string",
                  "description": "The data source, from List Analytics Data Sources."
                },
                "alias": {
                  "type": "string",
                  "description": "The name the source's query and the transform code use for its rows."
                },
                "query": {
                  "type": "string",
                  "description": "DuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored."
                },
                "followPageDate": {
                  "type": "boolean",
                  "description": "Whether the page's date filter narrows this source. False for an all-time figure on a date-filtered page."
                }
              }
            },
            "description": "The data sources feeding the panel, in order."
          },
          "transformCode": {
            "type": "string",
            "description": "JavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly."
          },
          "columns": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The row key the column shows (dot paths allowed). For a button column, the identifier that names its click event."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "percent",
                    "ratio",
                    "currency",
                    "duration",
                    "rank",
                    "boolean",
                    "date",
                    "object",
                    "list",
                    "html",
                    "button"
                  ],
                  "description": "How the value is formatted and aligned. Absent for plain text."
                },
                "label": {
                  "type": "string",
                  "description": "Button columns: the text on the button."
                },
                "tooltip": {
                  "type": "string",
                  "description": "Button columns: the sentence shown on hover."
                },
                "width": {
                  "type": "number",
                  "description": "The column width in pixels for everyone. Absent when the column is as wide as its content."
                }
              }
            },
            "description": "Table panels: the columns shown, in order. Null when the panel picks its columns from the rows."
          },
          "format": {
            "description": "How each column's values are formatted, keyed by column, for any display type: { \"<column>\": { \"type\": \"currency\", ... } }. Null when none is set."
          },
          "links": {
            "description": "Table panels: the link each cell of a column opens, keyed by column. Null when none is set."
          },
          "style": {
            "description": "The color of each series or category, keyed by its name. Null when none is set."
          },
          "settings": {
            "description": "The settings of the panel's display type, keyed by block: annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group. Only the blocks the panel stores are present."
          },
          "on": {
            "description": "What clicking the panel's items does, keyed by event (rowClick, valueClick, \"button:<column key>\" ...): { \"rowClick\": { \"action\": \"navigatePage\", \"pageId\": \"...\" } }. Empty when nothing is wired."
          },
          "interaction": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "toggles": {
                "type": "string",
                "description": "The toggle page variable."
              }
            },
            "description": "Stat panels: the toggle page variable a click on the tile flips. Null for a normal panel."
          },
          "params": {
            "description": "Drill-down panels: the human label of each $param its SQL reads, keyed by param: { \"userId\": { \"label\": \"User\", \"labeledBy\": \"userName\" } }. Null when none is declared."
          },
          "displayMode": {
            "type": "string",
            "enum": [
              "basic",
              "advanced"
            ],
            "description": "Whether the display comes from the settings or from displayCode."
          },
          "displayCode": {
            "type": "string",
            "description": "JavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic."
          },
          "aiSnippetsCode": {
            "type": "string",
            "description": "Report panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none."
          },
          "layout": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "x": {
                "type": "integer",
                "description": "Leftmost column on the 12-column grid, 0-11."
              },
              "y": {
                "type": "integer",
                "description": "Top row, from 0."
              },
              "w": {
                "type": "integer",
                "description": "Width in columns, 1-12."
              },
              "h": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Height in rows (one row is about 48px). Null when the panel is as tall as what it shows."
              }
            },
            "description": "The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container."
          },
          "tabId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container."
          },
          "containedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The container panel (tabs or group) it renders inside, or null when it sits on the grid or is a drill-down."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the panel was created. Null on a published version of the page."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the panel last changed. Null on a published version of the page."
          }
        },
        "required": [
          "id",
          "pageId",
          "name",
          "description",
          "placement",
          "displayType",
          "dataSources",
          "transformCode",
          "columns",
          "format",
          "links",
          "style",
          "settings",
          "on",
          "interaction",
          "params",
          "displayMode",
          "displayCode",
          "aiSnippetsCode",
          "layout",
          "tabId",
          "containedBy",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsPanelDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The panel id."
          },
          "pageId": {
            "type": "string",
            "description": "The page the panel is on, from List Analytics Pages."
          },
          "name": {
            "type": "string",
            "description": "The panel's title, shown in its card header."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line under the title when the panel opens as a full-page drill-down view."
          },
          "placement": {
            "type": "string",
            "enum": [
              "page",
              "drill"
            ],
            "description": "Where the panel shows."
          },
          "displayType": {
            "type": "string",
            "enum": [
              "table",
              "bar",
              "line",
              "combo",
              "pareto",
              "bump",
              "scatter",
              "bubble",
              "quadrant",
              "pie",
              "treemap",
              "heatmap",
              "pivot",
              "cohort",
              "statusgrid",
              "activity",
              "funnel",
              "waterfall",
              "sankey",
              "chord",
              "statetimeline",
              "timeline",
              "stat",
              "trend",
              "progress",
              "gauge",
              "bullet",
              "report",
              "document",
              "workbook",
              "html",
              "map",
              "region",
              "tabs",
              "group"
            ],
            "description": "How the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group."
          },
          "dataSources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "dataSourceId": {
                  "type": "string",
                  "description": "The data source, from List Analytics Data Sources."
                },
                "alias": {
                  "type": "string",
                  "description": "The name the source's query and the transform code use for its rows."
                },
                "query": {
                  "type": "string",
                  "description": "DuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored."
                },
                "followPageDate": {
                  "type": "boolean",
                  "description": "Whether the page's date filter narrows this source. False for an all-time figure on a date-filtered page."
                }
              }
            },
            "description": "The data sources feeding the panel, in order."
          },
          "transformCode": {
            "type": "string",
            "description": "JavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly."
          },
          "columns": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The row key the column shows (dot paths allowed). For a button column, the identifier that names its click event."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "percent",
                    "ratio",
                    "currency",
                    "duration",
                    "rank",
                    "boolean",
                    "date",
                    "object",
                    "list",
                    "html",
                    "button"
                  ],
                  "description": "How the value is formatted and aligned. Absent for plain text."
                },
                "label": {
                  "type": "string",
                  "description": "Button columns: the text on the button."
                },
                "tooltip": {
                  "type": "string",
                  "description": "Button columns: the sentence shown on hover."
                },
                "width": {
                  "type": "number",
                  "description": "The column width in pixels for everyone. Absent when the column is as wide as its content."
                }
              }
            },
            "description": "Table panels: the columns shown, in order. Null when the panel picks its columns from the rows."
          },
          "format": {
            "description": "How each column's values are formatted, keyed by column, for any display type: { \"<column>\": { \"type\": \"currency\", ... } }. Null when none is set."
          },
          "links": {
            "description": "Table panels: the link each cell of a column opens, keyed by column. Null when none is set."
          },
          "style": {
            "description": "The color of each series or category, keyed by its name. Null when none is set."
          },
          "settings": {
            "description": "The settings of the panel's display type, keyed by block: annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group. Only the blocks the panel stores are present."
          },
          "on": {
            "description": "What clicking the panel's items does, keyed by event (rowClick, valueClick, \"button:<column key>\" ...): { \"rowClick\": { \"action\": \"navigatePage\", \"pageId\": \"...\" } }. Empty when nothing is wired."
          },
          "interaction": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "toggles": {
                "type": "string",
                "description": "The toggle page variable."
              }
            },
            "description": "Stat panels: the toggle page variable a click on the tile flips. Null for a normal panel."
          },
          "params": {
            "description": "Drill-down panels: the human label of each $param its SQL reads, keyed by param: { \"userId\": { \"label\": \"User\", \"labeledBy\": \"userName\" } }. Null when none is declared."
          },
          "displayMode": {
            "type": "string",
            "enum": [
              "basic",
              "advanced"
            ],
            "description": "Whether the display comes from the settings or from displayCode."
          },
          "displayCode": {
            "type": "string",
            "description": "JavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic."
          },
          "aiSnippetsCode": {
            "type": "string",
            "description": "Report panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none."
          },
          "layout": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "x": {
                "type": "integer",
                "description": "Leftmost column on the 12-column grid, 0-11."
              },
              "y": {
                "type": "integer",
                "description": "Top row, from 0."
              },
              "w": {
                "type": "integer",
                "description": "Width in columns, 1-12."
              },
              "h": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Height in rows (one row is about 48px). Null when the panel is as tall as what it shows."
              }
            },
            "description": "The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container."
          },
          "tabId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container."
          },
          "containedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The container panel (tabs or group) it renders inside, or null when it sits on the grid or is a drill-down."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the panel was created. Null on a published version of the page."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the panel last changed. Null on a published version of the page."
          },
          "version": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "draft",
                  "published"
                ],
                "description": "draft or published."
              },
              "publishedVersionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The published version read, from List Analytics Page Versions, or null when the draft is read."
              }
            },
            "description": "Which version of the page this answer reads."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "The page draft revision, when an editor reads the draft: send it in If-Match with the next change. Null otherwise."
          }
        },
        "required": [
          "id",
          "pageId",
          "name",
          "description",
          "placement",
          "displayType",
          "dataSources",
          "transformCode",
          "columns",
          "format",
          "links",
          "style",
          "settings",
          "on",
          "interaction",
          "params",
          "displayMode",
          "displayCode",
          "aiSnippetsCode",
          "layout",
          "tabId",
          "containedBy",
          "createdOn",
          "updatedOn",
          "version",
          "revision"
        ]
      },
      "AnalyticsPanelOutput": {
        "type": "object",
        "properties": {
          "panelId": {
            "type": "string",
            "description": "The panel, from Get Analytics Page."
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "empty",
              "refreshing",
              "failed",
              "draft",
              "noResult",
              "noDataSource"
            ],
            "description": "Where the panel's stored result stands."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed or is waiting. Null when there is nothing to say."
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names the rows carry, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows in this window, as objects keyed by column."
          },
          "rowCount": {
            "type": "integer",
            "description": "How many rows there are in all."
          },
          "offset": {
            "type": "integer",
            "description": "Where this window starts."
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The offset of the next window, or null when this is the last."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the result was last written. Null when there is none."
          },
          "version": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "draft",
                  "published"
                ],
                "description": "draft or published."
              },
              "publishedVersionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The published version read, from List Analytics Page Versions, or null when the draft is read."
              }
            },
            "description": "Which version of the page this answer reads."
          }
        },
        "required": [
          "panelId",
          "status",
          "message",
          "columns",
          "rows",
          "rowCount",
          "offset",
          "nextOffset",
          "updatedOn",
          "version"
        ]
      },
      "AnalyticsPublication": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The publication's id."
          },
          "pageId": {
            "type": "string",
            "description": "The page it sends, from List Analytics Pages."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its name. Null until one is given."
          },
          "isActive": {
            "type": "boolean",
            "description": "True when it sends on its schedule. A new publication starts paused."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "teams"
            ],
            "description": "Where it sends."
          },
          "scheduleType": {
            "type": "string",
            "enum": [
              "fixed",
              "interval",
              "monthly",
              "once"
            ],
            "description": "How its schedule is set."
          },
          "intervalMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "For interval: minutes between sends, 360 (six hours) to 43200 (thirty days)."
          },
          "days": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "For fixed: the weekdays it sends on, 0 (Sunday) to 6 (Saturday)."
          },
          "monthDays": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "For monthly: the days of the month it sends on, 1 to 30, or -1 for the last day."
          },
          "runDates": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "For once: the date it sends on, as YYYY-MM-DD."
          },
          "runTimes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The times of day it sends at, as HH:MM in timeZone."
          },
          "timeZone": {
            "type": "string",
            "description": "The IANA time zone its times are in, such as America/New_York."
          },
          "isOrganizationTimeZone": {
            "type": "boolean",
            "description": "True when timeZone is the organization's time zone and changes with it; false when one was set for this publication."
          },
          "nextRunOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it sends next. Null while it is paused or has nothing left to send."
          },
          "autoPausedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When MindCloud paused it after failed sends. Null when it was not."
          },
          "autoPauseReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why MindCloud paused it. Null when it was not."
          },
          "recipientUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Member recipients, by user id (from List Members)."
          },
          "externalRecipients": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Recipients outside the organization, by email address."
          },
          "unsubscribedRecipientUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Members who unsubscribed with the link in its email, by user id. They get nothing until resubscribed."
          },
          "unsubscribedExternalRecipients": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Outside addresses that unsubscribed with the link in its email."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "The email subject. Null uses the page's name."
          },
          "connectionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connection it sends through, from List Connections. Null for email from MindCloud's own sender."
          },
          "destination": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "channelId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Slack and Teams: the channel id it posts in. Null for email."
              },
              "channelLabel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Slack and Teams: the channel name, as picked. Null for email."
              },
              "teamId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Teams: the team id. Null otherwise."
              },
              "teamLabel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Teams: the team name, as picked. Null otherwise."
              }
            },
            "description": "For slack and teams: where it posts. Null for email."
          },
          "variables": {
            "type": "object",
            "description": "Its own filter values, by page variable name, as the page's link carries them. Empty uses the page's defaults."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "pageId",
          "name",
          "isActive",
          "channel",
          "scheduleType",
          "intervalMinutes",
          "days",
          "monthDays",
          "runDates",
          "runTimes",
          "timeZone",
          "isOrganizationTimeZone",
          "nextRunOn",
          "autoPausedOn",
          "autoPauseReason",
          "recipientUserIds",
          "externalRecipients",
          "unsubscribedRecipientUserIds",
          "unsubscribedExternalRecipients",
          "subject",
          "connectionId",
          "destination",
          "variables",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsPublicationRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The send's id."
          },
          "publicationId": {
            "type": "string",
            "description": "The publication it sent, from List Analytics Publications."
          },
          "pageId": {
            "type": "string",
            "description": "The page it sent, from List Analytics Pages."
          },
          "isManual": {
            "type": "boolean",
            "description": "True for a Send now, false for a scheduled send."
          },
          "status": {
            "type": "string",
            "enum": [
              "claimed",
              "sending",
              "sent",
              "failed",
              "missed"
            ],
            "description": "How it went."
          },
          "statusOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it reached its status."
          },
          "recipientCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many members it went to. Null before it is delivered."
          },
          "externalRecipientCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many outside addresses it went to. Null before it is delivered or with none."
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it failed. Null unless it failed."
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "What went wrong, in words. Null unless it failed."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it started."
          }
        },
        "required": [
          "id",
          "publicationId",
          "pageId",
          "isManual",
          "status",
          "statusOn",
          "recipientCount",
          "externalRecipientCount",
          "errorCode",
          "errorMessage",
          "createdOn"
        ]
      },
      "AnalyticsShare": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The share's id."
          },
          "targetType": {
            "type": "string",
            "enum": [
              "user",
              "organization",
              "role",
              "team",
              "guest"
            ],
            "description": "Who it is for."
          },
          "permission": {
            "type": "string",
            "enum": [
              "view",
              "edit"
            ],
            "description": "What they can do."
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For user: the member, from List Members. Null otherwise."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "For user: the member's name. Null otherwise."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "For user: the member's email. For guest: the guest's address. Null otherwise."
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For role: the role, from List Roles. Null otherwise."
          },
          "roleName": {
            "type": [
              "string",
              "null"
            ],
            "description": "For role: the role's name. Null otherwise."
          },
          "teamId": {
            "type": [
              "string",
              "null"
            ],
            "description": "For team: the team, from List Teams. Null otherwise."
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ],
            "description": "For team: the team's name. Null otherwise."
          },
          "viaFolderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a page: the folder this share comes from (from List Analytics Folders), when the page inherits it. Change it on that folder. Null for a share on the page itself."
          },
          "viaFolderName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the folder it comes from. Null when it is the page's own."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was shared."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "targetType",
          "permission",
          "userId",
          "name",
          "email",
          "roleId",
          "roleName",
          "teamId",
          "teamName",
          "viaFolderId",
          "viaFolderName",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsSubpage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The new subpage id. Get Analytics Page reads it."
          },
          "name": {
            "type": "string",
            "description": "What the subpage is called."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line under its title."
          },
          "parentPageId": {
            "type": "string",
            "description": "The page whose panel opens it, from List Analytics Pages."
          },
          "parentPanelId": {
            "type": "string",
            "description": "The panel whose click opens it, from Get Analytics Page."
          },
          "event": {
            "type": "string",
            "description": "The click on that panel that opens it, now wired to navigatePage."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was created."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "parentPageId",
          "parentPanelId",
          "event",
          "createdOn"
        ]
      },
      "AnalyticsTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the template."
          },
          "kind": {
            "type": "string",
            "enum": [
              "page",
              "bundle"
            ],
            "description": "page for one ready-made page; bundle for several pages installed together into a new folder."
          },
          "name": {
            "type": "string",
            "description": "The template name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the template shows."
          },
          "library": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "organization",
              "shared",
              "public",
              null
            ],
            "description": "Where the template comes from: organization (made in your organization), shared (shared with your organization by another one), or public (MindCloud's public library)."
          },
          "publisher": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who offers it: the organization that shared it, or its author."
          },
          "isOfficial": {
            "type": "boolean",
            "description": "Whether MindCloud made and maintains it."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Topic tags. Filter by one with the tag parameter."
          },
          "appIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The apps its data sources read, by id (List Universal Apps). Filter by one with the app parameter. Install Analytics Template takes a connection for each."
          },
          "installCount": {
            "type": "integer",
            "description": "How many times it has been installed."
          },
          "canInstall": {
            "type": "boolean",
            "description": "Whether you can install it."
          },
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The member template id."
                },
                "name": {
                  "type": "string",
                  "description": "The member template name."
                },
                "appIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The apps its data sources read."
                },
                "canInstall": {
                  "type": "boolean",
                  "description": "Whether you can install this member."
                }
              }
            },
            "description": "For a bundle, the templates in it; empty for a page template."
          },
          "publishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was published."
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "description",
          "library",
          "publisher",
          "isOfficial",
          "tags",
          "appIds",
          "installCount",
          "canInstall",
          "members",
          "publishedOn"
        ]
      },
      "AnalyticsTemplateInstall": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "page",
              "bundle"
            ],
            "description": "page for one installed page; bundle for a bundle installed as pages in a new folder."
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new folder holding a bundle's pages (List Analytics Folders), or null for a page template."
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The new page, now yours: read it with Get Analytics Page."
                },
                "templateId": {
                  "type": "string",
                  "description": "The template it was made from (for a bundle, the member)."
                },
                "connectedAppIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The apps wired to the connections you gave. Their data sources are fetching now, except one that points at a record of the template author (a workflow to choose), which waits for setup."
                },
                "skippedAppIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The apps you skipped. Their data sources and the panels reading them stay empty until you connect them."
                }
              }
            },
            "description": "The pages the install made."
          },
          "reusedDataSourceCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many of the template's data sources were ones you already had, from an earlier install: they are reused with their data. Null for a bundle."
          }
        },
        "required": [
          "kind",
          "folderId",
          "pages",
          "reusedDataSourceCount"
        ]
      },
      "AnalyticsTemplateInstallPlan": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "The template the plan is for, from List Analytics Templates."
          },
          "kind": {
            "type": "string",
            "enum": [
              "page",
              "bundle"
            ],
            "description": "page installs one page; bundle installs its members as pages in a new folder."
          },
          "apps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "appId": {
                  "type": "string",
                  "description": "The app. Use it, or appSlug, as the key in Install Analytics Template connections."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app's slug, as List Universal Apps answers it."
                },
                "appName": {
                  "type": "string",
                  "description": "The app's name."
                },
                "dataSourceCount": {
                  "type": "integer",
                  "description": "How many of the template's data sources read this app."
                },
                "panelCount": {
                  "type": "integer",
                  "description": "How many panels show nothing until this app is connected."
                },
                "connections": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The connection id, as List Connections answers it. Pass it in connections to wire the app."
                      },
                      "name": {
                        "type": "string",
                        "description": "The connection name, as List Connections answers it."
                      },
                      "status": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The connection's status after its last sign-in, test or use."
                      },
                      "isCompany": {
                        "type": "boolean",
                        "description": "Whether it is one of the organization's shared connections rather than the creator's own, as List Connections answers it."
                      }
                    }
                  },
                  "description": "The connections the install accepts for this app: your own and the organization's shared ones. Empty when you have none; connect the app in MindCloud first, or skip it."
                }
              }
            },
            "description": "Every app the install needs, each with the connections it accepts. Install Analytics Template takes a connection id or null (skip it) for every one."
          },
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The member template id. Pass it in templateIds to install only some members."
                },
                "name": {
                  "type": "string",
                  "description": "The member template name."
                },
                "canInstall": {
                  "type": "boolean",
                  "description": "Whether you can install this member."
                }
              }
            },
            "description": "For a bundle, its templates and whether you can install each; empty for a page template."
          }
        },
        "required": [
          "templateId",
          "kind",
          "apps",
          "members"
        ]
      },
      "AnalyticsTheme": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the theme."
          },
          "name": {
            "type": "string",
            "description": "The theme name."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether new pages in the organization start with this theme. When no theme is the default, new pages wear the plain Cirra look."
          },
          "style": {
            "type": "object",
            "properties": {
              "fontFamily": {
                "type": "string",
                "enum": [
                  "Inter, sans-serif",
                  "\"SF Pro Display\", -apple-system, sans-serif",
                  "\"Helvetica Neue\", Helvetica, sans-serif",
                  "system-ui, sans-serif",
                  "\"Segoe UI\", sans-serif",
                  "Roboto, sans-serif",
                  "\"Open Sans\", sans-serif",
                  "Lato, sans-serif",
                  "\"Source Sans 3\", sans-serif",
                  "\"IBM Plex Sans\", sans-serif",
                  "\"Atkinson Hyperlegible\", sans-serif",
                  "Georgia, \"Times New Roman\", serif",
                  "\"IBM Plex Mono\", monospace"
                ],
                "description": "Font family. One of: \"Inter, sans-serif\" (Inter), \"\"SF Pro Display\", -apple-system, sans-serif\" (SF Pro Display), \"\"Helvetica Neue\", Helvetica, sans-serif\" (Helvetica Neue), \"system-ui, sans-serif\" (System UI), \"\"Segoe UI\", sans-serif\" (Segoe UI), \"Roboto, sans-serif\" (Roboto), \"\"Open Sans\", sans-serif\" (Open Sans), \"Lato, sans-serif\" (Lato), \"\"Source Sans 3\", sans-serif\" (Source Sans), \"\"IBM Plex Sans\", sans-serif\" (IBM Plex Sans), \"\"Atkinson Hyperlegible\", sans-serif\" (Atkinson Hyperlegible), \"Georgia, \"Times New Roman\", serif\" (Georgia), \"\"IBM Plex Mono\", monospace\" (IBM Plex Mono). Absent when the default is used."
              },
              "fontScale": {
                "type": "string",
                "enum": [
                  "0.9",
                  "1",
                  "1.1",
                  "1.25"
                ],
                "description": "Font size. One of: \"0.9\" (Small), \"1\" (Medium), \"1.1\" (Large), \"1.25\" (Extra Large). Absent when the default is used."
              },
              "panelTitleWeight": {
                "type": "string",
                "enum": [
                  "regular",
                  "medium",
                  "bold"
                ],
                "description": "Panel title weight. One of: \"regular\" (Regular), \"medium\" (Medium), \"bold\" (Bold). Absent when the default is used."
              },
              "pageTitleSize": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "large"
                ],
                "description": "Page title size. One of: \"compact\" (Compact), \"regular\" (Regular), \"large\" (Large). Absent when the default is used."
              },
              "seriesColors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "light": {
                      "type": "string",
                      "description": "The color in light mode, as hex."
                    },
                    "dark": {
                      "type": "string",
                      "description": "The color in dark mode, as hex."
                    }
                  }
                },
                "description": "Series colors: light and dark color pairs in the order charts hand colors out; a null entry uses that slot's default. Absent when the defaults are used."
              },
              "statusColors": {
                "type": "object",
                "properties": {
                  "success": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Success, or null for the default."
                  },
                  "warning": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Warning, or null for the default."
                  },
                  "warningBright": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Caution, or null for the default."
                  },
                  "failure": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Failure, or null for the default."
                  }
                },
                "description": "Status colors, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "chartGridlines": {
                "type": "string",
                "enum": [
                  "off",
                  "dashed",
                  "solid"
                ],
                "description": "Chart gridlines. One of: \"off\" (Off), \"dashed\" (Dashed), \"solid\" (Solid). Absent when the default is used."
              },
              "chartAreaFill": {
                "type": "string",
                "enum": [
                  "none",
                  "light",
                  "solid"
                ],
                "description": "Area fill. One of: \"none\" (None), \"light\" (Light), \"solid\" (Solid). Absent when the default is used."
              },
              "chartCurve": {
                "type": "string",
                "enum": [
                  "straight",
                  "smooth",
                  "natural"
                ],
                "description": "Line curve. One of: \"straight\" (Straight), \"smooth\" (Smooth), \"natural\" (Curved). Absent when the default is used."
              },
              "chartPoints": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Point marks. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "chartValues": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Value labels. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "chartLegend": {
                "type": "string",
                "enum": [
                  "auto",
                  "shown",
                  "hidden"
                ],
                "description": "Legend. One of: \"auto\" (Auto), \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              },
              "numberFormat": {
                "type": "string",
                "enum": [
                  "point",
                  "comma",
                  "space"
                ],
                "description": "Number format. One of: \"point\" (1,234.56), \"comma\" (1.234,56), \"space\" (1 234,56). Absent when the default is used."
              },
              "numberCompact": {
                "type": "string",
                "enum": [
                  "auto",
                  "always",
                  "never"
                ],
                "description": "Compact numbers. One of: \"auto\" (Auto), \"always\" (Always), \"never\" (Never). Absent when the default is used."
              },
              "dateOrder": {
                "type": "string",
                "enum": [
                  "monthFirst",
                  "dayFirst"
                ],
                "description": "Date order. One of: \"monthFirst\" (Jan 6, 2026), \"dayFirst\" (6 Jan 2026). Absent when the default is used."
              },
              "dateStyle": {
                "type": "string",
                "enum": [
                  "short",
                  "medium",
                  "numeric"
                ],
                "description": "Date style. One of: \"short\" (Short), \"medium\" (Medium), \"numeric\" (Numeric). Absent when the default is used."
              },
              "panelCorners": {
                "type": "string",
                "enum": [
                  "square",
                  "rounded",
                  "soft"
                ],
                "description": "Panel corners. One of: \"square\" (Square), \"rounded\" (Rounded), \"soft\" (Soft). Absent when the default is used."
              },
              "panelElevation": {
                "type": "string",
                "enum": [
                  "none",
                  "hairline",
                  "raised"
                ],
                "description": "Panel elevation. One of: \"none\" (None), \"hairline\" (Hairline), \"raised\" (Raised). Absent when the default is used."
              },
              "panelGap": {
                "type": "string",
                "enum": [
                  "none",
                  "tight",
                  "regular",
                  "wide"
                ],
                "description": "Panel gap. One of: \"none\" (None), \"tight\" (Tight), \"regular\" (Regular), \"wide\" (Wide). Absent when the default is used."
              },
              "panelPadding": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "comfortable"
                ],
                "description": "Panel padding. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). Absent when the default is used."
              },
              "tableDensity": {
                "type": "string",
                "enum": [
                  "compact",
                  "regular",
                  "comfortable"
                ],
                "description": "Table density. One of: \"compact\" (Compact), \"regular\" (Regular), \"comfortable\" (Comfortable). Absent when the default is used."
              },
              "pageBackground": {
                "type": "object",
                "properties": {
                  "page": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Page, or null for the default."
                  }
                },
                "description": "Page background, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "panelFill": {
                "type": "object",
                "properties": {
                  "panel": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Panel, or null for the default."
                  }
                },
                "description": "Panel fill, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "ink": {
                "type": "object",
                "properties": {
                  "ink": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Ink, or null for the default."
                  }
                },
                "description": "Ink, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "lineColor": {
                "type": "object",
                "properties": {
                  "line": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Line, or null for the default."
                  }
                },
                "description": "Line color, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "brandHeaderColor": {
                "type": "object",
                "properties": {
                  "header": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "light": {
                        "type": "string",
                        "description": "The color in light mode, as hex."
                      },
                      "dark": {
                        "type": "string",
                        "description": "The color in dark mode, as hex."
                      }
                    },
                    "description": "Header, or null for the default."
                  }
                },
                "description": "Publication header color, a light and dark color pair per entry. Absent when the defaults are used."
              },
              "cirraMark": {
                "type": "string",
                "enum": [
                  "shown",
                  "hidden"
                ],
                "description": "Cirra mark. One of: \"shown\" (Shown), \"hidden\" (Hidden). Absent when the default is used."
              }
            },
            "description": "The look the theme gives a page, option by option. An option it leaves out keeps the default."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the theme was created."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the theme was last changed."
          }
        },
        "required": [
          "id",
          "name",
          "isDefault",
          "style",
          "createdOn",
          "updatedOn"
        ]
      },
      "AnalyticsTransformPreview": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The column names the rows carry, in order."
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The rows in this window, as objects keyed by column."
          },
          "rowCount": {
            "type": "integer",
            "description": "How many rows there are in all."
          },
          "offset": {
            "type": "integer",
            "description": "Where this window starts."
          },
          "nextOffset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The offset of the next window, or null when this is the last."
          }
        },
        "required": [
          "columns",
          "rows",
          "rowCount",
          "offset",
          "nextOffset"
        ]
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the key."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name the key was created with."
          },
          "accessLevel": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "read_only",
              "run_workflows",
              "full_access",
              "none",
              null
            ],
            "description": "A summary of the key permissions: full_access, run_workflows, read_only, or none. Derived from permissions; it is never set directly."
          },
          "isAllOrganizations": {
            "type": "boolean",
            "description": "\"Use this key across all of your organizations\": the key can act, through X-Company-Id, in every organization its creator can open in the app, with no more than the creator may do there."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The permissions the key holds. A request may use one only while the key's creator also holds it."
          },
          "key": {
            "type": "string",
            "description": "The key itself, such as `mc-us1-…`. It appears only in this response; MindCloud keeps only a hash."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was created."
          }
        },
        "required": [
          "id",
          "name",
          "accessLevel",
          "isAllOrganizations",
          "permissions",
          "key",
          "createdOn"
        ]
      },
      "ApiKeySummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the key."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name the key was created with."
          },
          "companyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The organization the key belongs to. A key with isAllOrganizations is listed in every organization its creator opens, so it may belong to another one."
          },
          "isAllOrganizations": {
            "type": "boolean",
            "description": "\"Use this key across all of your organizations\": the key can act, through X-Company-Id, in every organization its creator can open in the app, with no more than the creator may do there."
          },
          "accessLevel": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "read_only",
              "run_workflows",
              "full_access",
              "none",
              null
            ],
            "description": "A summary of the key permissions: full_access, run_workflows, read_only, or none. Derived from permissions; it is never set directly."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The permissions the key holds. A request may use one only while the key's creator also holds it."
          },
          "usedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last time the key was used. Old dates are rotation candidates."
          },
          "revokedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was revoked. Empty while it is active."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the key was created."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who created it."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          }
        },
        "required": [
          "id",
          "name",
          "companyId",
          "isAllOrganizations",
          "accessLevel",
          "permissions",
          "usedOn",
          "revokedOn",
          "createdOn",
          "createdBy",
          "updatedOn"
        ]
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the entry."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the request was made."
          },
          "requestId": {
            "type": "string",
            "description": "The request id, as the response carried it."
          },
          "actor": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "api_key",
                  "member",
                  "parent_organization",
                  "mindcloud_admin"
                ],
                "description": "api_key, member, parent_organization, or mindcloud_admin."
              },
              "apiKeyId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For api_key: the key."
              },
              "userId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For api_key and member: the user the key acts as."
              },
              "companyId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "For parent_organization: the parent organization."
              }
            },
            "description": "Who made it: one of your company's API keys (with the user it acts as), one of your members through their own key from another organization (\"Use this key across all of your organizations\"; the key is not shown), your parent organization (its key is not shown), or MindCloud support (not shown)."
          },
          "apiKeyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's own API key that made it. Empty for a key of another organization: a member's, a parent organization's, or MindCloud's."
          },
          "endpointName": {
            "type": "string",
            "description": "The endpoint, such as v2-update-member."
          },
          "method": {
            "type": "string",
            "enum": [
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ],
            "description": "POST, PUT, PATCH, or DELETE."
          },
          "route": {
            "type": "string",
            "description": "The route, such as /v2/members/:userId."
          },
          "path": {
            "type": "string",
            "description": "The path called."
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id of the resource it acted on, when there is one."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status it answered. 0 while a write to another company waits for its handler."
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "The error code, when it was refused or failed."
          },
          "errorReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "The error's details.reason."
          },
          "durationMs": {
            "type": "integer",
            "description": "How long it took, in milliseconds."
          }
        },
        "required": [
          "id",
          "createdOn",
          "requestId",
          "actor",
          "apiKeyId",
          "endpointName",
          "method",
          "route",
          "path",
          "resourceId",
          "statusCode",
          "errorCode",
          "errorReason",
          "durationMs"
        ]
      },
      "AuthorizationCheck": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The member's userId."
          },
          "permission": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "The permission asked about."
              },
              "allowed": {
                "type": "boolean",
                "description": "True when the member holds it."
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Where they hold it from: role, directGrant, staff, companySetting, or membership (every member holds it). Empty when they do not."
              }
            },
            "description": "The permission answer, or null when no permission was asked about."
          },
          "capability": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "The capability key asked about."
              },
              "allowed": {
                "type": "boolean",
                "description": "False when Cirra refuses it."
              },
              "decision": {
                "type": "string",
                "enum": [
                  "allow",
                  "never_ask",
                  "deny"
                ],
                "description": "allow (Cirra asks the member first unless the thread runs with full access), never_ask, or deny."
              },
              "layer": {
                "type": "string",
                "enum": [
                  "role",
                  "user",
                  "default"
                ],
                "description": "Which layer decided: role, user (their own rules), or default."
              },
              "ruleKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The key of the rule that decided: the key asked about, or the broader key it fell back to."
              }
            },
            "description": "The Cirra capability answer, or null when no capability was asked about."
          }
        },
        "required": [
          "userId",
          "permission",
          "capability"
        ]
      },
      "CapabilityCatalog": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The key, such as files.write, or a pattern, such as apps.<app>.<model>.<operation>."
                },
                "description": {
                  "type": "string",
                  "description": "What the key governs."
                },
                "default": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "allow",
                    "never_ask",
                    "deny",
                    null
                  ],
                  "description": "Its value when no role or person sets it: allow, never_ask (allow without asking) or deny. Null for a pattern: its default is its fallback."
                },
                "fallback": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The key that decides when this one is not set. Null for a top-level key."
                }
              }
            },
            "description": "Every capability key or key pattern, from the broadest to the most specific. Patterns name their parts in angle brackets."
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The operations an app action declares, as used in apps keys. An action declares one; GET /v2/universal/apps/{app}/actions lists each action with its model and operation."
          },
          "values": {
            "type": "object",
            "properties": {
              "role": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values a role may set: allow or deny. A role deny is a ceiling no person can lift."
              },
              "user": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values a person's own rules may set: allow, never_ask (allow without asking), or deny."
              }
            },
            "description": "The values each layer may set."
          },
          "reservedShellCommands": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Shell commands that cannot be given a rule of their own, such as ls and cat. They follow shell.default."
          }
        },
        "required": [
          "keys",
          "operations",
          "values",
          "reservedShellCommands"
        ]
      },
      "ChildCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The child organization's id. Send it in X-Company-Id to call other endpoints on the child."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The child organization's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The child organization's description."
          },
          "origin": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "created",
              "linked",
              null
            ],
            "description": "created when your company created it through the API, linked when an existing organization accepted your company as its parent in Cirra."
          },
          "linkedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the link started."
          },
          "memberCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Members of the child organization, including pending invites."
          },
          "ownerCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Active Owners. A child cannot be released while this is 0."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "origin",
          "linkedOn",
          "memberCount",
          "ownerCount"
        ]
      },
      "ClosedChildCompany": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of the child organization that was closed."
          }
        },
        "required": [
          "id"
        ]
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the company."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's description."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's timezone key, an abbreviation such as EDT or PST rather than an IANA zone name."
          },
          "plan": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your plan: Basic, Professional, or Enterprise."
          },
          "memberCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many people are in the company."
          },
          "isPersonal": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for personal workspaces rather than team companies."
          },
          "isDeleted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True after the company was deleted."
          },
          "subscriptionIsLegacy": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True while the company is on a legacy plan."
          },
          "subscriptionUpdatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the subscription last changed."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the company was created."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          },
          "access": {
            "type": "string",
            "enum": [
              "own",
              "child",
              "member",
              "staff",
              "staffLimited",
              "approvalRequired"
            ],
            "description": "How this API key reaches the organization, and so where X-Company-Id may name it: own on every endpoint; child and staff on every endpoint that acts in other organizations except the member-only ones (API keys, audit events, child organizations, link requests, leaving a parent) and Embedded end users; member on all of those but Embedded end users; staffLimited like staff, on endpoints of the parts of MindCloud in staffApprovedApps and on endpoints shared by both parts (they accept either approval); approvalRequired on none."
          },
          "staffApprovedApps": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "For an organization the key reaches through MindCloud staff access (staff, staffLimited, approvalRequired): the parts of MindCloud it is open in. all when it is not restricted (or the creator may enter every restricted organization); otherwise gravity and/or cirra, the parts the creator is approved for; empty when approvalRequired. Null for every other organization."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "timezone",
          "plan",
          "memberCount",
          "isPersonal",
          "isDeleted",
          "subscriptionIsLegacy",
          "subscriptionUpdatedOn",
          "createdOn",
          "updatedOn",
          "access",
          "staffApprovedApps"
        ]
      },
      "CompanyProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the company."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's description."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's timezone key, an abbreviation such as EDT or PST rather than an IANA zone name."
          },
          "region": {
            "type": "string",
            "enum": [
              "us-west-1",
              "eu-north-1",
              "sa-east-1"
            ],
            "description": "Where the company keeps its data: us-west-1 (United States), eu-north-1 (European Union) or sa-east-1 (Brazil)."
          },
          "isPersonal": {
            "type": "boolean",
            "description": "True for personal workspaces rather than team companies."
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company's logo URL."
          },
          "parent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The parent's company id."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The parent's name."
              },
              "origin": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "created",
                  "linked",
                  null
                ],
                "description": "created when the parent created this company, linked when this company accepted the parent."
              },
              "linkedOn": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the link started."
              }
            },
            "description": "The parent organization, or null when the company has none. Its API keys can act in this company."
          },
          "memberCount": {
            "type": "integer",
            "description": "Members of the company, including people whose invite is pending."
          },
          "roleCount": {
            "type": "integer",
            "description": "Roles you can assign: the built-in roles plus your custom roles (List Roles)."
          },
          "domainDiscovery": {
            "type": "object",
            "properties": {
              "isEnabled": {
                "type": "boolean",
                "description": "True when domain discovery is on."
              },
              "domains": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The email domains it applies to."
              }
            },
            "description": "Whether people who sign up with an email at one of these domains can find and join the company."
          },
          "embedded": {
            "type": "object",
            "properties": {
              "isEnabled": {
                "type": "boolean",
                "description": "True when Embedded is enabled, so end users can connect their own accounts."
              }
            },
            "description": "MindCloud Embedded for the company."
          },
          "isDeleted": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True after the company was deleted."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the company was created."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "timezone",
          "region",
          "isPersonal",
          "logo",
          "parent",
          "memberCount",
          "roleCount",
          "domainDiscovery",
          "embedded",
          "isDeleted",
          "createdOn",
          "updatedOn"
        ]
      },
      "ConnectLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Show this URL only to the person it is for: the end user, for an Embedded link; the person who created the API key, signed in to MindCloud, for Create Connect Link (only they can open it). The link lasts fifteen minutes and works once."
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app the user will connect."
          },
          "expiresOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the connection link expires."
          },
          "singleUse": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Always true. Request a new link if this one was consumed."
          }
        },
        "required": [
          "url",
          "appName",
          "expiresOn",
          "singleUse"
        ]
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the connection."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connection's name, as the app lists it. Null when it was never named."
          },
          "nameSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "generated",
              "manual",
              null
            ],
            "description": "How the name was set. Null for connections named before this was recorded."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app this connection signs into."
          },
          "authType": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it signs in to the app, as the app's sign-in method declares it: oAuth2, oAuth1, apiKey, basic, custom, ftp or none."
          },
          "authenticationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's sign-in method it uses, for an app that offers more than one."
          },
          "accountEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The email of the account it signed in as. Null when the app's sign-in does not report one (Slack's does not)."
          },
          "externalAccountId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The signed-in account's id at the provider (a Slack workspace's team id), when the app reports one."
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The permissions the provider granted at sign-in. Null for a connection that is not OAuth or last signed in before MindCloud recorded them; signing it in again records them."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment it is for, when a company keeps a connection per environment."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connection's status as of statusUpdatedOn: the result of its last sign-in, test or use."
          },
          "statusUpdatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the status last changed."
          },
          "isDefault": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when it is the company's default connection for its app: a Universal API run that sends no connectionId uses it, and the editor picks it for a new step."
          },
          "isCompany": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when the whole company shares this connection."
          },
          "owner": {
            "type": "string",
            "enum": [
              "company",
              "personal",
              "endUser",
              "installation"
            ],
            "description": "Whose connection it is. Filter with owner[in]=company,personal to leave out Embedded end users' and installations' connections."
          },
          "usableByYou": {
            "type": "boolean",
            "description": "Whether this API key's creator may run Universal actions through it, and test or delete it: a shared connection with no share list, or whose share list gives them access (Everyone, their role or one of their teams; or they manage roles), or one of their own, the rule the Universal run applies. False for a shared connection whose share list gives them no access, and for Embedded end users' and installations' connections, which are used only on that end user's or installation's behalf. Another member's personal connection is not listed at all."
          },
          "isGlobal": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for a personal connection its owner can also use in every other company they belong to."
          },
          "endUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded end user who owns it, if any."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded installation it belongs to, if any."
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The user who owns it, if it is personal."
          },
          "createdIn": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where it was created: gravity (the MindCloud platform) or cirra. Null for connections created before this was recorded."
          },
          "testedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last successful test."
          },
          "expiresOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the current sign-in expires (an OAuth access token's lifetime), if it does. MindCloud signs in again before the next use when the app allows it, so a past date on a valid connection usually means it has not been used since; status says whether that worked last time. Filter on this to catch sign-ins that cannot renew themselves."
          },
          "authenticatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last time someone authenticated it."
          },
          "attemptedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last time someone started signing it in, whether or not they finished."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the connection was created."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who created it: a member's userId (List Members), or an embedded end user's id. With createdOn and authenticatedOn, this tells apart connections that share a name, such as several to the same Slack workspace."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          },
          "updatedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who last changed it."
          }
        },
        "required": [
          "id",
          "name",
          "nameSource",
          "appId",
          "authType",
          "authenticationId",
          "accountEmail",
          "externalAccountId",
          "scopes",
          "environmentId",
          "status",
          "statusUpdatedOn",
          "isDefault",
          "isCompany",
          "owner",
          "usableByYou",
          "isGlobal",
          "endUserId",
          "installationId",
          "userId",
          "createdIn",
          "testedOn",
          "expiresOn",
          "authenticatedOn",
          "attemptedOn",
          "createdOn",
          "createdBy",
          "updatedOn",
          "updatedBy"
        ]
      },
      "ConnectionAuthentication": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sign-in method id: authenticationId in Create Connection and Create Connect Link."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it signs in: oAuth2, oAuth1, apiKey, basic, custom, ftp or none."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The method's name, as the app's connection form shows it."
          },
          "requiresBrowser": {
            "type": "boolean",
            "description": "True when a person signs in at the provider in a browser (OAuth): use Create Connect Link. False when the fields are typed in: use Create Connection."
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The key to send the value under in credentials."
                },
                "label": {
                  "type": "string",
                  "description": "The label the form shows."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "boolean",
                    "number",
                    "date",
                    "list"
                  ],
                  "description": "The kind of value."
                },
                "required": {
                  "type": "boolean",
                  "description": "True when a new connection needs it."
                },
                "isSecret": {
                  "type": "boolean",
                  "description": "True for a secret (an API key, a password, a token): the form hides it, and no MindCloud response ever answers it."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app's help text for it."
                },
                "options": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string",
                        "description": "The value to send."
                      },
                      "label": {
                        "type": "string",
                        "description": "What the form shows for it."
                      }
                    }
                  },
                  "description": "The values it accepts, when it is a choice."
                }
              }
            },
            "description": "What the connection form asks for, in its order. Send their values by key in credentials. Empty for a method that asks for nothing typed in."
          }
        },
        "required": [
          "id",
          "type",
          "name",
          "requiresBrowser",
          "fields"
        ]
      },
      "ConnectionShares": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "description": "The connection (List Connections)."
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "targetType": {
                  "type": "string",
                  "enum": [
                    "organization",
                    "role",
                    "team"
                  ],
                  "description": "Who the entry names."
                },
                "roleId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The role, for a role entry (List Roles). Null otherwise."
                },
                "roleName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "That role's name. Null for other entries, and for a role deleted since the entry was saved: such an entry matches nobody and can be removed."
                },
                "teamId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The team, for a team entry (List Teams). Null otherwise."
                },
                "teamName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "That team's name. Null for other entries."
                },
                "accessLevel": {
                  "type": "string",
                  "enum": [
                    "none",
                    "read",
                    "readWrite",
                    "full",
                    "custom"
                  ],
                  "description": "What the members it matches may do with the connection."
                },
                "permissions": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "default": {
                      "type": "object",
                      "properties": {
                        "read": {
                          "type": "boolean",
                          "description": "Actions that read records."
                        },
                        "create": {
                          "type": "boolean",
                          "description": "Actions that create records."
                        },
                        "update": {
                          "type": "boolean",
                          "description": "Actions that update records."
                        },
                        "delete": {
                          "type": "boolean",
                          "description": "Actions that delete records."
                        },
                        "unknown": {
                          "type": "boolean",
                          "description": "Actions that declare no operation (\"Other\")."
                        }
                      },
                      "description": "Every operation, true or false: what the entry allows on record types models does not name, and on actions with no record type."
                    },
                    "models": {
                      "type": "object",
                      "description": "{ \"<record type>\": { \"<operation>\": true or false } }: the cells that differ from default, by canonical record type key. An operation a record type leaves out follows default."
                    }
                  },
                  "description": "The Advanced table of a custom entry; null on every other level. An action runs through this entry when models[its record type][its operation] is true, else when default[its operation] is true. An action with no record type follows default; one that declares no operation is \"unknown\". Record types are the canonical keys of app actions (model). Grants from all the entries that match a member add up: a member may run an action when any of them allows it, so false (Blocked) only means this entry does not grant it. A table is saved in one form: record type cells equal to default are dropped, and a table with none left whose default equals a preset is saved as that preset."
                }
              }
            },
            "description": "Who may use the connection in Cirra, and how far. A member may do what any entry that matches them allows; its owner, its creator, Platform Admins and members who manage roles always have full. Empty: nothing restricts the connection yet, so every member has full. A list saved since sharing levels shipped always has one organization entry; an older list of roles alone leaves members no entry matches without access."
          }
        },
        "required": [
          "connectionId",
          "entries"
        ]
      },
      "ConnectionTestResult": {
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean",
            "description": "False when the app declares no connection test; then no test ran."
          },
          "status": {
            "type": "string",
            "description": "The verdict: the stored connection status after the test, or \"unsupported\"."
          },
          "testedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the test ran."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the test failed or could not run. Empty when it passed."
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "enum": [
                    "status",
                    "testedOn",
                    "authenticatedOn",
                    "expiresOn",
                    "name"
                  ],
                  "description": "The connection field that moved."
                },
                "from": {
                  "description": "Its value before the test."
                },
                "to": {
                  "description": "Its value after the test."
                }
              }
            },
            "description": "Each field of the connection the test moved, with its value before and after. Empty when it moved nothing, as when the app declares no test."
          }
        },
        "required": [
          "supported",
          "status",
          "testedOn",
          "message",
          "changes"
        ]
      },
      "DailyUsage": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "The day (YYYY-MM-DD)."
          },
          "tasks": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Tasks used that day."
          }
        },
        "required": [
          "date",
          "tasks"
        ]
      },
      "DeletedResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of the resource that was deleted."
          }
        },
        "required": [
          "id"
        ]
      },
      "EmbeddedConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The public connection ID to pass to runs, lookups, or repair links."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app slug used in Universal API routes."
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app display name."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The account label the user can recognize."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The current connection status."
          },
          "connectedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the account connected, or when its credential was created."
          }
        },
        "required": [
          "id",
          "appSlug",
          "appName",
          "label",
          "status",
          "connectedOn"
        ]
      },
      "EndUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the end user. Use it in the end user routes, connect links, and the embedded MCP route."
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own id for them, such as the user id in your product."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their email address."
          },
          "metadata": {
            "type": "object",
            "description": "Your values for them, used as credential-exchange host variables. Each value is a host label (letters, digits, hyphens)."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the end user was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When they were last changed."
          }
        },
        "required": [
          "id",
          "externalId",
          "name",
          "email",
          "metadata",
          "createdOn",
          "updatedOn"
        ]
      },
      "Environment": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the environment. Use it to filter runs."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment's name, like Production or Sandbox."
          },
          "isDefault": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for the default environment."
          },
          "workflowCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many scheduled workflows target it."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the environment was created."
          }
        },
        "required": [
          "id",
          "name",
          "isDefault",
          "workflowCount",
          "createdOn"
        ]
      },
      "FailedRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the run. Use List Run Steps for every step it ran."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow this run belongs to, from List Workflows."
          },
          "workflowName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's current name."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow version that ran, or \"draft\"."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the run targeted, from List Environments."
          },
          "environmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That environment's name."
          },
          "startedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the run started. The list is newest first."
          },
          "finishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run stopped."
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ],
            "description": "How long the run took, in milliseconds."
          },
          "operations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many tasks the run used before it stopped."
          },
          "activeStepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step the run stopped at (a stepId). Inside a branch or loop, the step in it that failed. To see its input and response, find the entry with this stepId and success false in List Run Steps, then pass its stepInstanceId to Get a Run Step."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the run stopped, in a sentence: the step name and the error it returned, for example: Workflow stopped after step \"Search Tickets\" failed: 429_TOO_MANY_REQUESTS."
          },
          "endUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded end user the run belongs to, if any."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded installation the run belongs to, if any."
          }
        },
        "required": [
          "id",
          "workflowId",
          "workflowName",
          "version",
          "environmentId",
          "environmentName",
          "startedOn",
          "finishedOn",
          "durationMs",
          "operations",
          "activeStepId",
          "summary",
          "endUserId",
          "installationId"
        ]
      },
      "Invitation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The invitation's id: the pending member's userId (List Members), until they sign up."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who was invited."
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role they get when they join, from List Roles."
          },
          "roleName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That role's name."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted"
            ],
            "description": "pending while they have not signed up. Create Invitation answers accepted for someone who already had a MindCloud account and joined at once; they are then a member (List Members)."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When they were invited."
          }
        },
        "required": [
          "id",
          "email",
          "roleId",
          "roleName",
          "status",
          "createdOn"
        ]
      },
      "LinkRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the link request."
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ],
            "description": "outgoing when your company sent it, incoming when another organization sent it to you."
          },
          "side": {
            "type": "string",
            "enum": [
              "parent",
              "child"
            ],
            "description": "The side your company takes if it is accepted: parent or child."
          },
          "parentCompanyId": {
            "type": "string",
            "description": "The organization that would become the parent."
          },
          "parentCompanyName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That organization's name."
          },
          "childCompanyId": {
            "type": "string",
            "description": "The organization that would become the child."
          },
          "childCompanyName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That organization's name."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "declined",
              "canceled",
              "expired"
            ],
            "description": "pending (waiting for the receiving organization), accepted (the organizations are linked), declined, canceled (the sender withdrew it), or expired (not answered in time; send a new one)."
          },
          "expiresOn": {
            "type": "string",
            "format": "date-time",
            "description": "When a pending request stops being answerable."
          },
          "respondedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was accepted, declined, or canceled."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was sent."
          }
        },
        "required": [
          "id",
          "direction",
          "side",
          "parentCompanyId",
          "parentCompanyName",
          "childCompanyId",
          "childCompanyName",
          "status",
          "expiresOn",
          "respondedOn",
          "createdOn"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "apiKey": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calling key's id."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calling key's name."
              },
              "companyId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The company the key belongs to."
              },
              "accessLevel": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The calling key's access level."
              },
              "isAdmin": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Reserved for MindCloud platform keys; false for customer keys."
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The permissions the key holds."
              },
              "effectivePermissions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The permissions this request may use: those the key holds that its creator also holds right now, in the company it acts on. Empty when the creator's account was removed or they left the organization."
              }
            },
            "required": [
              "id",
              "name",
              "companyId",
              "accessLevel",
              "isAdmin",
              "permissions",
              "effectivePermissions"
            ]
          },
          "companyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company your requests will read from."
          },
          "company": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The company your requests will read from."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "That company's name."
              },
              "embedded": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "isEnabled": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "True when MindCloud Embedded is enabled for the company, so end users can connect their own accounts."
                  }
                },
                "required": [
                  "isEnabled"
                ]
              },
              "parent": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The id of that company's parent organization, or null when it has none. The parent's keys can act in this company."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The parent organization's name."
                  },
                  "origin": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "created or linked: how the company became a child."
                  },
                  "linkedOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the link started."
                  }
                },
                "required": [
                  "id",
                  "name",
                  "origin",
                  "linkedOn"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "embedded",
              "parent"
            ]
          },
          "delegation": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "parentCompanyId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Set when this key belongs to a parent and X-Company-Id named one of its children: the key's company. Otherwise delegation is null."
              },
              "childCompanyId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The child organization this request acts on."
              }
            },
            "required": [
              "parentCompanyId",
              "childCompanyId"
            ]
          }
        },
        "required": [
          "apiKey",
          "companyId",
          "company",
          "delegation"
        ]
      },
      "Member": {
        "type": "object",
        "properties": {
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the member."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's email address."
          },
          "isPending": {
            "type": "boolean",
            "description": "True while their invite is waiting to be accepted."
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role they hold."
          },
          "roleName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That role's name."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When they joined the company."
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "isPending",
          "roleId",
          "roleName",
          "createdOn"
        ]
      },
      "MemberCapabilities": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The member's userId."
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role whose rules apply to them."
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The capability key, such as files.write or apps.salesforce.contact.update."
                },
                "value": {
                  "type": "string",
                  "enum": [
                    "allow",
                    "never_ask",
                    "deny"
                  ],
                  "description": "What Cirra does: allow (asks first unless the thread runs with full access), never_ask (allows without asking), or deny."
                },
                "layer": {
                  "type": "string",
                  "enum": [
                    "default",
                    "role",
                    "user"
                  ],
                  "description": "Which layer decided it: default, role, or user (the person's own rules)."
                }
              }
            },
            "description": "Every key a layer sets for them, in key order. A key not listed follows its fallback (Get Capability Catalog)."
          }
        },
        "required": [
          "userId",
          "roleId",
          "capabilities"
        ]
      },
      "MemberPermissions": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The member's userId."
          },
          "roleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role they hold in the company."
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The permission key, from List Permissions."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The permission's display name."
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Where it comes from: role, directGrant (granted to the person outside any role), staff (their MindCloud staff role, which replaces a company role), companySetting (the jobs screen setting), or membership (every member holds it, as analytics:page:view). A permission held two ways names both."
                }
              }
            },
            "description": "Their effective permissions, in key order."
          }
        },
        "required": [
          "userId",
          "roleId",
          "permissions"
        ]
      },
      "MemberSpendLimit": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The member's userId."
          },
          "creditSpendLimitUsd": {
            "type": [
              "string",
              "null"
            ],
            "description": "How much of the organization's Cirra credit pool the member may use per billing period, in US dollars, such as \"250.00\". \"0.00\": none. Null: the plan's default limit."
          }
        },
        "required": [
          "userId",
          "creditSpendLimitUsd"
        ]
      },
      "OrganizationRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the run."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow this run belongs to."
          },
          "workflowName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's current name."
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "running",
              "finished",
              "failed",
              "cancelled",
              "interrupted",
              "limitExceeded",
              "cancelling",
              "unknown"
            ],
            "description": "Where the run stands or how it ended: waiting, running, finished, failed, cancelled, interrupted, limitExceeded, or cancelling."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow version that ran, or \"draft\"."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the run targeted."
          },
          "environmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That environment's name."
          },
          "startedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the run started."
          },
          "finishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run finished. Empty while it is still going."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the run last changed: when it finished, or for a run still going, its last progress. updatedFrom filters on it."
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ],
            "description": "How long the run took, in milliseconds."
          },
          "operations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many tasks the run used. This is the number that counts against your limit."
          },
          "errorCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many errors the run logged."
          },
          "warningCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many warnings the run logged."
          },
          "infoCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many info entries the run logged."
          },
          "activeStepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last step the run reached: while it runs, the step it is on now; once it ends, the step it stopped at."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "A short summary of what the run did. For a failed or interrupted run, why it stopped: the step name and the error it returned. Null while it runs."
          },
          "endUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded end user the run belongs to, if any."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded installation the run belongs to, if any."
          },
          "triggerAppSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that triggered the run."
          }
        },
        "required": [
          "id",
          "workflowId",
          "workflowName",
          "status",
          "version",
          "environmentId",
          "environmentName",
          "startedOn",
          "finishedOn",
          "updatedOn",
          "durationMs",
          "operations",
          "errorCount",
          "warningCount",
          "infoCount",
          "activeStepId",
          "summary",
          "endUserId",
          "installationId",
          "triggerAppSlug"
        ]
      },
      "OrganizationWorkflowStep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The step's id, stable across edits. A trigger's id is the one List Workflow Triggers and the trigger actions take; a step's, the one Get Workflow Step takes."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow the step belongs to, from List Workflows."
          },
          "workflowName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's current name."
          },
          "isTrigger": {
            "type": "boolean",
            "description": "True for a trigger, which starts the workflow: a schedule, a webhook, another workflow calling it (runWorkflow), or an app event. A schedule trigger's name says when it runs, like \"Run every 5 minutes, daily\"."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step's display name."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app the step or trigger runs, or the built-in type: iterate, ifElse, map and the like for a step; schedule, webhook or runWorkflow for a trigger."
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's display name, like HubSpot. Null for a built-in type, and when the step's action is not in the app catalog (none chosen yet, or since removed)."
          },
          "functionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The function this step calls, for a function call step."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action the step runs, or the app event a trigger listens for: the id Get Workflow Step and List Workflow Triggers answer. Null for a built-in type."
          },
          "actionName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action's display name, like Search Tickets. Null for a built-in type, and when the action is not in the app catalog."
          },
          "operation": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "read",
              "create",
              "update",
              "delete",
              null
            ],
            "description": "What the step's action does to records in its app: read, create, update, or delete. Null for a trigger, a built-in type, and an action that does not say."
          },
          "isDisabled": {
            "type": "boolean",
            "description": "True when the step is turned off and runs skip it."
          },
          "isConfigured": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the step was added."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the step was last changed."
          }
        },
        "required": [
          "id",
          "workflowId",
          "workflowName",
          "isTrigger",
          "name",
          "appSlug",
          "appName",
          "functionId",
          "actionId",
          "actionName",
          "operation",
          "isDisabled",
          "isConfigured",
          "createdOn",
          "updatedOn"
        ]
      },
      "Permission": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The permission key, such as workflow:run. Roles, API keys, and the effective permissions of a member name permissions by key."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The permission's display name."
          },
          "area": {
            "type": [
              "string",
              "null"
            ],
            "description": "The part of MindCloud it governs: the key before its first colon, such as workflow or member."
          },
          "assignableToCustomRoles": {
            "type": "boolean",
            "description": "True when a custom role may carry it (Create Role, Update Role)."
          },
          "ownerOnly": {
            "type": "boolean",
            "description": "True when only the built-in Owner role holds it; no custom role may carry it."
          },
          "apiKeyGrantable": {
            "type": "boolean",
            "description": "True when an API key may hold it (Create API Key)."
          }
        },
        "required": [
          "key",
          "name",
          "area",
          "assignableToCustomRoles",
          "ownerOnly",
          "apiKeyGrantable"
        ]
      },
      "Platform": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "microsoft",
              "slack"
            ],
            "description": "The platform: microsoft (Teams) or slack."
          },
          "isConnected": {
            "type": "boolean",
            "description": "True once a workspace or tenant was connected in Cirra. Connecting proves ownership of it, so it is done in Cirra, not through the API."
          },
          "directoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The connected Slack workspace or Microsoft tenant id."
          },
          "directoryName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its name."
          },
          "allowedEmailDomains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Email domains whose people may sign in through the platform. Consumer domains such as gmail.com are refused."
          },
          "autoCreateUsers": {
            "type": "boolean",
            "description": "True when people from those domains who have no MindCloud account get one when they first sign in."
          },
          "defaultRoleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role new people get when no group mapping applies and no unmapped role is set (List Roles)."
          },
          "allowGuests": {
            "type": "boolean",
            "description": "True when guests of the tenant or workspace may sign in."
          },
          "roleMappings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "groupId": {
                  "type": "string",
                  "description": "The directory group id."
                },
                "roleId": {
                  "type": "string",
                  "description": "The role it grants (List Roles)."
                }
              }
            },
            "description": "Which directory group grants which role. The first group a person is in decides."
          },
          "unmappedRoleId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role for someone in none of the mapped groups. Null: they are refused."
          }
        },
        "required": [
          "id",
          "isConnected",
          "directoryId",
          "directoryName",
          "allowedEmailDomains",
          "autoCreateUsers",
          "defaultRoleId",
          "allowGuests",
          "roleMappings",
          "unmappedRoleId"
        ]
      },
      "PublishedWorkflowVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "The new version number."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What changed in this version."
          },
          "isPublished": {
            "type": "boolean",
            "description": "Always true: this version now runs."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When it was published."
          }
        },
        "required": [
          "version",
          "description",
          "isPublished",
          "createdOn"
        ]
      },
      "QueuedRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow log id. Poll GET /v2/runs/:runId with this id for the outcome."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow that was started."
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting"
            ],
            "description": "Always waiting: the run is queued."
          },
          "version": {
            "type": "string",
            "enum": [
              "published",
              "draft"
            ],
            "description": "The version that runs: published or draft."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment it runs in, or null for the default."
          }
        },
        "required": [
          "id",
          "workflowId",
          "status",
          "version",
          "environmentId"
        ]
      },
      "RestoredWorkflowDraft": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "The version the draft now holds."
          },
          "triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The trigger's id."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The trigger's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app event the trigger listens for. Null for a built-in trigger."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the trigger is turned off."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
                }
              }
            },
            "description": "The draft triggers now."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The step's id. Stable across edits; never positional."
                },
                "number": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app action the step runs. Null for a built-in step type."
                },
                "functionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The function this step calls, for a function call step."
                },
                "parentStepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
                },
                "slot": {
                  "type": "string",
                  "enum": [
                    "steps",
                    "body",
                    "then",
                    "else"
                  ],
                  "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
                },
                "depth": {
                  "type": "integer",
                  "description": "How deeply the step is nested. 0 at the top level."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the step is turned off and runs skip it."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
                },
                "body": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "then": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "else": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                }
              }
            },
            "description": "The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else)."
          }
        },
        "required": [
          "version",
          "triggers",
          "steps"
        ]
      },
      "Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the role."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role's description. Empty when nobody wrote one."
          },
          "isAdmin": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the role grants admin rights."
          },
          "isGlobal": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for roles MindCloud provides to every company. Global roles are read-only: writing one answers 404."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the role was created."
          },
          "memberCount": {
            "type": "integer",
            "description": "How many people in the company hold the role, people whose invite is pending included. A role with members cannot be deleted."
          },
          "permissions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The permission key, such as workflow:run."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The permission's display name."
                }
              }
            },
            "description": "Everything the role allows, as { key, name } pairs."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "isAdmin",
          "isGlobal",
          "createdOn",
          "memberCount",
          "permissions"
        ]
      },
      "RoleCapabilities": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string",
            "description": "The role."
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The capability key, such as apps.salesforce.contact.delete."
                },
                "value": {
                  "type": "string",
                  "enum": [
                    "allow",
                    "deny"
                  ],
                  "description": "allow or deny. A deny is a ceiling no member of the role can lift."
                }
              }
            },
            "description": "Every rule the role sets, in key order. A key it does not set follows its fallback (Get Capability Catalog)."
          }
        },
        "required": [
          "roleId",
          "capabilities"
        ]
      },
      "RoleSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the role."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role's name."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The role's description. Empty when nobody wrote one."
          },
          "isAdmin": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the role grants admin rights."
          },
          "isGlobal": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for roles MindCloud provides to every company. Global roles are read-only: writing one answers 404."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the role was created."
          },
          "memberCount": {
            "type": "integer",
            "description": "How many people in the company hold the role, people whose invite is pending included. A role with members cannot be deleted."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "isAdmin",
          "isGlobal",
          "createdOn",
          "memberCount"
        ]
      },
      "Run": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the run."
          },
          "workflowId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow this run belongs to."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the run stands or how it ended: waiting, running, finished, failed, cancelled, interrupted, limitExceeded, or cancelling."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow version that ran, or \"draft\"."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the run targeted."
          },
          "environmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That environment's name."
          },
          "startedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run started."
          },
          "finishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run finished. Empty while it is still going."
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ],
            "description": "How long the run took, in milliseconds."
          },
          "operations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many tasks the run used. This is the number that counts against your limit."
          },
          "errorCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many errors the run logged."
          },
          "warningCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many warnings the run logged."
          },
          "infoCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many info entries the run logged."
          },
          "endUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded end user the run belongs to, if any."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded installation the run belongs to, if any."
          },
          "triggerAppSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that triggered the run."
          }
        },
        "required": [
          "id",
          "workflowId",
          "status",
          "version",
          "environmentId",
          "environmentName",
          "startedOn",
          "finishedOn",
          "durationMs",
          "operations",
          "errorCount",
          "warningCount",
          "infoCount",
          "endUserId",
          "installationId",
          "triggerAppSlug"
        ]
      },
      "RunCancellation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The run that was asked to stop."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"cancelled\" when the run had not started and was cancelled at once; otherwise the run status when the cancellation was requested, and the run reports \"cancelled\" once it stops."
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "RunDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the run."
          },
          "workflowId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow this run belongs to."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the run stands or how it ended: waiting, running, finished, failed, cancelled, interrupted, limitExceeded, or cancelling."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow version that ran, or \"draft\"."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the run targeted."
          },
          "environmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "That environment's name."
          },
          "startedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run started."
          },
          "finishedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run finished. Empty while it is still going."
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ],
            "description": "How long the run took, in milliseconds."
          },
          "operations": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many tasks the run used. This is the number that counts against your limit."
          },
          "errorCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many errors the run logged."
          },
          "warningCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many warnings the run logged."
          },
          "infoCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many info entries the run logged."
          },
          "endUserId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded end user the run belongs to, if any."
          },
          "installationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The embedded installation the run belongs to, if any."
          },
          "triggerAppSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that triggered the run."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "A short summary of what the run did."
          },
          "activeStepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last step the run reached: while it runs, the step it is on now; once it ends, it still names the step it was on last, so read status, not this field, to tell whether it is running."
          },
          "activeMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reserved: always null on this route."
          }
        },
        "required": [
          "id",
          "workflowId",
          "status",
          "version",
          "environmentId",
          "environmentName",
          "startedOn",
          "finishedOn",
          "durationMs",
          "operations",
          "errorCount",
          "warningCount",
          "infoCount",
          "endUserId",
          "installationId",
          "triggerAppSlug",
          "summary",
          "activeStepId",
          "activeMessage"
        ]
      },
      "RunOperation": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the operation."
          },
          "workflowLogId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The run this operation happened in."
          },
          "stepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow step that performed it."
          },
          "stepInstanceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact step execution that performed it."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action that ran."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that action belongs to."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The kind of record that was touched."
          },
          "operation": {
            "type": [
              "string",
              "null"
            ],
            "description": "What happened to the record: create, update, and so on."
          },
          "actionStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it went, for example error."
          },
          "primaryKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The touched record's primary key in the target system."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the platform logged about it."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it happened."
          }
        },
        "required": [
          "id",
          "workflowLogId",
          "stepId",
          "stepInstanceId",
          "actionId",
          "appId",
          "model",
          "operation",
          "actionStatus",
          "primaryKey",
          "message",
          "createdOn"
        ]
      },
      "RunStep": {
        "type": "object",
        "properties": {
          "stepInstanceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of this step execution. Use it to fetch the step's payloads with Get a Run Step."
          },
          "stepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step in the workflow definition."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action the step ran."
          },
          "success": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the step succeeded."
          },
          "ran": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the step executed. An If/Else branch the run did not take shows only when the other branch of the same If/Else ran: its first step appears with ran false and success null. A branch with no steps shows the same way as a placeholder with stepId null and a stepInstanceId starting with \"stub-\", which has no payloads. When neither branch ran a step, neither shows."
          },
          "path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the step sits inside loops and branches."
          }
        },
        "required": [
          "stepInstanceId",
          "stepId",
          "actionId",
          "success",
          "ran",
          "path"
        ]
      },
      "RunStepDetail": {
        "type": "object",
        "properties": {
          "stepInstanceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of this step execution."
          },
          "stepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step in the workflow definition."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action the step ran."
          },
          "success": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the step succeeded."
          },
          "ran": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the step executed. False for the first step of an If/Else branch the run did not take, shown when the other branch of that If/Else ran; a branch with no steps is a placeholder whose stepId is null."
          },
          "request": {
            "description": "The exact data the step received. Its shape depends on the action. The connection it ran with appears as a reference, never its secrets: `connectionId` (for Get Connection; null when that connection no longer exists), `authenticationId`, `type` and `label`."
          },
          "response": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "success": {
                "type": "boolean",
                "description": "True when the step succeeded."
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Failed steps: what went wrong, for a person (also meta.message)."
              },
              "data": {
                "description": "The step's records: an array whose shape depends on the action and the provider."
              },
              "meta": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "action": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The action's id."
                      },
                      "slug": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The action's slug."
                      },
                      "operation": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "read, create, update or delete."
                      }
                    },
                    "description": "The action that ran, when the step runs one: its id, slug and operation, and the query, body and params it was called with."
                  },
                  "request": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "What the step sent, redacted: the connection it ran with is a reference (connectionId for Get Connection, null when that connection is gone; authenticationId, type, label), never its secrets."
                  },
                  "response": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "The provider's answer around the data, such as its status and headers, redacted."
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Failed steps: why, UPPER_SNAKE (API_RESPONSE_MAPPER_MISSING_PROPERTIES, ...)."
                  },
                  "message": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Failed steps: what went wrong, for a person."
                  },
                  "size": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Successful steps: the size of what the step returned, in MB."
                  },
                  "createdOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "When the app step answered."
                  },
                  "warnings": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What happened, UPPER_SNAKE."
                        }
                      }
                    },
                    "description": "Problems that did not fail the step, each { code }."
                  },
                  "paginationIgnored": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Set when the step's paging settings were not applied: actionPaginationInactive, the action does not page."
                  },
                  "drainStopReason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A step reading every page: why it stopped before the last one."
                  }
                },
                "description": "About the run of the step. The keys below are the runtime's; a step type or an app's response mapper may add others."
              }
            },
            "description": "The exact data the step returned: { success, message, data, meta }. data depends on the action and the provider."
          }
        },
        "required": [
          "stepInstanceId",
          "stepId",
          "actionId",
          "success",
          "ran",
          "request",
          "response"
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique id of the team."
          },
          "name": {
            "type": "string",
            "description": "The team's name, unique in the company (ignoring case)."
          },
          "memberUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The userIds of the people on the team (List Members), earliest added first."
          },
          "memberCount": {
            "type": "integer",
            "description": "How many people are on the team."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The userId of the member who created the team. Null when it is unknown."
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the team was created."
          },
          "updatedOn": {
            "type": "string",
            "format": "date-time",
            "description": "When the team was last renamed, or created."
          }
        },
        "required": [
          "id",
          "name",
          "memberUserIds",
          "memberCount",
          "createdBy",
          "createdOn",
          "updatedOn"
        ]
      },
      "UniversalAction": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the action."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app slug used in Universal API routes."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The resolved published app version."
          },
          "actionSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action slug used in Universal API routes."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action's display name."
          },
          "kind": {
            "type": "string",
            "enum": [
              "action",
              "trigger"
            ],
            "description": "trigger for an action that starts a workflow (add it as a trigger); action for one a step runs."
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider method selected by the action definition."
          },
          "operation": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action operation, such as read or create."
          },
          "supports": {
            "type": [
              "object",
              "null"
            ],
            "description": "The response controls supported by this action."
          },
          "queryCapabilities": {
            "type": [
              "object",
              "null"
            ],
            "description": "Limits and paging capabilities for this action."
          },
          "requiredArguments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Arguments the action requires."
          },
          "optionalArguments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Arguments the action accepts but does not require, with includeArguments=all."
          },
          "responseFields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Field keys the action can return."
          },
          "slugConflict": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when more than one action resolves to this slug."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that provides this action. verbosity=full only."
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's display name. verbosity=full only."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the action does. verbosity=full only."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider model this action uses. verbosity=full only."
          },
          "controls": {
            "type": [
              "object",
              "null"
            ],
            "description": "Response controls and their defaults. verbosity=full only."
          },
          "responseSchema": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Definitions for fields the action can return. verbosity=full only."
          },
          "isSchemaDynamic": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when the provider determines the response schema at run time. verbosity=full only."
          },
          "capabilityKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Cirra capability key that governs running this action: apps.<app>.<model>.<operation> (Get Capability Catalog). Null when the action declares no operation Cirra can govern, so Cirra does not run it."
          },
          "actionCapabilityKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The key of a rule for this action alone: apps.<app>.actions.<actionSlug>. It decides before capabilityKey, except that a role's deny always wins."
          }
        },
        "required": [
          "id",
          "appSlug",
          "appVersion",
          "actionSlug",
          "name",
          "kind",
          "operation",
          "capabilityKey",
          "actionCapabilityKey"
        ]
      },
      "UniversalActionDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the action."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that provides this action."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app slug used in Universal API routes."
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's display name."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The resolved published app version."
          },
          "actionSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action slug used in Universal API routes."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action's display name."
          },
          "kind": {
            "type": "string",
            "enum": [
              "action",
              "trigger"
            ],
            "description": "trigger for an action that starts a workflow (add it as a trigger); action for one a step runs."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the action does."
          },
          "method": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider method selected by the action definition."
          },
          "operation": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action operation, such as read or create."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The provider model this action uses."
          },
          "supports": {
            "type": [
              "object",
              "null"
            ],
            "description": "The response controls supported by this action."
          },
          "queryCapabilities": {
            "type": [
              "object",
              "null"
            ],
            "description": "Limits and paging capabilities for this action."
          },
          "requiredArguments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Arguments the action requires."
          },
          "optionalArguments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Arguments the action accepts but does not require."
          },
          "responseFields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Field keys the action can return."
          },
          "responseSchema": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            },
            "description": "Definitions for fields the action can return."
          },
          "controls": {
            "type": [
              "object",
              "null"
            ],
            "description": "Response controls and their defaults."
          },
          "isSchemaDynamic": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when the provider determines the response schema at run time."
          }
        },
        "required": [
          "id",
          "appSlug",
          "appVersion",
          "actionSlug",
          "name",
          "kind",
          "operation"
        ]
      },
      "UniversalActionResult": {
        "description": "The provider's response for the action, shaped by its published definition and the fields, limit, offset, sort, and where controls. meta carries the provider's paging cursor (for information: page with limit and offset, the cursor cannot be sent back), pagination, output, action, and message when it sends them."
      },
      "UniversalApp": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the app."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's display name."
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app slug used in Universal API routes."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's icon URL."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's category."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's integration type."
          },
          "aliases": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Other names that can find this app."
          },
          "publishedVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app's current published version."
          },
          "actionsTotal": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many published actions this app provides."
          },
          "actionSlugsPreview": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "A preview of action slugs available for this app."
          },
          "kind": {
            "type": "string",
            "enum": [
              "app",
              "builtin"
            ],
            "description": "app for an app with provider actions; builtin for a step type the workflow engine runs itself (includeBuiltins=true)."
          },
          "usableAsStep": {
            "type": "boolean",
            "description": "Whether a workflow can add this app as a step."
          },
          "usableAsTrigger": {
            "type": "boolean",
            "description": "Whether this app can start a workflow: an app with trigger actions, or the Schedule, Webhook and When called (runWorkflow) built-ins."
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "icon",
          "category",
          "type",
          "aliases",
          "publishedVersion",
          "actionsTotal",
          "actionSlugsPreview",
          "kind",
          "usableAsStep",
          "usableAsTrigger"
        ]
      },
      "UniversalLookup": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "resolved",
              "ambiguous",
              "notFound"
            ],
            "description": "Whether the lookup resolved or needs more input: resolved, ambiguous, or notFound."
          },
          "reasonCode": {
            "type": "string",
            "description": "A stable reason code: EXACT_MATCH, STRONG_MATCH, MULTIPLE_HIGH_CONFIDENCE_CANDIDATES, INSUFFICIENT_CONFIDENCE, or NO_CANDIDATES."
          },
          "selected": {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The canonical value to pass as the argument."
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the option is called."
              }
            },
            "description": "The selected lookup option, when one exact match exists."
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The canonical value to pass as the argument."
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "What the option is called."
                }
              }
            },
            "description": "Matching options the caller can choose from."
          },
          "source": {
            "type": "string",
            "enum": [
              "fixedOptions",
              "lookupAction"
            ],
            "description": "Where the choices came from: fixedOptions (the argument's own list) or lookupAction (a provider read)."
          },
          "lookup": {
            "type": "object",
            "properties": {
              "labelKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The source field shown as the option label."
              },
              "valueKey": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The source field passed as the argument value."
              },
              "actionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The action that lists the options, or null for fixed options."
              }
            },
            "description": "The lookup definition for this argument."
          },
          "paging": {
            "type": "object",
            "properties": {
              "limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The limit the source was asked for."
              },
              "offset": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The offset the source was asked for."
              },
              "fetchedCandidatesCount": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many options the source answered."
              }
            },
            "description": "Offset paging details for the candidates."
          },
          "hints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "NO_CANDIDATES, or the reasonCode that needs a choice."
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "What to do next."
                }
              }
            },
            "description": "Instructions for the caller when more input is needed."
          }
        },
        "required": [
          "status",
          "reasonCode",
          "source",
          "lookup",
          "paging",
          "hints"
        ]
      },
      "UsageSummary": {
        "type": "object",
        "properties": {
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "description": "First day of the current period."
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last day of the current period."
          },
          "usedTasks": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Tasks used so far this period."
          },
          "taskLimit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Your task limit for the period."
          },
          "softLimitEnabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when passing the limit warns instead of blocking."
          }
        },
        "required": [
          "periodStart",
          "periodEnd",
          "usedTasks",
          "taskLimit",
          "softLimitEnabled"
        ]
      },
      "Workflow": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the workflow."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name your team gave the workflow."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's type."
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True while the workflow is enabled and able to run."
          },
          "isTemplate": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if this is a template rather than a live workflow."
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's runner size: xs, sm, md, lg, xl, or xxl. Empty when sized automatically."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Ids of the tags on the workflow. The tag catalog is managed in the app."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the workflow was created."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who created it."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          },
          "updatedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who last changed it."
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "isActive",
          "isTemplate",
          "size",
          "tags",
          "createdOn",
          "createdBy",
          "updatedOn",
          "updatedBy"
        ]
      },
      "WorkflowDailyActivity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A stable key for this row: one workflow on one day. Do not parse it; read workflowId and date."
          },
          "date": {
            "type": "string",
            "description": "The UTC day the runs started (YYYY-MM-DD). A run counts on the day it started, even when it finished the next day."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow, from List Workflows."
          },
          "workflowName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's current name."
          },
          "runs": {
            "type": "integer",
            "description": "Runs of the workflow that started that day: every run, including ones that failed or were cancelled."
          },
          "failedRuns": {
            "type": "integer",
            "description": "How many of those runs failed. For runs from about the last 30 days, List Failed Runs returns each one with the step it stopped at."
          },
          "tasks": {
            "type": "integer",
            "description": "Tasks those runs used, by the rule Get Workflow Usage bills with: runs MindCloud manages for you and runs stopped by the task limit are left out. A day can differ from Get Workflow Usage until meta.completeThrough passes it."
          },
          "recordsCreated": {
            "type": "integer",
            "description": "Records those runs logged as created in the apps the workflow writes to."
          },
          "recordsUpdated": {
            "type": "integer",
            "description": "Records those runs logged as updated."
          },
          "recordsDeleted": {
            "type": "integer",
            "description": "Records those runs logged as deleted. Counted from late November 2026; earlier days show 0."
          },
          "recordsRead": {
            "type": "integer",
            "description": "Records those runs logged as read. Most steps that read data do not log each record, so this is often 0."
          }
        },
        "required": [
          "id",
          "date",
          "workflowId",
          "workflowName",
          "runs",
          "failedRuns",
          "tasks",
          "recordsCreated",
          "recordsUpdated",
          "recordsDeleted",
          "recordsRead"
        ]
      },
      "WorkflowDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The workflow's id."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's name."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "workflow, or function for a workflow other workflows call."
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the published version runs on its triggers."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the workflow runs in. Null for the default environment."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the tags on the workflow."
          },
          "version": {
            "type": "string",
            "description": "The version this answer describes: draft, or the saved version label."
          },
          "publishedVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version that runs. Null when the workflow was never published."
          },
          "changesSincePublish": {
            "type": "integer",
            "description": "How many draft edits are not published yet."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value. Null when reading a saved version, which never changes."
          },
          "triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The trigger's id."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The trigger's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app event the trigger listens for. Null for a built-in trigger."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the trigger is turned off."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
                }
              }
            },
            "description": "What starts the workflow. A workflow can have several."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The step's id. Stable across edits; never positional."
                },
                "number": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app action the step runs. Null for a built-in step type."
                },
                "functionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The function this step calls, for a function call step."
                },
                "parentStepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
                },
                "slot": {
                  "type": "string",
                  "enum": [
                    "steps",
                    "body",
                    "then",
                    "else"
                  ],
                  "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
                },
                "depth": {
                  "type": "integer",
                  "description": "How deeply the step is nested. 0 at the top level."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the step is turned off and runs skip it."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
                },
                "body": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "then": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "else": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                }
              }
            },
            "description": "The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else)."
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "isActive",
          "environmentId",
          "tags",
          "version",
          "publishedVersion",
          "changesSincePublish",
          "revision",
          "triggers",
          "steps"
        ]
      },
      "WorkflowDefinitionValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when Set Workflow Definition would accept this body as it is now."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "The revision of the draft it was checked against."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error blocks publishing; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (SCHEDULE_INCOMPLETE, STEP_NOT_CONFIGURED, MISSING_GRAPH_REFERENCE, ...)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                },
                "stepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step or trigger it is about. Null for the workflow as a whole."
                },
                "path": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Where that step sits in Get Workflow Definition, as a JSON Pointer (/steps/1/body/0). Null for the workflow as a whole."
                }
              }
            },
            "description": "Valid: Validate Workflow's check of the draft as it would be written (path points into definition). Not valid: every problem with the body (path points into the body)."
          },
          "refs": {
            "type": "object",
            "description": "The id each new step and trigger got in this check, by its ref. These ids are not kept: Set Workflow Definition gives new ones."
          },
          "inputKeys": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mapStepId": {
                  "type": "string",
                  "description": "The Map step."
                },
                "stepId": {
                  "type": "string",
                  "description": "The new step it reads."
                },
                "ref": {
                  "type": "string",
                  "description": "The new step's ref in the body."
                },
                "key": {
                  "type": "string",
                  "description": "The name the Map step's code reads it by: input['<key>']."
                }
              }
            },
            "description": "For each step this check created that a Map step reads: the name its code would read it by, input['<key>'], as in Set Workflow Definition's answer. It ends in the last four characters of the step's id, in capitals, so the key from this check is not the one the real write gives; use Set Workflow Definition's inputKeys."
          },
          "definition": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The workflow's id."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The workflow's name."
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "workflow, or function for a workflow other workflows call."
              },
              "isActive": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the published version runs on its triggers."
              },
              "environmentId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The environment the workflow runs in. Null for the default environment."
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Ids of the tags on the workflow."
              },
              "version": {
                "type": "string",
                "description": "The version this answer describes: draft, or the saved version label."
              },
              "publishedVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The version that runs. Null when the workflow was never published."
              },
              "changesSincePublish": {
                "type": "integer",
                "description": "How many draft edits are not published yet."
              },
              "revision": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value. Null when reading a saved version, which never changes."
              },
              "triggers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The trigger's id."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The trigger's display name."
                    },
                    "appSlug": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
                    },
                    "appVersion": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
                    },
                    "actionId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app event the trigger listens for. Null for a built-in trigger."
                    },
                    "isDisabled": {
                      "type": "boolean",
                      "description": "True when the trigger is turned off."
                    },
                    "isConfigured": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
                    }
                  }
                },
                "description": "What starts the workflow. A workflow can have several."
              },
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The step's id. Stable across edits; never positional."
                    },
                    "number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The step's display name."
                    },
                    "appSlug": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
                    },
                    "appVersion": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
                    },
                    "actionId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app action the step runs. Null for a built-in step type."
                    },
                    "functionId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The function this step calls, for a function call step."
                    },
                    "parentStepId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "steps",
                        "body",
                        "then",
                        "else"
                      ],
                      "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
                    },
                    "depth": {
                      "type": "integer",
                      "description": "How deeply the step is nested. 0 at the top level."
                    },
                    "isDisabled": {
                      "type": "boolean",
                      "description": "True when the step is turned off and runs skip it."
                    },
                    "isConfigured": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
                    },
                    "body": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      },
                      "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                    },
                    "then": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      },
                      "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                    },
                    "else": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object"
                      },
                      "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                    }
                  }
                },
                "description": "The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else)."
              }
            },
            "description": "The definition as Set Workflow Definition would write it, as Get Workflow Definition answers it. Null when not valid."
          }
        },
        "required": [
          "valid",
          "revision",
          "issues",
          "refs",
          "inputKeys",
          "definition"
        ]
      },
      "WorkflowDefinitionWrite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The workflow's id."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's name."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "workflow, or function for a workflow other workflows call."
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the published version runs on its triggers."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the workflow runs in. Null for the default environment."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the tags on the workflow."
          },
          "version": {
            "type": "string",
            "description": "The version this answer describes: draft, or the saved version label."
          },
          "publishedVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version that runs. Null when the workflow was never published."
          },
          "changesSincePublish": {
            "type": "integer",
            "description": "How many draft edits are not published yet."
          },
          "revision": {
            "type": [
              "string",
              "null"
            ],
            "description": "The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value. Null when reading a saved version, which never changes."
          },
          "triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The trigger's id."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The trigger's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app event the trigger listens for. Null for a built-in trigger."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the trigger is turned off."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
                }
              }
            },
            "description": "What starts the workflow. A workflow can have several."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The step's id. Stable across edits; never positional."
                },
                "number": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app action the step runs. Null for a built-in step type."
                },
                "functionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The function this step calls, for a function call step."
                },
                "parentStepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
                },
                "slot": {
                  "type": "string",
                  "enum": [
                    "steps",
                    "body",
                    "then",
                    "else"
                  ],
                  "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
                },
                "depth": {
                  "type": "integer",
                  "description": "How deeply the step is nested. 0 at the top level."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the step is turned off and runs skip it."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
                },
                "body": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "then": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "else": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                }
              }
            },
            "description": "The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else)."
          },
          "refs": {
            "type": "object",
            "description": "The id each new step and trigger got, by its ref."
          },
          "inputKeys": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "mapStepId": {
                  "type": "string",
                  "description": "The Map step."
                },
                "stepId": {
                  "type": "string",
                  "description": "The new step it reads."
                },
                "ref": {
                  "type": "string",
                  "description": "The new step's ref in the body."
                },
                "key": {
                  "type": "string",
                  "description": "The name the Map step's code reads it by: input['<key>']."
                }
              }
            },
            "description": "For each step this call created that a Map step reads: the name its code reads it by, input['<key>']. It ends in the last four characters of the new step's id, in capitals, so Map code that reads a step created in the same call is set in a follow-up Update Workflow Step Configuration with this key."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error blocks publishing; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (SCHEDULE_INCOMPLETE, STEP_NOT_CONFIGURED, MISSING_GRAPH_REFERENCE, ...)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                },
                "stepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step or trigger it is about. Null for the workflow as a whole."
                },
                "path": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Where that step sits in Get Workflow Definition, as a JSON Pointer (/steps/1/body/0). Null for the workflow as a whole."
                }
              }
            },
            "description": "Validate Workflow's check of the draft as written: what still stops publishing, and what is not set up yet. path points into this answer."
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "isActive",
          "environmentId",
          "tags",
          "version",
          "publishedVersion",
          "changesSincePublish",
          "revision",
          "triggers",
          "steps",
          "refs",
          "inputKeys",
          "issues"
        ]
      },
      "WorkflowDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the workflow."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name your team gave the workflow."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's type."
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True while the workflow is enabled and able to run."
          },
          "isTemplate": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if this is a template rather than a live workflow."
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's runner size: xs, sm, md, lg, xl, or xxl. Empty when sized automatically."
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Ids of the tags on the workflow. The tag catalog is managed in the app."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the workflow was created."
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who created it."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was last changed."
          },
          "updatedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Who last changed it."
          },
          "workflow": {
            "description": "The full workflow definition your team built. Its shape depends on the workflow."
          },
          "summary": {
            "description": "The workflow's generated summary. Its shape depends on the workflow."
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "isActive",
          "isTemplate",
          "size",
          "tags",
          "createdOn",
          "createdBy",
          "updatedOn",
          "updatedBy",
          "workflow",
          "summary"
        ]
      },
      "WorkflowHourlyActivity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A stable key for this row: one workflow in one hour. Do not parse it; read workflowId and hour."
          },
          "hour": {
            "type": "string",
            "format": "date-time",
            "description": "The UTC hour the runs started, as the start of that hour. A run counts in the hour it started, even when it finished later."
          },
          "date": {
            "type": "string",
            "description": "The UTC day of that hour (YYYY-MM-DD), as List Workflow Activity names days."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow, from List Workflows."
          },
          "workflowName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow's current name."
          },
          "runs": {
            "type": "integer",
            "description": "Runs of the workflow that started that hour: every run, including ones that failed, were cancelled, or are still going."
          },
          "failedRuns": {
            "type": "integer",
            "description": "How many of those runs failed. For runs from about the last 30 days, List Failed Runs returns each one with the step it stopped at."
          },
          "tasks": {
            "type": "integer",
            "description": "Tasks those runs used, by the rule Get Workflow Usage bills with: runs MindCloud manages for you and runs stopped by the task limit are left out. A run still going counts the tasks it used so far."
          },
          "recordsCreated": {
            "type": "integer",
            "description": "Records those runs logged as created in the apps the workflow writes to."
          },
          "recordsUpdated": {
            "type": "integer",
            "description": "Records those runs logged as updated."
          },
          "recordsDeleted": {
            "type": "integer",
            "description": "Records those runs logged as deleted. Counted from late November 2026; earlier hours show 0."
          },
          "recordsRead": {
            "type": "integer",
            "description": "Records those runs logged as read. Most steps that read data do not log each record, so this is often 0."
          }
        },
        "required": [
          "id",
          "hour",
          "date",
          "workflowId",
          "workflowName",
          "runs",
          "failedRuns",
          "tasks",
          "recordsCreated",
          "recordsUpdated",
          "recordsDeleted",
          "recordsRead"
        ]
      },
      "WorkflowInputs": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "function",
              "workflow"
            ],
            "description": "function: a function's inputs, part of its draft (send its revision in If-Match to change them), and its workflow variables; workflow: the workflow's variables, with their value in each environment."
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The name a step reads it by: {{ function.inputs.<key> }} or {{ workflow.inputs.<key> }}. Made from the label when left out, as the editor makes it; an array variable's ends in \"[]\". Absent only on an input kept as stored ({ $legacy, ref })."
                },
                "label": {
                  "type": "string",
                  "description": "The name the editor shows."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "boolean",
                    "date",
                    "list",
                    "array",
                    "object",
                    "file"
                  ],
                  "description": "The data type: string, number, boolean, date, list (one of its choices), array, object, or file. Left out on a write: string."
                },
                "description": {
                  "type": "string",
                  "description": "Function inputs: what the input is for."
                },
                "testValue": {
                  "description": "Function inputs: the value a run from the editor uses, as a step argument of the same type takes it (a template may use system, memory, workflow.inputs and integration.metadata)."
                },
                "required": {
                  "type": "boolean",
                  "description": "Workflow variables (not boolean): every environment whose values change needs a value."
                },
                "errorMessage": {
                  "type": "string",
                  "description": "Workflow variables: the message shown when a value is refused."
                },
                "placeholder": {
                  "type": "string",
                  "description": "Workflow variables (not boolean): the hint in an empty field."
                },
                "sensitive": {
                  "type": "boolean",
                  "description": "Workflow string variables: masked in the editor; its values read as { $sensitive, ref } and are kept when sent back so."
                },
                "minLength": {
                  "type": "integer",
                  "description": "Workflow string variables: the shortest value."
                },
                "maxLength": {
                  "type": "integer",
                  "description": "Workflow string variables: the longest value."
                },
                "pattern": {
                  "type": "string",
                  "description": "Workflow string variables: a regular expression a value must match."
                },
                "numberType": {
                  "type": "string",
                  "enum": [
                    "integer",
                    "decimal"
                  ],
                  "description": "Workflow number variables: integer or decimal (the default)."
                },
                "min": {
                  "type": "number",
                  "description": "Workflow number variables: the smallest value."
                },
                "max": {
                  "type": "number",
                  "description": "Workflow number variables: the largest value."
                },
                "itemType": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "boolean",
                    "date"
                  ],
                  "description": "Workflow list variables: the type of the choice values, string, number, boolean or date."
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "description": "The value a run gets, typed as itemType."
                      },
                      "label": {
                        "type": "string",
                        "description": "What the editor shows."
                      }
                    }
                  },
                  "description": "Workflow list variables: the choices, in order. An app lookup list reads as { $legacy, ref }."
                },
                "values": {
                  "description": "Workflow variables outside Embedded workflows: the value in each environment, by environment id (List Environments). A run in an environment gets its value."
                }
              }
            },
            "description": "Every input, in order."
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The name a step reads it by: {{ function.inputs.<key> }} or {{ workflow.inputs.<key> }}. Made from the label when left out, as the editor makes it; an array variable's ends in \"[]\". Absent only on an input kept as stored ({ $legacy, ref })."
                },
                "label": {
                  "type": "string",
                  "description": "The name the editor shows."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "boolean",
                    "date",
                    "list",
                    "array",
                    "object",
                    "file"
                  ],
                  "description": "The data type: string, number, boolean, date, list (one of its choices), array, object, or file. Left out on a write: string."
                },
                "description": {
                  "type": "string",
                  "description": "Function inputs: what the input is for."
                },
                "testValue": {
                  "description": "Function inputs: the value a run from the editor uses, as a step argument of the same type takes it (a template may use system, memory, workflow.inputs and integration.metadata)."
                },
                "required": {
                  "type": "boolean",
                  "description": "Workflow variables (not boolean): every environment whose values change needs a value."
                },
                "errorMessage": {
                  "type": "string",
                  "description": "Workflow variables: the message shown when a value is refused."
                },
                "placeholder": {
                  "type": "string",
                  "description": "Workflow variables (not boolean): the hint in an empty field."
                },
                "sensitive": {
                  "type": "boolean",
                  "description": "Workflow string variables: masked in the editor; its values read as { $sensitive, ref } and are kept when sent back so."
                },
                "minLength": {
                  "type": "integer",
                  "description": "Workflow string variables: the shortest value."
                },
                "maxLength": {
                  "type": "integer",
                  "description": "Workflow string variables: the longest value."
                },
                "pattern": {
                  "type": "string",
                  "description": "Workflow string variables: a regular expression a value must match."
                },
                "numberType": {
                  "type": "string",
                  "enum": [
                    "integer",
                    "decimal"
                  ],
                  "description": "Workflow number variables: integer or decimal (the default)."
                },
                "min": {
                  "type": "number",
                  "description": "Workflow number variables: the smallest value."
                },
                "max": {
                  "type": "number",
                  "description": "Workflow number variables: the largest value."
                },
                "itemType": {
                  "type": "string",
                  "enum": [
                    "string",
                    "number",
                    "boolean",
                    "date"
                  ],
                  "description": "Workflow list variables: the type of the choice values, string, number, boolean or date."
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "description": "The value a run gets, typed as itemType."
                      },
                      "label": {
                        "type": "string",
                        "description": "What the editor shows."
                      }
                    }
                  },
                  "description": "Workflow list variables: the choices, in order. An app lookup list reads as { $legacy, ref }."
                },
                "values": {
                  "description": "Workflow variables outside Embedded workflows: the value in each environment, by environment id (List Environments). A run in an environment gets its value."
                }
              }
            },
            "description": "Functions only: the function's workflow variables, in order, in the shape a workflow's inputs have (values per environment included); steps read them as {{ workflow.inputs.<key> }}. Live at once when changed, with no If-Match."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error refuses a write; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (LEGACY_VALUE_PRESERVED, LEGACY_LABEL, DUPLICATE_KEY, ...)."
                },
                "path": {
                  "type": "string",
                  "description": "Where, as a JSON Pointer into the answer (/inputs/2/values/Ev4kR8mTq2Lx); empty for the whole list."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                }
              }
            },
            "description": "Warnings about what is stored: values kept as stored, labels the editor no longer reads, duplicate keys."
          },
          "revision": {
            "type": "string",
            "description": "Functions only: the draft's revision. Send it in If-Match on your next change to the draft."
          }
        },
        "required": [
          "type",
          "inputs",
          "issues"
        ]
      },
      "WorkflowOperation": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique id of the operation."
          },
          "workflowLogId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The run this operation happened in."
          },
          "stepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow step that performed it."
          },
          "stepInstanceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact step execution that performed it."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The action that ran."
          },
          "appId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app that action belongs to."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "The kind of record that was touched."
          },
          "operation": {
            "type": [
              "string",
              "null"
            ],
            "description": "What happened to the record: create, update, and so on."
          },
          "actionStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it went, for example error."
          },
          "primaryKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The touched record's primary key in the target system."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the platform logged about it."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it happened."
          },
          "workflowId": {
            "type": "string",
            "description": "The workflow this operation belongs to, from List Workflows."
          },
          "runId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The run this operation happened in, also returned as workflowLogId. Use Get Run for its details."
          },
          "runStartedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the run started. Null if its run history is no longer retained."
          },
          "runStatus": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "waiting",
              "running",
              "finished",
              "failed",
              "cancelled",
              "interrupted",
              "limitExceeded",
              "cancelling",
              "unknown",
              null
            ],
            "description": "The run status: waiting, running, finished, failed, cancelled, interrupted, limitExceeded, cancelling, or unknown. Null if its run history is no longer retained."
          },
          "environmentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The environment the run targeted, from List Environments. Null if its run history is no longer retained or it has no environment."
          },
          "environmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The current name of the environment the run targeted. Null if the environment or run history is unavailable."
          }
        },
        "required": [
          "id",
          "workflowLogId",
          "stepId",
          "stepInstanceId",
          "actionId",
          "appId",
          "model",
          "operation",
          "actionStatus",
          "primaryKey",
          "message",
          "createdOn",
          "workflowId",
          "runId",
          "runStartedOn",
          "runStatus",
          "environmentId",
          "environmentName"
        ]
      },
      "WorkflowStep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The step's id. Stable across edits; never positional."
          },
          "number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step's display name."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app action the step runs. Null for a built-in step type."
          },
          "functionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The function this step calls, for a function call step."
          },
          "parentStepId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
          },
          "slot": {
            "type": "string",
            "enum": [
              "steps",
              "body",
              "then",
              "else"
            ],
            "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
          },
          "depth": {
            "type": "integer",
            "description": "How deeply the step is nested. 0 at the top level."
          },
          "isDisabled": {
            "type": "boolean",
            "description": "True when the step is turned off and runs skip it."
          },
          "isConfigured": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
          }
        },
        "required": [
          "id",
          "number",
          "name",
          "appSlug",
          "appVersion",
          "actionId",
          "functionId",
          "parentStepId",
          "slot",
          "depth",
          "isDisabled",
          "isConfigured"
        ]
      },
      "WorkflowStepConfiguration": {
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The action's arguments, nested as the action's schema nests them. A string may hold {{ ... }} references to earlier steps' output."
          },
          "options": {
            "description": "Step options: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. An option present is on; one left out is off."
          },
          "connection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "connection",
                  "environment",
                  "installation"
                ],
                "description": "connection: a chosen connection; environment: the workflow's connection for the run's environment; installation: each installation's own (integration workflows)."
              },
              "connectionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The connection's id, from List Connections. Null with rules and no default."
              },
              "rules": {
                "description": "Conditions that pick another connection, first match wins: a list of { when: { field, operator, value }, connectionId }, or { $legacy } when kept as stored."
              }
            },
            "description": "The connection the step runs with. Null when none is set or the app takes none."
          },
          "isConfigured": {
            "type": "boolean",
            "description": "Whether the editor considers the step set up (nothing required is missing). A draft may be saved incomplete."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error refuses a write; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (REQUIRED_MISSING, LEGACY_VALUE_PRESERVED, INVALID_REFERENCE, ...)."
                },
                "path": {
                  "type": "string",
                  "description": "Where, as a JSON Pointer into the configuration (/arguments/contact/FirstName)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                }
              }
            },
            "description": "Warnings about the stored configuration: required values missing, values kept as stored, connections that are gone."
          },
          "revision": {
            "type": "string",
            "description": "The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value."
          }
        },
        "required": [
          "arguments",
          "options",
          "connection",
          "isConfigured",
          "issues",
          "revision"
        ]
      },
      "WorkflowStepConfigurationValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when Update would accept the change."
          },
          "configuration": {
            "type": "object",
            "properties": {
              "arguments": {
                "description": "The action's arguments, nested as the action's schema nests them. A string may hold {{ ... }} references to earlier steps' output."
              },
              "options": {
                "description": "Step options: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. An option present is on; one left out is off."
              },
              "connection": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "connection",
                      "environment",
                      "installation"
                    ],
                    "description": "connection: a chosen connection; environment: the workflow's connection for the run's environment; installation: each installation's own (integration workflows)."
                  },
                  "connectionId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The connection's id, from List Connections. Null with rules and no default."
                  },
                  "rules": {
                    "description": "Conditions that pick another connection, first match wins: a list of { when: { field, operator, value }, connectionId }, or { $legacy } when kept as stored."
                  }
                },
                "description": "The connection the step runs with. Null when none is set or the app takes none."
              }
            },
            "description": "The configuration the change would leave, before it is saved."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error refuses a write; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (REQUIRED_MISSING, LEGACY_VALUE_PRESERVED, INVALID_REFERENCE, ...)."
                },
                "path": {
                  "type": "string",
                  "description": "Where, as a JSON Pointer into the configuration (/arguments/contact/FirstName)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                }
              }
            },
            "description": "Warnings about the stored configuration: required values missing, values kept as stored, connections that are gone."
          },
          "revision": {
            "type": "string",
            "description": "The revision of the draft that was checked."
          }
        },
        "required": [
          "valid",
          "configuration",
          "issues",
          "revision"
        ]
      },
      "WorkflowStepLookup": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "listed",
              "resolved",
              "ambiguous",
              "notFound"
            ],
            "description": "listed (every choice, in pages), resolved (q matched one), ambiguous (q matched several), or notFound."
          },
          "reasonCode": {
            "type": "string",
            "description": "NO_QUERY, EXACT_MATCH, STRONG_MATCH, MULTIPLE_HIGH_CONFIDENCE_CANDIDATES, INSUFFICIENT_CONFIDENCE, or NO_CANDIDATES."
          },
          "selected": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "description": "The value to set."
              },
              "label": {
                "type": "string",
                "description": "What the choice is called."
              }
            },
            "description": "The choice q matched, when resolved."
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "The value to set."
                },
                "label": {
                  "type": "string",
                  "description": "What the choice is called."
                }
              }
            },
            "description": "The choices: a page of them when listed, the best matches when ambiguous."
          },
          "source": {
            "type": "string",
            "enum": [
              "fixedOptions",
              "list",
              "lookupAction"
            ],
            "description": "Where the choices came from: fixedOptions (the app's own list), list (countries, currencies or time zones), or lookupAction (a read from the app with the step's connection)."
          },
          "paging": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Choices per page."
              },
              "offset": {
                "type": "integer",
                "description": "Choices skipped."
              },
              "total": {
                "type": "integer",
                "description": "How many choices there are."
              }
            },
            "description": "The page of a listing."
          },
          "hints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "The reason code."
                },
                "message": {
                  "type": "string",
                  "description": "What to do."
                }
              }
            },
            "description": "What to do next when q did not settle on one choice."
          }
        },
        "required": [
          "status",
          "reasonCode",
          "source",
          "paging",
          "hints"
        ]
      },
      "WorkflowStepOrder": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The step's id. Stable across edits; never positional."
                },
                "number": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "The number the editor shows for this step, in execution order. Null for a folder, which the editor does not number."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step's display name."
                },
                "appSlug": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app the step runs, or the built-in step type (iterate, ifElse, map, ...)."
                },
                "appVersion": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app version the step is pinned to. For a built-in step (If, Loop, Map, ...), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the step does."
                },
                "actionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The app action the step runs. Null for a built-in step type."
                },
                "functionId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The function this step calls, for a function call step."
                },
                "parentStepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step this one sits inside (a loop, group, folder or if/else). Null at the top level."
                },
                "slot": {
                  "type": "string",
                  "enum": [
                    "steps",
                    "body",
                    "then",
                    "else"
                  ],
                  "description": "Where the step sits in its parent: steps (the top level), body (a loop, group or folder), then or else (an if/else lane)."
                },
                "depth": {
                  "type": "integer",
                  "description": "How deeply the step is nested. 0 at the top level."
                },
                "isDisabled": {
                  "type": "boolean",
                  "description": "True when the step is turned off and runs skip it."
                },
                "isConfigured": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the step passed the editor's validation (required values set, connection chosen). Null when it was never validated."
                },
                "body": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "then": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                },
                "else": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object"
                  },
                  "description": "Steps nested inside this one, in order. Present when it has any; each has the same keys."
                }
              }
            },
            "description": "The steps, top level first, in execution order. A step that holds others carries them in body (a loop, folder or batch step) or then and else (an If/Else)."
          }
        },
        "required": [
          "steps"
        ]
      },
      "WorkflowStepOutput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "none"
            ],
            "description": "succeeded or failed: how the run that saved the sample ended (a sample set by hand counts as succeeded). none: the step has no sample yet."
          },
          "output": {
            "description": "The first records of the output (a JSON array as the step answered it), capped at 200 records and about 60 KB. Empty when there is no sample."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many records the output had in all. Null when there is no sample."
          },
          "truncated": {
            "type": "boolean",
            "description": "True when output holds fewer records than total: the rest were left out of the sample, not lost. Later steps still learn their fields from the records kept."
          },
          "truncatedBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "records",
              "size",
              null
            ],
            "description": "Why output stopped short of total. Null unless truncated is true."
          },
          "outputFields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The field's path in each record: dotted, with [] marking an array (lines[].sku). Reference it as {{ steps.<stepId>.output[0].<key> }}."
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Its type as seen in the sample: string, number, boolean, object, date, a type with [] for an array, or mixed."
                }
              }
            },
            "description": "The fields of the output records, learned from the sample and offered to later steps."
          },
          "error": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The runtime's error code (ARGUMENTS_MISSING, 401_UNAUTHORIZED, DEFAULT, ...)."
              },
              "message": {
                "type": "string",
                "description": "What the code means, for a person. What the app answered, if anything, is in output."
              },
              "status": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The HTTP status the app answered, when it answered one."
              }
            },
            "description": "Why the run failed. Null unless status is failed."
          },
          "savedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the sample was saved. Null when there is none."
          },
          "revision": {
            "type": "string",
            "description": "The draft's revision after the sample was saved (a sample is part of the step): send it in If-Match on your next change to the draft."
          }
        },
        "required": [
          "status",
          "output",
          "total",
          "truncated",
          "truncatedBy",
          "outputFields",
          "error",
          "savedOn",
          "revision"
        ]
      },
      "WorkflowStepSchema": {
        "type": "object",
        "properties": {
          "app": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "description": "The app's slug."
              },
              "version": {
                "type": "string",
                "description": "The app version the step uses."
              }
            },
            "description": "The step's app and the version it uses."
          },
          "action": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The action's id."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The action's name."
              },
              "operation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "read, create, update, delete, or null."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "action",
                  "trigger"
                ],
                "description": "action or trigger."
              }
            },
            "description": "The action the step runs."
          },
          "arguments": {
            "description": "The arguments, as a tree: key, label, type, required, and when they apply itemType, description, placeholder, default, advanced, sensitive, multiple, mappable, customFields, choices and children. A built-in step answers a flat list of its settings: key, type (string, template, integer, boolean, object, array or condition), required, description, example, and default and choices when it has them."
          },
          "options": {
            "description": "Each option (pagination, filter, sort, retries, onFailure, onNoResults, onSuccess): supported, and what it accepts."
          },
          "connection": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "description": "Whether the app needs a connection."
              },
              "authType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The app's authentication type."
              },
              "modes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The connection modes this step accepts."
              }
            },
            "description": "The connection the step needs."
          },
          "output": {
            "type": "object",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What a built-in step outputs, in words, beside its fixed fields (a Loop passes on each item, a Map step what its code returns). Absent for an app action."
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "The field's path."
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The field's type."
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What the field holds."
                    }
                  }
                },
                "description": "Each declared field: key, type, description."
              }
            },
            "description": "The output fields the action declares, which later steps reference."
          }
        },
        "required": [
          "app",
          "action",
          "arguments",
          "options",
          "connection",
          "output"
        ]
      },
      "WorkflowStepTest": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "True when the step ran without an error: the same flag List Run Steps and Get a Run Step answer for a step of a run."
          },
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed"
            ],
            "description": "succeeded or failed: the step's outcome, the same as success. It is not a run status: a run's status (finished, failed, ...) says where the whole run is."
          },
          "output": {
            "description": "The first records of the output (a JSON array as the step answered it), capped at 200 records and about 60 KB. Empty when there is no sample."
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How many records the output had in all. Null when there is no sample."
          },
          "truncated": {
            "type": "boolean",
            "description": "True when output holds fewer records than total: the rest were left out of the sample, not lost. Later steps still learn their fields from the records kept."
          },
          "truncatedBy": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "records",
              "size",
              null
            ],
            "description": "Why output stopped short of total. Null unless truncated is true."
          },
          "outputFields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The field's path in each record: dotted, with [] marking an array (lines[].sku). Reference it as {{ steps.<stepId>.output[0].<key> }}."
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Its type as seen in the sample: string, number, boolean, object, date, a type with [] for an array, or mixed."
                }
              }
            },
            "description": "The fields of the output records, learned from the sample and offered to later steps."
          },
          "error": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The runtime's error code (ARGUMENTS_MISSING, 401_UNAUTHORIZED, DEFAULT, ...)."
              },
              "message": {
                "type": "string",
                "description": "What the code means, for a person. What the app answered, if anything, is in output."
              },
              "status": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The HTTP status the app answered, when it answered one."
              }
            },
            "description": "Why the run failed. Null unless status is failed."
          },
          "savedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the sample was saved. Null when there is none."
          },
          "revision": {
            "type": "string",
            "description": "The draft's revision after the sample was saved (a sample is part of the step): send it in If-Match on your next change to the draft."
          },
          "durationMs": {
            "type": "integer",
            "description": "How long the step took to run, in milliseconds."
          }
        },
        "required": [
          "success",
          "status",
          "output",
          "total",
          "truncated",
          "truncatedBy",
          "outputFields",
          "error",
          "savedOn",
          "revision",
          "durationMs"
        ]
      },
      "WorkflowTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The tag's id. Put it in a workflow's tags."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tag's name, at most 24 characters."
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "description": "The tag's color, a name from the editor's palette: green, purple, pink, orange, yellow, blue, red or gray."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the tag was created."
          },
          "updatedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the tag was last changed."
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "createdOn",
          "updatedOn"
        ]
      },
      "WorkflowTrigger": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The trigger's id."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The trigger's display name."
          },
          "appSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "What starts the workflow: schedule, webhook, runWorkflow (when another workflow calls it), or the app whose event does."
          },
          "appVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app version the trigger is pinned to. For a built-in trigger (Schedule, Webhook, When called), the version of the built-in app it was added with, \"0\" or \"0.0.1\" (some older ones hold \"draft\" or null); it does not change what the trigger does."
          },
          "actionId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The app event the trigger listens for. Null for a built-in trigger."
          },
          "isDisabled": {
            "type": "boolean",
            "description": "True when the trigger is turned off."
          },
          "isConfigured": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the trigger passed the editor's validation. Null when it was never validated."
          }
        },
        "required": [
          "id",
          "name",
          "appSlug",
          "appVersion",
          "actionId",
          "isDisabled",
          "isConfigured"
        ]
      },
      "WorkflowTriggerConfiguration": {
        "type": "object",
        "properties": {
          "arguments": {
            "description": "The action's arguments, nested as the action's schema nests them. A string may hold {{ ... }} references to earlier steps' output."
          },
          "options": {
            "description": "Step options: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. An option present is on; one left out is off."
          },
          "connection": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "connection",
                  "environment",
                  "installation"
                ],
                "description": "connection: a chosen connection; environment: the workflow's connection for the run's environment; installation: each installation's own (integration workflows)."
              },
              "connectionId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The connection's id, from List Connections. Null with rules and no default."
              },
              "rules": {
                "description": "Conditions that pick another connection, first match wins: a list of { when: { field, operator, value }, connectionId }, or { $legacy } when kept as stored."
              }
            },
            "description": "The connection the step runs with. Null when none is set or the app takes none."
          },
          "isConfigured": {
            "type": "boolean",
            "description": "Whether the editor considers the step set up (nothing required is missing). A draft may be saved incomplete."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error refuses a write; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (REQUIRED_MISSING, LEGACY_VALUE_PRESERVED, INVALID_REFERENCE, ...)."
                },
                "path": {
                  "type": "string",
                  "description": "Where, as a JSON Pointer into the configuration (/arguments/contact/FirstName)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                }
              }
            },
            "description": "Warnings about the stored configuration: required values missing, values kept as stored, connections that are gone."
          },
          "revision": {
            "type": "string",
            "description": "The draft's revision: send it in If-Match on your next change to the draft. The response's ETag header is the same value."
          }
        },
        "required": [
          "arguments",
          "options",
          "connection",
          "isConfigured",
          "issues",
          "revision"
        ]
      },
      "WorkflowTriggerConfigurationValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when Update would accept the change."
          },
          "configuration": {
            "type": "object",
            "properties": {
              "arguments": {
                "description": "The action's arguments, nested as the action's schema nests them. A string may hold {{ ... }} references to earlier steps' output."
              },
              "options": {
                "description": "Step options: pagination, filter, sort, retries, onFailure, onNoResults, onSuccess. An option present is on; one left out is off."
              },
              "connection": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "connection",
                      "environment",
                      "installation"
                    ],
                    "description": "connection: a chosen connection; environment: the workflow's connection for the run's environment; installation: each installation's own (integration workflows)."
                  },
                  "connectionId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The connection's id, from List Connections. Null with rules and no default."
                  },
                  "rules": {
                    "description": "Conditions that pick another connection, first match wins: a list of { when: { field, operator, value }, connectionId }, or { $legacy } when kept as stored."
                  }
                },
                "description": "The connection the step runs with. Null when none is set or the app takes none."
              }
            },
            "description": "The configuration the change would leave, before it is saved."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error refuses a write; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (REQUIRED_MISSING, LEGACY_VALUE_PRESERVED, INVALID_REFERENCE, ...)."
                },
                "path": {
                  "type": "string",
                  "description": "Where, as a JSON Pointer into the configuration (/arguments/contact/FirstName)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                }
              }
            },
            "description": "Warnings about the stored configuration: required values missing, values kept as stored, connections that are gone."
          },
          "revision": {
            "type": "string",
            "description": "The revision of the draft that was checked."
          }
        },
        "required": [
          "valid",
          "configuration",
          "issues",
          "revision"
        ]
      },
      "WorkflowTriggerListen": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "received",
              "noCall"
            ],
            "description": "received: a call came in and is now the sample. noCall: none came within 30 seconds; listen again."
          },
          "receivedOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the call came in. Null for noCall."
          },
          "output": {
            "description": "The call as the trigger answers it, now its sample output: [{ query, body, params, url, method, headers }]. Null for noCall."
          },
          "outputFields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The field's path in each record: dotted, with [] marking an array (lines[].sku). Reference it as {{ steps.<stepId>.output[0].<key> }}."
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Its type as seen in the sample: string, number, boolean, object, date, a type with [] for an array, or mixed."
                }
              }
            },
            "description": "The fields of the trigger's output, learned from its sample and offered to the steps."
          },
          "revision": {
            "type": "string",
            "description": "The draft's revision: send it in If-Match on your next change to the draft."
          }
        },
        "required": [
          "status",
          "receivedOn",
          "output",
          "outputFields",
          "revision"
        ]
      },
      "WorkflowTriggerLookup": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "listed",
              "resolved",
              "ambiguous",
              "notFound"
            ],
            "description": "listed (every choice, in pages), resolved (q matched one), ambiguous (q matched several), or notFound."
          },
          "reasonCode": {
            "type": "string",
            "description": "NO_QUERY, EXACT_MATCH, STRONG_MATCH, MULTIPLE_HIGH_CONFIDENCE_CANDIDATES, INSUFFICIENT_CONFIDENCE, or NO_CANDIDATES."
          },
          "selected": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "description": "The value to set."
              },
              "label": {
                "type": "string",
                "description": "What the choice is called."
              }
            },
            "description": "The choice q matched, when resolved."
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "The value to set."
                },
                "label": {
                  "type": "string",
                  "description": "What the choice is called."
                }
              }
            },
            "description": "The choices: a page of them when listed, the best matches when ambiguous."
          },
          "source": {
            "type": "string",
            "enum": [
              "fixedOptions",
              "list",
              "lookupAction"
            ],
            "description": "Where the choices came from: fixedOptions (the app's own list), list (countries, currencies or time zones), or lookupAction (a read from the app with the trigger's connection)."
          },
          "paging": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Choices per page."
              },
              "offset": {
                "type": "integer",
                "description": "Choices skipped."
              },
              "total": {
                "type": "integer",
                "description": "How many choices there are."
              }
            },
            "description": "The page of a listing."
          },
          "hints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "The reason code."
                },
                "message": {
                  "type": "string",
                  "description": "What to do."
                }
              }
            },
            "description": "What to do next when q did not settle on one choice."
          }
        },
        "required": [
          "status",
          "reasonCode",
          "source",
          "paging",
          "hints"
        ]
      },
      "WorkflowTriggerSchema": {
        "type": "object",
        "properties": {
          "app": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "description": "The app's slug."
              },
              "version": {
                "type": "string",
                "description": "The app version the trigger uses."
              }
            },
            "description": "The trigger's app and the version it uses."
          },
          "action": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The action's id."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The action's name."
              },
              "operation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "read, create, update, delete, or null."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "action",
                  "trigger"
                ],
                "description": "action or trigger."
              }
            },
            "description": "The action the trigger runs; null for a built-in trigger (Schedule, Webhook, When called)."
          },
          "arguments": {
            "description": "The arguments, as a tree: key, label, type, required, and when they apply itemType, description, placeholder, default, advanced, sensitive, multiple, mappable, customFields, choices and children. A built-in step answers a flat list of its settings: key, type (string, template, integer, boolean, object, array or condition), required, description, example, and default and choices when it has them."
          },
          "options": {
            "description": "Each option (pagination, filter, sort, retries, onFailure, onNoResults, onSuccess): supported, and what it accepts."
          },
          "connection": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "description": "Whether the app needs a connection."
              },
              "authType": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The app's authentication type."
              },
              "modes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The connection modes this trigger accepts."
              }
            },
            "description": "The connection the trigger needs."
          },
          "output": {
            "type": "object",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What a built-in trigger outputs, in words, beside its fixed fields (a Loop passes on each item, a Map step what its code returns). Absent for an app action."
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "The field's path."
                    },
                    "type": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The field's type."
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What the field holds."
                    }
                  }
                },
                "description": "Each declared field: key, type, description."
              }
            },
            "description": "The output fields the action declares, which later steps reference."
          }
        },
        "required": [
          "app",
          "action",
          "arguments",
          "options",
          "connection",
          "output"
        ]
      },
      "WorkflowUsage": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The workflow."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its name."
          },
          "tasks": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Tasks it used in the window."
          },
          "installations": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "installationId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The installation."
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The installation label: the integration label template when one is set, otherwise \"email - name\" of the end user, otherwise the raw id."
                },
                "integrationId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The embedded integration the installation belongs to."
                },
                "integrationName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "That integration's name."
                },
                "tasks": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Tasks the installation used in the window."
                }
              }
            },
            "description": "Embedded usage per installation, highest first: installationId, name (the installation label), integrationId, integrationName, and tasks. Empty for workflows that did not run under an installation. Installation tasks add up to at most the workflow tasks; the remainder ran outside an installation or before meta.installationsFrom, the first day with installation detail."
          }
        },
        "required": [
          "workflowId",
          "name",
          "tasks",
          "installations"
        ]
      },
      "WorkflowValidation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True when nothing blocks publishing. Warnings may remain."
          },
          "revision": {
            "type": "string",
            "description": "The revision of the draft that was checked."
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning"
                  ],
                  "description": "error blocks publishing; warning does not."
                },
                "code": {
                  "type": "string",
                  "description": "What is wrong, UPPER_SNAKE (SCHEDULE_INCOMPLETE, STEP_NOT_CONFIGURED, MISSING_GRAPH_REFERENCE, ...)."
                },
                "message": {
                  "type": "string",
                  "description": "What is wrong, for a person."
                },
                "stepId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The step or trigger it is about. Null for the workflow as a whole."
                },
                "path": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Where that step sits in Get Workflow Definition, as a JSON Pointer (/steps/1/body/0). Null for the workflow as a whole."
                }
              }
            },
            "description": "Every problem found, errors first."
          }
        },
        "required": [
          "valid",
          "revision",
          "issues"
        ]
      },
      "WorkflowVersion": {
        "type": "object",
        "properties": {
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version string, or \"draft\" for the current draft."
          },
          "isPublished": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for the published version."
          },
          "createdOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this version was created."
          }
        },
        "required": [
          "version",
          "isPublished",
          "createdOn"
        ]
      }
    }
  }
}