Notion API 2026-03-11 — resource operations

This reference is readable without JavaScript. Download the OpenAPI document.

Runtime

/api/purple-suite/{instanceId}/contracts/pages/notion
[
  {
    "method": "delete",
    "path": "/v1/agents/:agent_id",
    "operationId": "delete-agent"
  },
  {
    "method": "get",
    "path": "/v1/agents/:agent_id",
    "operationId": "get-agent"
  },
  {
    "method": "patch",
    "path": "/v1/agents/:agent_id/credit_limit",
    "operationId": "update-agent-credit-limit"
  },
  {
    "method": "get",
    "path": "/v1/agents/:agent_id/insights",
    "operationId": "get-agent-insights"
  },
  {
    "method": "patch",
    "path": "/v1/agents/:agent_id/status",
    "operationId": "update-agent-status"
  },
  {
    "method": "post",
    "path": "/v1/agents/batch",
    "operationId": "agent-batch"
  },
  {
    "method": "post",
    "path": "/v1/agents/query",
    "operationId": "query-agents"
  },
  {
    "method": "get",
    "path": "/v1/async_tasks/:task_id",
    "operationId": "retrieve-async-task"
  },
  {
    "method": "delete",
    "path": "/v1/blocks/:block_id",
    "operationId": "delete-a-block"
  },
  {
    "method": "get",
    "path": "/v1/blocks/:block_id",
    "operationId": "retrieve-a-block"
  },
  {
    "method": "patch",
    "path": "/v1/blocks/:block_id",
    "operationId": "update-a-block"
  },
  {
    "method": "get",
    "path": "/v1/blocks/:block_id/children",
    "operationId": "get-block-children"
  },
  {
    "method": "patch",
    "path": "/v1/blocks/:block_id/children",
    "operationId": "patch-block-children"
  },
  {
    "method": "post",
    "path": "/v1/blocks/meeting_notes",
    "operationId": "create-meeting-note"
  },
  {
    "method": "post",
    "path": "/v1/blocks/meeting_notes/query",
    "operationId": "query-meeting-notes"
  },
  {
    "method": "get",
    "path": "/v1/comments",
    "operationId": "list-comments"
  },
  {
    "method": "post",
    "path": "/v1/comments",
    "operationId": "create-a-comment"
  },
  {
    "method": "delete",
    "path": "/v1/comments/:comment_id",
    "operationId": "delete-a-comment"
  },
  {
    "method": "get",
    "path": "/v1/comments/:comment_id",
    "operationId": "retrieve-comment"
  },
  {
    "method": "patch",
    "path": "/v1/comments/:comment_id",
    "operationId": "update-a-comment"
  },
  {
    "method": "get",
    "path": "/v1/custom_emojis",
    "operationId": "list-custom-emojis"
  },
  {
    "method": "post",
    "path": "/v1/data_sources",
    "operationId": "create-a-database"
  },
  {
    "method": "get",
    "path": "/v1/data_sources/:data_source_id",
    "operationId": "retrieve-a-data-source"
  },
  {
    "method": "patch",
    "path": "/v1/data_sources/:data_source_id",
    "operationId": "update-a-data-source"
  },
  {
    "method": "post",
    "path": "/v1/data_sources/:data_source_id/query",
    "operationId": "post-database-query"
  },
  {
    "method": "get",
    "path": "/v1/data_sources/:data_source_id/templates",
    "operationId": "list-data-source-templates"
  },
  {
    "method": "post",
    "path": "/v1/databases",
    "operationId": "create-database"
  },
  {
    "method": "get",
    "path": "/v1/databases/:database_id",
    "operationId": "retrieve-database"
  },
  {
    "method": "patch",
    "path": "/v1/databases/:database_id",
    "operationId": "update-database"
  },
  {
    "method": "get",
    "path": "/v1/file_uploads",
    "operationId": "list-file-uploads"
  },
  {
    "method": "post",
    "path": "/v1/file_uploads",
    "operationId": "create-file"
  },
  {
    "method": "get",
    "path": "/v1/file_uploads/:file_upload_id",
    "operationId": "retrieve-file-upload"
  },
  {
    "method": "post",
    "path": "/v1/file_uploads/:file_upload_id/complete",
    "operationId": "complete-file-upload"
  },
  {
    "method": "post",
    "path": "/v1/file_uploads/:file_upload_id/send",
    "operationId": "upload-file"
  },
  {
    "method": "post",
    "path": "/v1/pages",
    "operationId": "post-page"
  },
  {
    "method": "get",
    "path": "/v1/pages/:page_id",
    "operationId": "retrieve-a-page"
  },
  {
    "method": "patch",
    "path": "/v1/pages/:page_id",
    "operationId": "patch-page"
  },
  {
    "method": "get",
    "path": "/v1/pages/:page_id/markdown",
    "operationId": "retrieve-page-markdown"
  },
  {
    "method": "patch",
    "path": "/v1/pages/:page_id/markdown",
    "operationId": "update-page-markdown"
  },
  {
    "method": "post",
    "path": "/v1/pages/:page_id/move",
    "operationId": "move-page"
  },
  {
    "method": "get",
    "path": "/v1/pages/:page_id/properties/:property_id",
    "operationId": "retrieve-a-page-property"
  },
  {
    "method": "post",
    "path": "/v1/search",
    "operationId": "post-search"
  },
  {
    "method": "post",
    "path": "/v1/sessions",
    "operationId": "update-session"
  },
  {
    "method": "get",
    "path": "/v1/sessions/:session_id",
    "operationId": "retrieve-session"
  },
  {
    "method": "post",
    "path": "/v1/sessions/:session_id/cancel",
    "operationId": "cancel-session"
  },
  {
    "method": "post",
    "path": "/v1/sessions/:session_id/events/query",
    "operationId": "query-session-events"
  },
  {
    "method": "post",
    "path": "/v1/sessions/query",
    "operationId": "query-sessions"
  },
  {
    "method": "get",
    "path": "/v1/users",
    "operationId": "get-users"
  },
  {
    "method": "get",
    "path": "/v1/users/:user_id",
    "operationId": "get-user"
  },
  {
    "method": "get",
    "path": "/v1/users/me",
    "operationId": "get-self"
  },
  {
    "method": "get",
    "path": "/v1/views",
    "operationId": "list-views"
  },
  {
    "method": "post",
    "path": "/v1/views",
    "operationId": "create-view"
  },
  {
    "method": "delete",
    "path": "/v1/views/:view_id",
    "operationId": "delete-view"
  },
  {
    "method": "get",
    "path": "/v1/views/:view_id",
    "operationId": "retrieve-a-view"
  },
  {
    "method": "patch",
    "path": "/v1/views/:view_id",
    "operationId": "update-a-view"
  },
  {
    "method": "post",
    "path": "/v1/views/:view_id/queries",
    "operationId": "create-view-query"
  },
  {
    "method": "delete",
    "path": "/v1/views/:view_id/queries/:query_id",
    "operationId": "delete-view-query"
  },
  {
    "method": "get",
    "path": "/v1/views/:view_id/queries/:query_id",
    "operationId": "get-view-query-results"
  }
]

Credentials

The verifier must see the whole request: it resolves the bearer value against this instance's OAuth token digests before falling back to the instance key, and enforces the required Notion-Version header ahead of every handler.

Coverage and limitations

{
  "documentScope": "full",
  "runtimeFidelity": "mixed",
  "counts": {
    "operations": 58
  },
  "notes": [
    "This document publishes the 58 operations Notion authenticates with a bearer token at Notion-Version 2026-03-11. The 3 OAuth operations use HTTP Basic and are the sibling profile; together the two publish all 61 operations the vendor exposes. Nothing is pruned.",
    "58 of 61 operations are fully modeled against persistent per-instance state: the block tree, the data-source property schema and its values, the shared query engine, cursor pagination, comments, views and materialised view queries, multipart upload accounting, agents, and sessions.",
    "create-file is modeled-core: the derived document narrows `mode` to `single_part`/`multi_part`, and an `external_url` request is rejected with Notion's 400 rather than silently accepted. Importing that way would require an outbound fetch of a caller-supplied URL, which this emulator does not do.",
    "update-session is modeled-core: the derived document keeps only the `{session_id, actions}` branch, which approves or rejects a pending `required_action` and is a real state transition. The `{message}` and `{session_id, continue_from}` branches ask a Notion-hosted agent to generate output and are refused rather than answered with fabricated content.",
    "create-meeting-note is unavailable and cannot be narrowed: both branches of its request require an audio or video source, so producing a note means transcribing media on Notion-hosted models. It keeps its exact schema and a mounted route that validates the request first and then fails closed, so a malformed body is still reported as such.",
    "formula and rollup property values are published as declared and read null: both need an expression evaluator, and the document types them nullable rather than this contract inventing a number.",
    "The 31 webhooks are outbound deliveries. They stay in the document under `webhooks` and have no mounted receiver; inventing an inbound endpoint for them would fabricate a surface the vendor does not expose.",
    "Markdown round-trips exactly for ten block types and renders one way only for the other 26, because Markdown has no syntax for the distinction. COVERAGE_LEDGER.md and markdown.ts name them."
  ]
}

Servers

[
  {
    "url": "/api/purple-suite/{instanceId}/contracts/pages/notion",
    "description": "PurpleSuite instance-scoped Notion emulation"
  }
]

Authentication schemes

{
  "bearerAuth": {
    "type": "http",
    "scheme": "bearer"
  },
  "basicAuth": {
    "type": "http",
    "scheme": "basic"
  }
}

Each operation lists its security requirements. An empty security array permits an unauthenticated request. Use the scheme and headers declared for the selected contract.

Operations

DELETE /v1/agents/{agent_id}

Delete agent

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Delete agent",
  "operationId": "delete-agent",
  "x-notion-sdk-method": "agents.delete",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.delete({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/delete-agent",
  "parameters": [
    {
      "name": "agent_id",
      "in": "path",
      "required": true,
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/idRequest"
          },
          {
            "type": "string",
            "enum": [
              "notion_ai",
              "33333333-3333-3333-3333-333333333333"
            ],
            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
          }
        ],
        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. The personal agent cannot be deleted."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "agent_id": {
                "$ref": "#/components/schemas/idResponse"
              },
              "status": {
                "type": "string",
                "const": "deleted",
                "description": "Always \"deleted\": the agent has been soft-deleted (recoverable)."
              },
              "deleted_at": {
                "type": "string",
                "description": "ISO 8601 timestamp of when the agent was deleted."
              }
            },
            "additionalProperties": false,
            "required": [
              "agent_id",
              "status",
              "deleted_at"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/agents/{agent_id}

Get agent

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Get agent",
  "operationId": "get-agent",
  "x-notion-sdk-method": "agents.retrieve",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.retrieve({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/retrieve-agent",
  "parameters": [
    {
      "name": "agent_id",
      "in": "path",
      "required": true,
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/idRequest"
          },
          {
            "type": "string",
            "enum": [
              "notion_ai",
              "33333333-3333-3333-3333-333333333333"
            ],
            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
          }
        ],
        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
      }
    },
    {
      "name": "verbose",
      "in": "query",
      "schema": {
        "type": "boolean",
        "description": "Whether to include the agent's inline instructions. Defaults to false."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "agent",
                "description": "Always `agent`"
              },
              "id": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "string",
                    "const": "notion_ai",
                    "description": "Always `notion_ai`"
                  }
                ]
              },
              "agent_type": {
                "type": "string",
                "enum": [
                  "notion_ai",
                  "custom_agent",
                  "autofill_custom_agent",
                  "external"
                ],
                "description": "What kind of agent this is: \"notion_ai\" is the personal agent; \"custom_agent\" is a standalone agent you chat with; \"autofill_custom_agent\" fills a database property; \"external\" runs through an external provider."
              },
              "name": {
                "type": "string"
              },
              "description": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "instructions_page_id": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "icon": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/pageIconResponse"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "custom_agent_avatar",
                        "description": "Type of icon. In this case, a custom agent avatar."
                      },
                      "custom_agent_avatar": {
                        "type": "object",
                        "properties": {
                          "static_url": {
                            "type": "string",
                            "description": "The URL of the static custom agent avatar."
                          },
                          "animated_url": {
                            "type": "string",
                            "description": "The URL of the animated custom agent avatar."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "static_url",
                          "animated_url"
                        ],
                        "description": "The static and animated URLs for the agent avatar."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "type",
                      "custom_agent_avatar"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "model": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "auto",
                        "description": "Always `auto`"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "mode"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "pinned",
                        "description": "Always `pinned`"
                      },
                      "id": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The public model this agent maps to (e.g. \"claude-sonnet-5\"), or null for a pre-release / early-access model."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "mode",
                      "id"
                    ]
                  }
                ],
                "description": "The model the agent runs on: auto (Notion selects) or a pinned model."
              },
              "connections": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "notion",
                          "description": "Always `notion`"
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "type": "null"
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "target": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "page",
                                        "description": "Always `page`"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "database_property",
                                        "description": "Always `database_property`"
                                      },
                                      "data_source_id": {
                                        "type": "string"
                                      },
                                      "property_id": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "data_source_id",
                                      "property_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "agent",
                                        "description": "Always `agent`"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "workspace",
                                        "description": "Always `workspace`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "owner_private_pages",
                                        "description": "Always `owner_private_pages`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "web_search",
                                        "description": "Always `web_search`"
                                      },
                                      "allowed_domains": {
                                        "oneOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            },
                                            "maxItems": 100
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "description": "Domains web search is restricted to, or null when unrestricted."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "allowed_domains"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "notion_help_docs_search",
                                        "description": "Always `notion_help_docs_search`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  }
                                ]
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "maxItems": 100,
                                "description": "Content roles (\"reader\" | \"comment_only\" | \"read_and_write\" | \"editor\") for scoped targets, or search verbs (\"allow\" | \"disallow\") for the search targets."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "target",
                              "scopes"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "permissions"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "slack",
                          "description": "Always `slack`"
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "slack_workspace",
                                  "description": "Always `slack_workspace`"
                                },
                                "team_id": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "team_id"
                              ]
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The linked Slack workspace, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "target": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "slack_channel",
                                        "description": "Always `slack_channel`"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "slack_all_public_channels",
                                        "description": "Always `slack_all_public_channels`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "slack_all_channels",
                                        "description": "Always `slack_all_channels`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  }
                                ]
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "maxItems": 100,
                                "description": "Slack verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "target",
                              "scopes"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "permissions"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "discord",
                          "description": "Always `discord`"
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "discord_server",
                                  "description": "Always `discord_server`"
                                },
                                "id": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "id"
                              ]
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The linked Discord server, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "target": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "discord_channel",
                                        "description": "Always `discord_channel`"
                                      },
                                      "id": {
                                        "type": "string"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "discord_all_channels",
                                        "description": "Always `discord_all_channels`"
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type"
                                    ]
                                  }
                                ]
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "maxItems": 100,
                                "description": "Discord verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "target",
                              "scopes"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "permissions"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "mcp_server",
                          "description": "Always `mcp_server`"
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mcp_server",
                                  "description": "Always `mcp_server`"
                                },
                                "server_host": {
                                  "type": "string",
                                  "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "server_host"
                              ]
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "enabled_tools": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "name",
                                  "title"
                                ]
                              },
                              "maxItems": 100
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "run_tools_automatically": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "boolean",
                              "description": "Whether read tool calls run without a confirmation step."
                            },
                            "write": {
                              "type": "boolean",
                              "description": "Whether write tool calls run without a confirmation step."
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "Whether read / write tool calls run without a confirmation step."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "enabled_tools",
                        "run_tools_automatically"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "custom_mcp_server",
                          "description": "Always `custom_mcp_server`"
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "mcp_server",
                                  "description": "Always `mcp_server`"
                                },
                                "server_host": {
                                  "type": "string",
                                  "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "server_host"
                              ]
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "enabled_tools": {
                          "oneOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "name",
                                  "title"
                                ]
                              },
                              "maxItems": 100
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "run_tools_automatically": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "boolean",
                              "description": "Whether read tool calls run without a confirmation step."
                            },
                            "write": {
                              "type": "boolean",
                              "description": "Whether write tool calls run without a confirmation step."
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "Whether read / write tool calls run without a confirmation step."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "enabled_tools",
                        "run_tools_automatically"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "asana",
                            "box",
                            "calendar",
                            "computer",
                            "confluence",
                            "cursor",
                            "files",
                            "fs",
                            "github",
                            "gmail",
                            "google_calendar",
                            "google_drive",
                            "google_drive_oauth",
                            "gtm",
                            "helpdocs",
                            "images",
                            "jira",
                            "linear",
                            "mail",
                            "marketplace",
                            "memory",
                            "microsoft_teams",
                            "microsoft_teams_oauth",
                            "outlook",
                            "salesforce",
                            "search",
                            "security",
                            "sharepoint",
                            "sharepoint_oauth",
                            "skills",
                            "system",
                            "test",
                            "web",
                            "webhooks",
                            "worker",
                            "workers"
                          ],
                          "description": "The connector's machine name (e.g. \"github\", \"google_drive\")."
                        },
                        "name": {
                          "type": "string"
                        },
                        "account": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The provider-side account identifier, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "target": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "id"
                                ]
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "maxItems": 100,
                                "description": "The scopes granted on this target."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "target",
                              "scopes"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "name",
                        "account",
                        "permissions"
                      ]
                    }
                  ]
                },
                "maxItems": 100,
                "description": "Integrations the agent is connected to (Notion, Slack, Discord, MCP servers, and other connectors), each with an account and per-target permissions."
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "disabled",
                  "deleted"
                ],
                "description": "\"active\" when the agent can run; \"disabled\" when it is paused (see pause_reason); \"deleted\" when it has been removed."
              },
              "pause_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "run_limit",
                      "credit_limit",
                      "runaway_credit_usage",
                      "workspace_credit_limit",
                      "failure_limit",
                      "mark_session_failed_autopause",
                      "disabled_from_workspace_settings",
                      "disabled_from_workspace_settings_but_resumable",
                      "disabled_from_api",
                      "disabled_from_agent_settings",
                      "disabled_due_to_no_members_with_access",
                      "disabled_due_to_lack_of_editors",
                      "disabled_by_notion",
                      "internal_error",
                      "needs_user_review",
                      "tool_unavailable"
                    ],
                    "description": "One of: `run_limit`, `credit_limit`, `runaway_credit_usage`, `workspace_credit_limit`, `failure_limit`, `mark_session_failed_autopause`, `disabled_from_workspace_settings`, `disabled_from_workspace_settings_but_resumable`, `disabled_from_api`, `disabled_from_agent_settings`, `disabled_due_to_no_members_with_access`, `disabled_due_to_lack_of_editors`, `disabled_by_notion`, `internal_error`, `needs_user_review`, `tool_unavailable`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Why the agent is paused when status is \"disabled\" (e.g. \"credit_limit\", \"disabled_from_workspace_settings\"); null when active."
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "object": {
                        "type": "string",
                        "const": "user",
                        "description": "Always `user`"
                      },
                      "type": {
                        "type": "string",
                        "const": "user",
                        "description": "Always `user`"
                      },
                      "id": {
                        "$ref": "#/components/schemas/idResponse",
                        "description": "The ID of the user that created this agent."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "object",
                      "type",
                      "id"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "$ref": "#/components/schemas/idResponse",
                        "description": "The ID of the published artifact."
                      },
                      "number": {
                        "type": "number",
                        "description": "The version number."
                      },
                      "published_at": {
                        "type": "string",
                        "description": "The ISO 8601 timestamp when this version was published."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "number",
                      "published_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "agent_version": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "$ref": "#/components/schemas/idResponse",
                        "description": "The ID of the published artifact."
                      },
                      "number": {
                        "type": "number",
                        "description": "The version number."
                      },
                      "published_at": {
                        "type": "string",
                        "description": "The ISO 8601 timestamp when this version was published."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "number",
                      "published_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_unpublished_changes": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "const": "hidden",
                    "description": "Always `hidden`"
                  }
                ],
                "description": "Whether the draft has edits not yet in the published version, or \"hidden\" when the caller lacks edit access to the agent."
              },
              "last_run_time": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
                  },
                  {
                    "type": "string",
                    "const": "hidden",
                    "description": "Always `hidden`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO 8601 timestamp of the agent's most recent run, null if it has never run, or \"hidden\" when the caller lacks edit access to the agent."
              },
              "last_run_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
                  },
                  {
                    "type": "string",
                    "const": "hidden",
                    "description": "Always `hidden`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO 8601 timestamp of the agent's most recent run, null if it has never run, or \"hidden\" when the caller lacks edit access to the agent."
              },
              "credit_limit": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "string",
                    "const": "hidden",
                    "description": "Always `hidden`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The per-agent credit limit that applies to this agent, null when uncapped, or \"hidden\" when the caller lacks full access to the agent. This is the effective limit computed at runtime, folding in both the agent's own limit and any workspace-admin default."
              },
              "triggers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Machine trigger type (e.g. \"notion.agent.mentioned\", \"recurrence\", \"slack.reaction.added\")."
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether this trigger is currently enabled."
                    },
                    "schedule": {
                      "type": "object",
                      "properties": {
                        "frequency": {
                          "type": "string",
                          "description": "Base cadence unit (\"hour\" | \"day\" | \"week\" | \"month\" | \"year\")."
                        },
                        "interval": {
                          "type": "integer",
                          "minimum": 1,
                          "description": "Multiplier on the frequency (e.g. every 2 weeks)."
                        },
                        "weekdays": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 100,
                          "description": "Days of the week the schedule runs (e.g. \"monday\"). Present for weekly cadences and monthly weekday restrictions."
                        },
                        "monthdays": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "maxItems": 100,
                          "description": "Days of the month the schedule runs. Present for monthly monthday restrictions."
                        },
                        "week_numbers": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "maxItems": 100,
                          "description": "Week-of-month ordinals for a monthly weekday restriction (e.g. [2, 3] for the 2nd and 3rd occurrence); -1 means the last week."
                        },
                        "hour": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Hour of day (0–23) the schedule runs."
                        },
                        "minute": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Minute of the hour (0–59) the schedule runs."
                        },
                        "timezone": {
                          "type": "string",
                          "description": "IANA timezone (e.g. \"America/New_York\")."
                        },
                        "start_date": {
                          "type": "string",
                          "description": "ISO 8601 timestamp the schedule starts from."
                        },
                        "end": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "date",
                                  "description": "Always `date`"
                                },
                                "end_at": {
                                  "type": "string",
                                  "description": "ISO 8601 timestamp when the schedule stops."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "end_at"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "count",
                                  "description": "Always `count`"
                                },
                                "occurrences": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "description": "Number of occurrences after which the schedule stops."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "occurrences"
                              ]
                            }
                          ],
                          "description": "When the schedule stops, when it is bounded."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "frequency",
                        "interval"
                      ],
                      "description": "Structured recurrence cadence. Present only for recurrence triggers."
                    },
                    "config": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Remaining per-type trigger configuration (e.g. watched channel ids, reaction config), keys in snake_case. Present only when the trigger carries such state."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "enabled"
                  ]
                },
                "maxItems": 100,
                "description": "The agent's configured triggers, each with a machine type, an enabled flag, and (for recurrence triggers) a structured schedule."
              },
              "created_time": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this agent was created."
              },
              "last_edited_time": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time when this agent was last edited."
              },
              "instructions": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The agent's inline instructions when verbose=true, or null when its instructions are stored on a page."
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "agent_type",
              "name",
              "description",
              "instructions_page_id",
              "icon",
              "model",
              "connections",
              "status",
              "pause_reason",
              "created_by",
              "version",
              "agent_version",
              "has_unpublished_changes",
              "last_run_time",
              "last_run_at",
              "credit_limit",
              "triggers"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/agents/{agent_id}/credit_limit

Update agent credit limit

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update agent credit limit",
  "operationId": "update-agent-credit-limit",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.updateCreditLimit({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\",\n  credit_limit: 500\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/update-agent-credit-limit",
  "parameters": [
    {
      "name": "agent_id",
      "in": "path",
      "required": true,
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/idRequest"
          },
          {
            "type": "string",
            "enum": [
              "notion_ai",
              "33333333-3333-3333-3333-333333333333"
            ],
            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
          }
        ],
        "description": "The ID of the custom agent (a UUID). The personal agent (Notion AI) is not supported by this endpoint."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "credit_limit": {
              "oneOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The per-agent credit limit as a non-negative integer, or null to clear the limit."
            }
          },
          "additionalProperties": false,
          "required": [
            "credit_limit"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "agent_id": {
                "$ref": "#/components/schemas/idResponse"
              },
              "credit_limit": {
                "oneOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The agent's editor-set per-agent credit limit; null when no limit applies."
              },
              "last_edited_time": {
                "type": "string",
                "description": "ISO 8601 timestamp of when the agent was last edited."
              }
            },
            "additionalProperties": false,
            "required": [
              "agent_id",
              "credit_limit",
              "last_edited_time"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/agents/{agent_id}/insights

Get agent insights

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Get agent insights",
  "operationId": "get-agent-insights",
  "x-notion-sdk-method": "agents.retrieveInsights",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.retrieveInsights({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/retrieve-agent-insights",
  "parameters": [
    {
      "name": "agent_id",
      "in": "path",
      "required": true,
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/idRequest"
          },
          {
            "type": "string",
            "enum": [
              "notion_ai",
              "33333333-3333-3333-3333-333333333333"
            ],
            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
          }
        ],
        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
      }
    },
    {
      "name": "start_time",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 0,
        "description": "Start of the insights window, as an epoch timestamp in seconds. Must be supplied together with `end_time`; if either is omitted the window defaults to the current billing period."
      }
    },
    {
      "name": "end_time",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 0,
        "description": "End of the insights window, as an epoch timestamp in seconds. Must be supplied together with `start_time`; if either is omitted the window defaults to the current billing period."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "agent_insights",
                "description": "Always `agent_insights`"
              },
              "id": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "string",
                    "const": "notion_ai",
                    "description": "Always `notion_ai`"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "agent_type": {
                "type": "string",
                "enum": [
                  "notion_ai",
                  "custom_agent",
                  "autofill_custom_agent"
                ],
                "description": "One of: `notion_ai`, `custom_agent`, `autofill_custom_agent`"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "disabled",
                  "deleted"
                ],
                "description": "One of: `active`, `disabled`, `deleted`"
              },
              "pause_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "run_limit",
                      "credit_limit",
                      "runaway_credit_usage",
                      "workspace_credit_limit",
                      "failure_limit",
                      "mark_session_failed_autopause",
                      "disabled_from_workspace_settings",
                      "disabled_from_workspace_settings_but_resumable",
                      "disabled_from_api",
                      "disabled_from_agent_settings",
                      "disabled_due_to_no_members_with_access",
                      "disabled_due_to_lack_of_editors",
                      "disabled_by_notion",
                      "internal_error",
                      "needs_user_review",
                      "tool_unavailable"
                    ],
                    "description": "One of: `run_limit`, `credit_limit`, `runaway_credit_usage`, `workspace_credit_limit`, `failure_limit`, `mark_session_failed_autopause`, `disabled_from_workspace_settings`, `disabled_from_workspace_settings_but_resumable`, `disabled_from_api`, `disabled_from_agent_settings`, `disabled_due_to_no_members_with_access`, `disabled_due_to_lack_of_editors`, `disabled_by_notion`, `internal_error`, `needs_user_review`, `tool_unavailable`"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "user",
                          "bot"
                        ],
                        "description": "One of: `user`, `bot`"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "total_credits_used": {
                "type": "number",
                "description": "Premium AI credits consumed by this agent within the window."
              },
              "credit_limit": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string",
                    "const": "hidden",
                    "description": "Always `hidden`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Enforced per-agent credit limit; null when none is configured, and \"hidden\" when the caller lacks full access to the agent."
              },
              "runs_completed": {
                "type": "number",
                "description": "Number of runs recorded for this agent within the window."
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "name",
              "agent_type",
              "status",
              "pause_reason",
              "created_by",
              "total_credits_used",
              "credit_limit",
              "runs_completed"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/agents/{agent_id}/status

Update agent status

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update agent status",
  "operationId": "update-agent-status",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.updateStatus({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\",\n  status: \"disabled\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/update-agent-status",
  "parameters": [
    {
      "name": "agent_id",
      "in": "path",
      "required": true,
      "schema": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/idRequest"
          },
          {
            "type": "string",
            "enum": [
              "notion_ai",
              "33333333-3333-3333-3333-333333333333"
            ],
            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
          }
        ],
        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "active",
                "disabled"
              ],
              "description": "Set to \"active\" to re-enable an agent that was disabled through this API, or \"disabled\" to turn off a running agent."
            }
          },
          "additionalProperties": false,
          "required": [
            "status"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "agent_id": {
                "$ref": "#/components/schemas/idResponse"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "disabled",
                  "deleted"
                ],
                "description": "\"active\" when the agent can run; \"disabled\" when it is paused (see pause_reason); \"deleted\" when it has been removed."
              },
              "pause_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "run_limit",
                      "credit_limit",
                      "runaway_credit_usage",
                      "workspace_credit_limit",
                      "failure_limit",
                      "mark_session_failed_autopause",
                      "disabled_from_workspace_settings",
                      "disabled_from_workspace_settings_but_resumable",
                      "disabled_from_api",
                      "disabled_from_agent_settings",
                      "disabled_due_to_no_members_with_access",
                      "disabled_due_to_lack_of_editors",
                      "disabled_by_notion",
                      "internal_error",
                      "needs_user_review",
                      "tool_unavailable"
                    ],
                    "description": "One of: `run_limit`, `credit_limit`, `runaway_credit_usage`, `workspace_credit_limit`, `failure_limit`, `mark_session_failed_autopause`, `disabled_from_workspace_settings`, `disabled_from_workspace_settings_but_resumable`, `disabled_from_api`, `disabled_from_agent_settings`, `disabled_due_to_no_members_with_access`, `disabled_due_to_lack_of_editors`, `disabled_by_notion`, `internal_error`, `needs_user_review`, `tool_unavailable`"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Why the agent is paused when status is \"disabled\" (e.g. \"disabled_from_api\", \"credit_limit\"); null when active or deleted."
              },
              "last_edited_time": {
                "type": "string",
                "description": "ISO 8601 timestamp of when the agent was last edited."
              }
            },
            "additionalProperties": false,
            "required": [
              "agent_id",
              "status",
              "pause_reason",
              "last_edited_time"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/agents/batch

Apply many agent operations

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Apply many agent operations",
  "operationId": "agent-batch",
  "x-notion-sdk-method": "agents.batch",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.batch({\n  operations: [\n    {\n      action: \"update_status\",\n      agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\",\n      fields: { status: \"disabled\" }\n    }\n  ]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/batch-manage-agent",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "operations": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "update_status",
                        "description": "Enable or disable one agent, equivalent to `PATCH /v1/agents/:agent_id/status`."
                      },
                      "agent_id": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/idRequest"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "notion_ai",
                              "33333333-3333-3333-3333-333333333333"
                            ],
                            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
                          }
                        ],
                        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
                      },
                      "fields": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "disabled"
                            ],
                            "description": "\"active\" to re-enable an agent disabled through this API, or \"disabled\" to turn it off."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "status"
                        ],
                        "description": "The status to apply to this agent."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "action",
                      "agent_id",
                      "fields"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "update_credit_limit",
                        "description": "Set or clear one agent's credit limit, equivalent to `PATCH /v1/agents/:agent_id/credit_limit`. Requires full access to the agent."
                      },
                      "agent_id": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/idRequest"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "notion_ai",
                              "33333333-3333-3333-3333-333333333333"
                            ],
                            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
                          }
                        ],
                        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
                      },
                      "fields": {
                        "type": "object",
                        "properties": {
                          "credit_limit": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The per-agent credit limit as a non-negative integer, or null to clear the limit."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "credit_limit"
                        ],
                        "description": "The credit limit to apply to this agent."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "action",
                      "agent_id",
                      "fields"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "delete",
                        "description": "Soft-delete one agent, equivalent to `DELETE /v1/agents/:agent_id`."
                      },
                      "agent_id": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/idRequest"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "notion_ai",
                              "33333333-3333-3333-3333-333333333333"
                            ],
                            "description": "One of: `notion_ai`, `33333333-3333-3333-3333-333333333333`"
                          }
                        ],
                        "description": "The agent ID (a UUID), or `notion_ai` for the personal agent. Endpoint-specific restrictions still apply."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "action",
                      "agent_id"
                    ]
                  }
                ],
                "description": "One action to apply to one agent. Each operation is authorized and applied on its own."
              },
              "maxItems": 100,
              "minItems": 1,
              "description": "The operations to apply, at least one and at most 100. Operations are applied in the order given, and the batch is not atomic: each operation succeeds or fails on its own, and per-operation outcomes are reported in the async task's result."
            }
          },
          "additionalProperties": false,
          "required": [
            "operations"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "object",
              "id",
              "status",
              "status_url",
              "created_time",
              "operation",
              "poll_after_seconds"
            ],
            "additionalProperties": false,
            "properties": {
              "object": {
                "type": "string",
                "const": "async_task"
              },
              "id": {
                "type": "string",
                "minLength": 1
              },
              "status_url": {
                "type": "string",
                "minLength": 1
              },
              "created_time": {
                "type": "string",
                "format": "date-time"
              },
              "operation": {
                "type": "object",
                "required": [
                  "surface",
                  "name"
                ],
                "additionalProperties": false,
                "properties": {
                  "surface": {
                    "type": "string",
                    "enum": [
                      "rest",
                      "mcp"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running",
                  "retrying"
                ]
              },
              "poll_after_seconds": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/agents/query

Query agents

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Query agents",
  "operationId": "query-agents",
  "x-notion-sdk-method": "agents.query",
  "tags": [
    "Agents"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.agents.query({\n  filter: { property: \"agent_type\", string: { equals: \"custom_agent\" } },\n  sorts: [{ property: \"created_time\", direction: \"descending\" }],\n  page_size: 10\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/query-agents",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "Search agent names and descriptions using a case-insensitive substring match."
            },
            "filter": {
              "oneOf": [
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "id"
                        },
                        "id": {
                          "type": "object",
                          "properties": {
                            "equals": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "equals"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "agent_type"
                        },
                        "string": {
                          "type": "object",
                          "properties": {
                            "equals": {
                              "type": "string",
                              "enum": [
                                "notion_ai",
                                "custom_agent",
                                "autofill_custom_agent"
                              ]
                            }
                          },
                          "required": [
                            "equals"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "string"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "created_by"
                        },
                        "people": {
                          "type": "object",
                          "properties": {
                            "contains": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "contains"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "people"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "created_time"
                        },
                        "date": {
                          "type": "object",
                          "properties": {
                            "after": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "before": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "date"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "favorited"
                        },
                        "checkbox": {
                          "type": "object",
                          "properties": {
                            "equals": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "equals"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "checkbox"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "connections"
                        },
                        "mcp_server": {
                          "type": "object",
                          "properties": {
                            "contains": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "contains"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "mcp_server"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "status"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "in": {
                              "type": "array",
                              "minItems": 1,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "disabled",
                                  "deleted"
                                ]
                              }
                            }
                          },
                          "required": [
                            "in"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "model_mode"
                        },
                        "select": {
                          "type": "object",
                          "properties": {
                            "equals": {
                              "type": "string",
                              "enum": [
                                "auto",
                                "pinned"
                              ]
                            }
                          },
                          "required": [
                            "equals"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "select"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "agent_version"
                        },
                        "number": {
                          "type": "object",
                          "properties": {
                            "equals": {
                              "type": "integer",
                              "minimum": 1
                            }
                          },
                          "required": [
                            "equals"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "number"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "property": {
                          "type": "string",
                          "const": "last_run_at"
                        },
                        "date": {
                          "type": "object",
                          "properties": {
                            "after": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "before": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "property",
                        "date"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "and": {
                          "type": "array",
                          "minItems": 1,
                          "items": {
                            "oneOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "id"
                                      },
                                      "id": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "agent_type"
                                      },
                                      "string": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string",
                                            "enum": [
                                              "notion_ai",
                                              "custom_agent",
                                              "autofill_custom_agent"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "string"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "created_by"
                                      },
                                      "people": {
                                        "type": "object",
                                        "properties": {
                                          "contains": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "contains"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "people"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "created_time"
                                      },
                                      "date": {
                                        "type": "object",
                                        "properties": {
                                          "after": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "before": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "date"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "favorited"
                                      },
                                      "checkbox": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "checkbox"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "connections"
                                      },
                                      "mcp_server": {
                                        "type": "object",
                                        "properties": {
                                          "contains": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "contains"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "mcp_server"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "status"
                                      },
                                      "status": {
                                        "type": "object",
                                        "properties": {
                                          "in": {
                                            "type": "array",
                                            "minItems": 1,
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "active",
                                                "disabled",
                                                "deleted"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "in"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "model_mode"
                                      },
                                      "select": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "pinned"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "select"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "agent_version"
                                      },
                                      "number": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "integer",
                                            "minimum": 1
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "number"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "last_run_at"
                                      },
                                      "date": {
                                        "type": "object",
                                        "properties": {
                                          "after": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "before": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "date"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "and": {
                                        "type": "array",
                                        "minItems": 1,
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "id"
                                                },
                                                "id": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_type"
                                                },
                                                "string": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "notion_ai",
                                                        "custom_agent",
                                                        "autofill_custom_agent"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "string"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_by"
                                                },
                                                "people": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "people"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_time"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "favorited"
                                                },
                                                "checkbox": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "checkbox"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "connections"
                                                },
                                                "mcp_server": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "mcp_server"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "status"
                                                },
                                                "status": {
                                                  "type": "object",
                                                  "properties": {
                                                    "in": {
                                                      "type": "array",
                                                      "minItems": 1,
                                                      "items": {
                                                        "type": "string",
                                                        "enum": [
                                                          "active",
                                                          "disabled",
                                                          "deleted"
                                                        ]
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "in"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "status"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "model_mode"
                                                },
                                                "select": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "auto",
                                                        "pinned"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "select"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_version"
                                                },
                                                "number": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "integer",
                                                      "minimum": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "number"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "last_run_at"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "and"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "or": {
                                        "type": "array",
                                        "minItems": 1,
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "id"
                                                },
                                                "id": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_type"
                                                },
                                                "string": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "notion_ai",
                                                        "custom_agent",
                                                        "autofill_custom_agent"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "string"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_by"
                                                },
                                                "people": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "people"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_time"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "favorited"
                                                },
                                                "checkbox": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "checkbox"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "connections"
                                                },
                                                "mcp_server": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "mcp_server"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "status"
                                                },
                                                "status": {
                                                  "type": "object",
                                                  "properties": {
                                                    "in": {
                                                      "type": "array",
                                                      "minItems": 1,
                                                      "items": {
                                                        "type": "string",
                                                        "enum": [
                                                          "active",
                                                          "disabled",
                                                          "deleted"
                                                        ]
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "in"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "status"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "model_mode"
                                                },
                                                "select": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "auto",
                                                        "pinned"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "select"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_version"
                                                },
                                                "number": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "integer",
                                                      "minimum": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "number"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "last_run_at"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "or"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "and"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "or": {
                          "type": "array",
                          "minItems": 1,
                          "items": {
                            "oneOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "id"
                                      },
                                      "id": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "agent_type"
                                      },
                                      "string": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string",
                                            "enum": [
                                              "notion_ai",
                                              "custom_agent",
                                              "autofill_custom_agent"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "string"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "created_by"
                                      },
                                      "people": {
                                        "type": "object",
                                        "properties": {
                                          "contains": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "contains"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "people"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "created_time"
                                      },
                                      "date": {
                                        "type": "object",
                                        "properties": {
                                          "after": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "before": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "date"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "favorited"
                                      },
                                      "checkbox": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "checkbox"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "connections"
                                      },
                                      "mcp_server": {
                                        "type": "object",
                                        "properties": {
                                          "contains": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "contains"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "mcp_server"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "status"
                                      },
                                      "status": {
                                        "type": "object",
                                        "properties": {
                                          "in": {
                                            "type": "array",
                                            "minItems": 1,
                                            "items": {
                                              "type": "string",
                                              "enum": [
                                                "active",
                                                "disabled",
                                                "deleted"
                                              ]
                                            }
                                          }
                                        },
                                        "required": [
                                          "in"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "status"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "model_mode"
                                      },
                                      "select": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "string",
                                            "enum": [
                                              "auto",
                                              "pinned"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "select"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "agent_version"
                                      },
                                      "number": {
                                        "type": "object",
                                        "properties": {
                                          "equals": {
                                            "type": "integer",
                                            "minimum": 1
                                          }
                                        },
                                        "required": [
                                          "equals"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "number"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "property": {
                                        "type": "string",
                                        "const": "last_run_at"
                                      },
                                      "date": {
                                        "type": "object",
                                        "properties": {
                                          "after": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "before": {
                                            "type": "string",
                                            "format": "date-time"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "property",
                                      "date"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "and": {
                                        "type": "array",
                                        "minItems": 1,
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "id"
                                                },
                                                "id": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_type"
                                                },
                                                "string": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "notion_ai",
                                                        "custom_agent",
                                                        "autofill_custom_agent"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "string"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_by"
                                                },
                                                "people": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "people"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_time"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "favorited"
                                                },
                                                "checkbox": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "checkbox"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "connections"
                                                },
                                                "mcp_server": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "mcp_server"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "status"
                                                },
                                                "status": {
                                                  "type": "object",
                                                  "properties": {
                                                    "in": {
                                                      "type": "array",
                                                      "minItems": 1,
                                                      "items": {
                                                        "type": "string",
                                                        "enum": [
                                                          "active",
                                                          "disabled",
                                                          "deleted"
                                                        ]
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "in"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "status"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "model_mode"
                                                },
                                                "select": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "auto",
                                                        "pinned"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "select"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_version"
                                                },
                                                "number": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "integer",
                                                      "minimum": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "number"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "last_run_at"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "and"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "or": {
                                        "type": "array",
                                        "minItems": 1,
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "id"
                                                },
                                                "id": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_type"
                                                },
                                                "string": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "notion_ai",
                                                        "custom_agent",
                                                        "autofill_custom_agent"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "string"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_by"
                                                },
                                                "people": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "people"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "created_time"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "favorited"
                                                },
                                                "checkbox": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "boolean"
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "checkbox"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "connections"
                                                },
                                                "mcp_server": {
                                                  "type": "object",
                                                  "properties": {
                                                    "contains": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "contains"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "mcp_server"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "status"
                                                },
                                                "status": {
                                                  "type": "object",
                                                  "properties": {
                                                    "in": {
                                                      "type": "array",
                                                      "minItems": 1,
                                                      "items": {
                                                        "type": "string",
                                                        "enum": [
                                                          "active",
                                                          "disabled",
                                                          "deleted"
                                                        ]
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "in"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "status"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "model_mode"
                                                },
                                                "select": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "string",
                                                      "enum": [
                                                        "auto",
                                                        "pinned"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "select"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "agent_version"
                                                },
                                                "number": {
                                                  "type": "object",
                                                  "properties": {
                                                    "equals": {
                                                      "type": "integer",
                                                      "minimum": 1
                                                    }
                                                  },
                                                  "required": [
                                                    "equals"
                                                  ],
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "number"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "property": {
                                                  "type": "string",
                                                  "const": "last_run_at"
                                                },
                                                "date": {
                                                  "type": "object",
                                                  "properties": {
                                                    "after": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "before": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    }
                                                  },
                                                  "additionalProperties": false
                                                }
                                              },
                                              "required": [
                                                "property",
                                                "date"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "or"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "or"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              ],
              "description": "Filter agents by public properties, optionally combined with and/or."
            },
            "sorts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "created_time",
                      "last_run_at"
                    ],
                    "description": "Timestamp used to sort agents."
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "ascending",
                      "descending"
                    ],
                    "description": "Sort direction."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "property",
                  "direction"
                ]
              },
              "maxItems": 2,
              "minItems": 1,
              "description": "Ordered sort precedence. Defaults to created_time descending."
            },
            "start_cursor": {
              "type": "string",
              "description": "Opaque continuation cursor from the previous page."
            },
            "page_size": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of agents to return. Maximum: 100."
            },
            "verbose": {
              "type": "boolean",
              "description": "Whether to include inline instructions for each agent. Defaults to false."
            },
            "include_deleted": {
              "type": "boolean",
              "description": "Whether to include soft-deleted agents. Defaults to false."
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "type": {
                "type": "string",
                "const": "agent",
                "description": "Always `agent`"
              },
              "results": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "agent",
                          "description": "Always `agent`"
                        },
                        "id": {
                          "$ref": "#/components/schemas/idResponse"
                        },
                        "agent_type": {
                          "type": "string",
                          "enum": [
                            "custom_agent",
                            "autofill_custom_agent"
                          ],
                          "description": "What kind of agent this is: \"custom_agent\" is a standalone agent you chat with; \"autofill_custom_agent\" fills a database property."
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "instructions_page_id": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/idResponse"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "icon": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/pageIconResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "custom_agent_avatar",
                                  "description": "Type of icon. In this case, a custom agent avatar."
                                },
                                "custom_agent_avatar": {
                                  "type": "object",
                                  "properties": {
                                    "static_url": {
                                      "type": "string",
                                      "description": "The URL of the static custom agent avatar."
                                    },
                                    "animated_url": {
                                      "type": "string",
                                      "description": "The URL of the animated custom agent avatar."
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "static_url",
                                    "animated_url"
                                  ],
                                  "description": "The static and animated URLs for the agent avatar."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "custom_agent_avatar"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "model": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "const": "auto",
                                  "description": "Always `auto`"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "mode"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "const": "pinned",
                                  "description": "Always `pinned`"
                                },
                                "id": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The public model this agent maps to (e.g. \"claude-sonnet-5\"), or null for a pre-release / early-access model."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "mode",
                                "id"
                              ]
                            }
                          ],
                          "description": "The model selection: automatic, or pinned to a public model ID."
                        },
                        "connections": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "notion",
                                    "description": "Always `notion`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "type": "null"
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "page",
                                                  "description": "Always `page`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "database_property",
                                                  "description": "Always `database_property`"
                                                },
                                                "data_source_id": {
                                                  "type": "string"
                                                },
                                                "property_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "data_source_id",
                                                "property_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "agent",
                                                  "description": "Always `agent`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "workspace",
                                                  "description": "Always `workspace`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "owner_private_pages",
                                                  "description": "Always `owner_private_pages`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "web_search",
                                                  "description": "Always `web_search`"
                                                },
                                                "allowed_domains": {
                                                  "oneOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "maxItems": 100
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "Domains web search is restricted to, or null when unrestricted."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "allowed_domains"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "notion_help_docs_search",
                                                  "description": "Always `notion_help_docs_search`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Content roles (\"reader\" | \"comment_only\" | \"read_and_write\" | \"editor\") for scoped targets, or search verbs (\"allow\" | \"disallow\") for the search targets."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "slack",
                                    "description": "Always `slack`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "slack_workspace",
                                            "description": "Always `slack_workspace`"
                                          },
                                          "team_id": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "team_id"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The linked Slack workspace, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_channel",
                                                  "description": "Always `slack_channel`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_all_public_channels",
                                                  "description": "Always `slack_all_public_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_all_channels",
                                                  "description": "Always `slack_all_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Slack verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "discord",
                                    "description": "Always `discord`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "discord_server",
                                            "description": "Always `discord_server`"
                                          },
                                          "id": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "id"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The linked Discord server, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "discord_channel",
                                                  "description": "Always `discord_channel`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "discord_all_channels",
                                                  "description": "Always `discord_all_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Discord verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "mcp_server",
                                    "description": "Always `mcp_server`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "mcp_server",
                                            "description": "Always `mcp_server`"
                                          },
                                          "server_host": {
                                            "type": "string",
                                            "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "server_host"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "enabled_tools": {
                                    "oneOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "name",
                                            "title"
                                          ]
                                        },
                                        "maxItems": 100
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "run_tools_automatically": {
                                    "type": "object",
                                    "properties": {
                                      "read": {
                                        "type": "boolean",
                                        "description": "Whether read tool calls run without a confirmation step."
                                      },
                                      "write": {
                                        "type": "boolean",
                                        "description": "Whether write tool calls run without a confirmation step."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "read",
                                      "write"
                                    ],
                                    "description": "Whether read / write tool calls run without a confirmation step."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "enabled_tools",
                                  "run_tools_automatically"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "custom_mcp_server",
                                    "description": "Always `custom_mcp_server`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "mcp_server",
                                            "description": "Always `mcp_server`"
                                          },
                                          "server_host": {
                                            "type": "string",
                                            "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "server_host"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "enabled_tools": {
                                    "oneOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "name",
                                            "title"
                                          ]
                                        },
                                        "maxItems": 100
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "run_tools_automatically": {
                                    "type": "object",
                                    "properties": {
                                      "read": {
                                        "type": "boolean",
                                        "description": "Whether read tool calls run without a confirmation step."
                                      },
                                      "write": {
                                        "type": "boolean",
                                        "description": "Whether write tool calls run without a confirmation step."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "read",
                                      "write"
                                    ],
                                    "description": "Whether read / write tool calls run without a confirmation step."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "enabled_tools",
                                  "run_tools_automatically"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "asana",
                                      "box",
                                      "calendar",
                                      "computer",
                                      "confluence",
                                      "cursor",
                                      "files",
                                      "fs",
                                      "github",
                                      "gmail",
                                      "google_calendar",
                                      "google_drive",
                                      "google_drive_oauth",
                                      "gtm",
                                      "helpdocs",
                                      "images",
                                      "jira",
                                      "linear",
                                      "mail",
                                      "marketplace",
                                      "memory",
                                      "microsoft_teams",
                                      "microsoft_teams_oauth",
                                      "outlook",
                                      "salesforce",
                                      "search",
                                      "security",
                                      "sharepoint",
                                      "sharepoint_oauth",
                                      "skills",
                                      "system",
                                      "test",
                                      "web",
                                      "webhooks",
                                      "worker",
                                      "workers"
                                    ],
                                    "description": "The connector's machine name (e.g. \"github\", \"google_drive\")."
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The provider-side account identifier, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "type",
                                            "id"
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "The scopes granted on this target."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              }
                            ]
                          },
                          "maxItems": 100,
                          "description": "Integrations the agent is connected to (Notion, Slack, Discord, MCP servers, and other connectors), each with an account and per-target permissions."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled",
                            "deleted"
                          ],
                          "description": "\"active\" when the agent can run; \"disabled\" when it is paused (see pause_reason); \"deleted\" when it has been removed."
                        },
                        "pause_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "run_limit",
                                "credit_limit",
                                "runaway_credit_usage",
                                "workspace_credit_limit",
                                "failure_limit",
                                "mark_session_failed_autopause",
                                "disabled_from_workspace_settings",
                                "disabled_from_workspace_settings_but_resumable",
                                "disabled_from_api",
                                "disabled_from_agent_settings",
                                "disabled_due_to_no_members_with_access",
                                "disabled_due_to_lack_of_editors",
                                "disabled_by_notion",
                                "internal_error",
                                "needs_user_review",
                                "tool_unavailable"
                              ],
                              "description": "One of: `run_limit`, `credit_limit`, `runaway_credit_usage`, `workspace_credit_limit`, `failure_limit`, `mark_session_failed_autopause`, `disabled_from_workspace_settings`, `disabled_from_workspace_settings_but_resumable`, `disabled_from_api`, `disabled_from_agent_settings`, `disabled_due_to_no_members_with_access`, `disabled_due_to_lack_of_editors`, `disabled_by_notion`, `internal_error`, `needs_user_review`, `tool_unavailable`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Why the agent is paused when status is \"disabled\" (e.g. \"credit_limit\", \"disabled_from_workspace_settings\"); null when active."
                        },
                        "created_by": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "bot"
                                  ],
                                  "description": "One of: `user`, `bot`"
                                },
                                "id": {
                                  "$ref": "#/components/schemas/idResponse",
                                  "description": "The ID of the user or bot that created this agent."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "id"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "agent_version": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/idResponse",
                                  "description": "The ID of the published artifact."
                                },
                                "number": {
                                  "type": "number",
                                  "description": "The version number."
                                },
                                "published_at": {
                                  "type": "string",
                                  "description": "The ISO 8601 timestamp when this version was published."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id",
                                "number",
                                "published_at"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_time": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date and time when this agent was created."
                        },
                        "last_edited_time": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date and time when this agent was last edited."
                        },
                        "last_run_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "ISO 8601 timestamp of the agent's most recent run, null if it has never run, or \"hidden\" when the caller lacks edit access to the agent."
                        },
                        "credit_limit": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "const": "hidden",
                              "description": "Always `hidden`"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The per-agent credit limit that applies to this agent, null when uncapped, or \"hidden\" when the caller lacks full access to the agent. This is the effective limit computed at runtime, folding in both the agent's own limit and any workspace-admin default."
                        },
                        "triggers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Machine trigger type (e.g. \"notion.agent.mentioned\", \"recurrence\", \"slack.reaction.added\")."
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "Whether this trigger is currently enabled."
                              },
                              "schedule": {
                                "type": "object",
                                "properties": {
                                  "frequency": {
                                    "type": "string",
                                    "description": "Base cadence unit (\"hour\" | \"day\" | \"week\" | \"month\" | \"year\")."
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "description": "Multiplier on the frequency (e.g. every 2 weeks)."
                                  },
                                  "weekdays": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "maxItems": 100,
                                    "description": "Days of the week the schedule runs (e.g. \"monday\"). Present for weekly cadences and monthly weekday restrictions."
                                  },
                                  "monthdays": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "maxItems": 100,
                                    "description": "Days of the month the schedule runs. Present for monthly monthday restrictions."
                                  },
                                  "week_numbers": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "maxItems": 100,
                                    "description": "Week-of-month ordinals for a monthly weekday restriction (e.g. [2, 3] for the 2nd and 3rd occurrence); -1 means the last week."
                                  },
                                  "hour": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "description": "Hour of day (0–23) the schedule runs."
                                  },
                                  "minute": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "description": "Minute of the hour (0–59) the schedule runs."
                                  },
                                  "timezone": {
                                    "type": "string",
                                    "description": "IANA timezone (e.g. \"America/New_York\")."
                                  },
                                  "start_date": {
                                    "type": "string",
                                    "description": "ISO 8601 timestamp the schedule starts from."
                                  },
                                  "end": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "date",
                                            "description": "Always `date`"
                                          },
                                          "end_at": {
                                            "type": "string",
                                            "description": "ISO 8601 timestamp when the schedule stops."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "end_at"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "count",
                                            "description": "Always `count`"
                                          },
                                          "occurrences": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "description": "Number of occurrences after which the schedule stops."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "occurrences"
                                        ]
                                      }
                                    ],
                                    "description": "When the schedule stops, when it is bounded."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "frequency",
                                  "interval"
                                ],
                                "description": "Structured recurrence cadence. Present only for recurrence triggers."
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {},
                                "description": "Remaining per-type trigger configuration (e.g. watched channel ids, reaction config), keys in snake_case. Present only when the trigger carries such state."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "type",
                              "enabled"
                            ]
                          },
                          "maxItems": 100,
                          "description": "The agent's configured triggers, each with a machine type, an enabled flag, and a structured recurrence schedule when applicable."
                        },
                        "instructions": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The agent's inline instructions when verbose=true, or null when its instructions are stored on a page."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "agent_type",
                        "name",
                        "description",
                        "instructions_page_id",
                        "icon",
                        "model",
                        "connections",
                        "status",
                        "pause_reason",
                        "created_by",
                        "agent_version",
                        "created_time",
                        "last_edited_time",
                        "last_run_at",
                        "credit_limit",
                        "triggers"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "agent",
                          "description": "Always `agent`"
                        },
                        "id": {
                          "type": "string",
                          "const": "notion_ai",
                          "description": "Always `notion_ai`"
                        },
                        "agent_type": {
                          "type": "string",
                          "const": "notion_ai",
                          "description": "Always `notion_ai`"
                        },
                        "name": {
                          "type": "string",
                          "const": "Notion Agent",
                          "description": "Always `Notion Agent`"
                        },
                        "description": {
                          "type": "null"
                        },
                        "instructions_page_id": {
                          "type": "null"
                        },
                        "icon": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/pageIconResponse"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "custom_agent_avatar",
                                  "description": "Type of icon. In this case, a custom agent avatar."
                                },
                                "custom_agent_avatar": {
                                  "type": "object",
                                  "properties": {
                                    "static_url": {
                                      "type": "string",
                                      "description": "The URL of the static custom agent avatar."
                                    },
                                    "animated_url": {
                                      "type": "string",
                                      "description": "The URL of the animated custom agent avatar."
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "static_url",
                                    "animated_url"
                                  ],
                                  "description": "The static and animated URLs for the agent avatar."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "type",
                                "custom_agent_avatar"
                              ]
                            }
                          ]
                        },
                        "model": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "const": "auto",
                                  "description": "Always `auto`"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "mode"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "const": "pinned",
                                  "description": "Always `pinned`"
                                },
                                "id": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "The public model this agent maps to (e.g. \"claude-sonnet-5\"), or null for a pre-release / early-access model."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "mode",
                                "id"
                              ]
                            }
                          ]
                        },
                        "connections": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "notion",
                                    "description": "Always `notion`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "type": "null"
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "page",
                                                  "description": "Always `page`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "database_property",
                                                  "description": "Always `database_property`"
                                                },
                                                "data_source_id": {
                                                  "type": "string"
                                                },
                                                "property_id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "data_source_id",
                                                "property_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "agent",
                                                  "description": "Always `agent`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "workspace",
                                                  "description": "Always `workspace`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "owner_private_pages",
                                                  "description": "Always `owner_private_pages`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "web_search",
                                                  "description": "Always `web_search`"
                                                },
                                                "allowed_domains": {
                                                  "oneOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "maxItems": 100
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "Domains web search is restricted to, or null when unrestricted."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "allowed_domains"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "notion_help_docs_search",
                                                  "description": "Always `notion_help_docs_search`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Content roles (\"reader\" | \"comment_only\" | \"read_and_write\" | \"editor\") for scoped targets, or search verbs (\"allow\" | \"disallow\") for the search targets."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "slack",
                                    "description": "Always `slack`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "slack_workspace",
                                            "description": "Always `slack_workspace`"
                                          },
                                          "team_id": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "team_id"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The linked Slack workspace, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_channel",
                                                  "description": "Always `slack_channel`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_all_public_channels",
                                                  "description": "Always `slack_all_public_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "slack_all_channels",
                                                  "description": "Always `slack_all_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Slack verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "discord",
                                    "description": "Always `discord`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "discord_server",
                                            "description": "Always `discord_server`"
                                          },
                                          "id": {
                                            "type": "string"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "id"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The linked Discord server, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "discord_channel",
                                                  "description": "Always `discord_channel`"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "discord_all_channels",
                                                  "description": "Always `discord_all_channels`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type"
                                              ]
                                            }
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "Discord verbs granted on this target (\"read\" | \"write\" | \"reply_in_thread\" | \"react\")."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "mcp_server",
                                    "description": "Always `mcp_server`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "mcp_server",
                                            "description": "Always `mcp_server`"
                                          },
                                          "server_host": {
                                            "type": "string",
                                            "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "server_host"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "enabled_tools": {
                                    "oneOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "name",
                                            "title"
                                          ]
                                        },
                                        "maxItems": 100
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "run_tools_automatically": {
                                    "type": "object",
                                    "properties": {
                                      "read": {
                                        "type": "boolean",
                                        "description": "Whether read tool calls run without a confirmation step."
                                      },
                                      "write": {
                                        "type": "boolean",
                                        "description": "Whether write tool calls run without a confirmation step."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "read",
                                      "write"
                                    ],
                                    "description": "Whether read / write tool calls run without a confirmation step."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "enabled_tools",
                                  "run_tools_automatically"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "custom_mcp_server",
                                    "description": "Always `custom_mcp_server`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "mcp_server",
                                            "description": "Always `mcp_server`"
                                          },
                                          "server_host": {
                                            "type": "string",
                                            "description": "The MCP server host (never the full URL, which can carry credentials or private path components)."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "server_host"
                                        ]
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The MCP server host, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "enabled_tools": {
                                    "oneOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "name",
                                            "title"
                                          ]
                                        },
                                        "maxItems": 100
                                      },
                                      {
                                        "type": "string",
                                        "const": "hidden",
                                        "description": "Always `hidden`"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The tools the agent may call, null when all tools are enabled (including any the server adds later), or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "run_tools_automatically": {
                                    "type": "object",
                                    "properties": {
                                      "read": {
                                        "type": "boolean",
                                        "description": "Whether read tool calls run without a confirmation step."
                                      },
                                      "write": {
                                        "type": "boolean",
                                        "description": "Whether write tool calls run without a confirmation step."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "read",
                                      "write"
                                    ],
                                    "description": "Whether read / write tool calls run without a confirmation step."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "enabled_tools",
                                  "run_tools_automatically"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "asana",
                                      "box",
                                      "calendar",
                                      "computer",
                                      "confluence",
                                      "cursor",
                                      "files",
                                      "fs",
                                      "github",
                                      "gmail",
                                      "google_calendar",
                                      "google_drive",
                                      "google_drive_oauth",
                                      "gtm",
                                      "helpdocs",
                                      "images",
                                      "jira",
                                      "linear",
                                      "mail",
                                      "marketplace",
                                      "memory",
                                      "microsoft_teams",
                                      "microsoft_teams_oauth",
                                      "outlook",
                                      "salesforce",
                                      "search",
                                      "security",
                                      "sharepoint",
                                      "sharepoint_oauth",
                                      "skills",
                                      "system",
                                      "test",
                                      "web",
                                      "webhooks",
                                      "worker",
                                      "workers"
                                    ],
                                    "description": "The connector's machine name (e.g. \"github\", \"google_drive\")."
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "account": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The provider-side account identifier, null when none is linked, or \"hidden\" when the caller lacks edit access to the agent."
                                  },
                                  "permissions": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "target": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string"
                                            },
                                            "id": {
                                              "type": "string"
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "type",
                                            "id"
                                          ]
                                        },
                                        "scopes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "maxItems": 100,
                                          "description": "The scopes granted on this target."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "target",
                                        "scopes"
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "account",
                                  "permissions"
                                ]
                              }
                            ]
                          },
                          "maxItems": 100
                        },
                        "status": {
                          "type": "string",
                          "const": "active",
                          "description": "Always `active`"
                        },
                        "pause_reason": {
                          "type": "null"
                        },
                        "created_by": {
                          "type": "null"
                        },
                        "agent_version": {
                          "type": "null"
                        },
                        "created_time": {
                          "type": "null"
                        },
                        "last_edited_time": {
                          "type": "null"
                        },
                        "last_run_at": {
                          "type": "null"
                        },
                        "credit_limit": {
                          "type": "null"
                        },
                        "triggers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Machine trigger type (e.g. \"notion.agent.mentioned\", \"recurrence\", \"slack.reaction.added\")."
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "Whether this trigger is currently enabled."
                              },
                              "schedule": {
                                "type": "object",
                                "properties": {
                                  "frequency": {
                                    "type": "string",
                                    "description": "Base cadence unit (\"hour\" | \"day\" | \"week\" | \"month\" | \"year\")."
                                  },
                                  "interval": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "description": "Multiplier on the frequency (e.g. every 2 weeks)."
                                  },
                                  "weekdays": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "maxItems": 100,
                                    "description": "Days of the week the schedule runs (e.g. \"monday\"). Present for weekly cadences and monthly weekday restrictions."
                                  },
                                  "monthdays": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "maxItems": 100,
                                    "description": "Days of the month the schedule runs. Present for monthly monthday restrictions."
                                  },
                                  "week_numbers": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer"
                                    },
                                    "maxItems": 100,
                                    "description": "Week-of-month ordinals for a monthly weekday restriction (e.g. [2, 3] for the 2nd and 3rd occurrence); -1 means the last week."
                                  },
                                  "hour": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "description": "Hour of day (0–23) the schedule runs."
                                  },
                                  "minute": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "description": "Minute of the hour (0–59) the schedule runs."
                                  },
                                  "timezone": {
                                    "type": "string",
                                    "description": "IANA timezone (e.g. \"America/New_York\")."
                                  },
                                  "start_date": {
                                    "type": "string",
                                    "description": "ISO 8601 timestamp the schedule starts from."
                                  },
                                  "end": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "date",
                                            "description": "Always `date`"
                                          },
                                          "end_at": {
                                            "type": "string",
                                            "description": "ISO 8601 timestamp when the schedule stops."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "end_at"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "count",
                                            "description": "Always `count`"
                                          },
                                          "occurrences": {
                                            "type": "integer",
                                            "minimum": 0,
                                            "description": "Number of occurrences after which the schedule stops."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "occurrences"
                                        ]
                                      }
                                    ],
                                    "description": "When the schedule stops, when it is bounded."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "frequency",
                                  "interval"
                                ],
                                "description": "Structured recurrence cadence. Present only for recurrence triggers."
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {},
                                "description": "Remaining per-type trigger configuration (e.g. watched channel ids, reaction config), keys in snake_case. Present only when the trigger carries such state."
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "type",
                              "enabled"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "agent_type",
                        "name",
                        "description",
                        "instructions_page_id",
                        "icon",
                        "model",
                        "connections",
                        "status",
                        "pause_reason",
                        "created_by",
                        "agent_version",
                        "created_time",
                        "last_edited_time",
                        "last_run_at",
                        "credit_limit",
                        "triggers"
                      ]
                    }
                  ]
                },
                "maxItems": 100
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "title": "Cursor",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "type",
              "results",
              "has_more",
              "next_cursor"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/async_tasks/{task_id}

Retrieve an async task

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve an async task",
  "operationId": "retrieve-async-task",
  "x-notion-sdk-method": "asyncTasks.retrieve",
  "tags": [
    "Async tasks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.asyncTasks.retrieve({\n  task_id: \"task_abc123\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-async-task",
  "parameters": [
    {
      "name": "task_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "examples": [
          "task_abc123"
        ],
        "description": "The ID of the async task to retrieve."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "object",
                  "id",
                  "status",
                  "status_url",
                  "created_time",
                  "operation",
                  "poll_after_seconds"
                ],
                "additionalProperties": false,
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "async_task"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "status_url": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "operation": {
                    "type": "object",
                    "required": [
                      "surface",
                      "name"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "rest",
                          "mcp"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "running",
                      "retrying"
                    ]
                  },
                  "poll_after_seconds": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "object",
                  "id",
                  "status",
                  "status_url",
                  "created_time",
                  "operation",
                  "result"
                ],
                "additionalProperties": false,
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "async_task"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "status_url": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "operation": {
                    "type": "object",
                    "required": [
                      "surface",
                      "name"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "rest",
                          "mcp"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "const": "succeeded"
                  },
                  "result": {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/components/schemas/publicApiAsyncTaskStatusResultJsonValue"
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "object",
                  "id",
                  "status",
                  "status_url",
                  "created_time",
                  "operation",
                  "error"
                ],
                "additionalProperties": false,
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "async_task"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "status_url": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "operation": {
                    "type": "object",
                    "required": [
                      "surface",
                      "name"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "rest",
                          "mcp"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "const": "failed"
                  },
                  "error": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "invalid_json"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "invalid_request_url"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "invalid_request"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "missing_version"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "invalid_beta"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "validation_error"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 401
                          },
                          "code": {
                            "type": "string",
                            "const": "unauthorized"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 403
                          },
                          "code": {
                            "type": "string",
                            "const": "restricted_resource"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 404
                          },
                          "code": {
                            "type": "string",
                            "const": "object_not_found"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 404
                          },
                          "code": {
                            "type": "string",
                            "const": "directory_not_found"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 429
                          },
                          "code": {
                            "type": "string",
                            "const": "rate_limited"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 529
                          },
                          "code": {
                            "type": "string",
                            "const": "service_overload"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 500
                          },
                          "code": {
                            "type": "string",
                            "const": "internal_server_error"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 503
                          },
                          "code": {
                            "type": "string",
                            "const": "service_unavailable"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 504
                          },
                          "code": {
                            "type": "string",
                            "const": "gateway_timeout"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 409
                          },
                          "code": {
                            "type": "string",
                            "const": "conflict_error"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 409
                          },
                          "code": {
                            "type": "string",
                            "const": "idempotency_key_reused"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 406
                          },
                          "code": {
                            "type": "string",
                            "const": "row_limit_exceeded"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 403
                          },
                          "code": {
                            "type": "string",
                            "const": "status_change_not_allowed"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 409
                          },
                          "code": {
                            "type": "string",
                            "const": "agent_deleted"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 400
                          },
                          "code": {
                            "type": "string",
                            "const": "invalid_credit_limit"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 403
                          },
                          "code": {
                            "type": "string",
                            "const": "workspace_credits_exhausted"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "object",
                          "status",
                          "code",
                          "message"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "object": {
                            "type": "string",
                            "const": "error"
                          },
                          "status": {
                            "type": "integer",
                            "const": 403
                          },
                          "code": {
                            "type": "string",
                            "const": "agent_credit_limit_reached"
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additional_data": {
                            "type": "object",
                            "additionalProperties": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

DELETE /v1/blocks/{block_id}

Delete a block

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Delete a block",
  "operationId": "delete-a-block",
  "tags": [
    "Blocks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.delete({\n  block_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/delete-a-block",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/partialBlockObjectResponse"
              },
              {
                "$ref": "#/components/schemas/blockObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/blocks/{block_id}

Retrieve a block

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a block",
  "operationId": "retrieve-a-block",
  "tags": [
    "Blocks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.retrieve({\n  block_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-a-block",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/partialBlockObjectResponse"
              },
              {
                "$ref": "#/components/schemas/blockObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/blocks/{block_id}

Update a block

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a block",
  "operationId": "update-a-block",
  "tags": [
    "Blocks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.update({\n  block_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\",\n  paragraph: {\n    rich_text: [{ text: { content: \"Updated paragraph text\" } }]\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-a-block",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "title": "Embed",
                  "type": "object",
                  "properties": {
                    "embed": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/updateMediaContentWithUrlAndCaptionRequest"
                        },
                        {
                          "$ref": "#/components/schemas/updateEmbedFileUploadRequest"
                        }
                      ]
                    },
                    "type": {
                      "type": "string",
                      "const": "embed"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "embed"
                  ]
                },
                {
                  "title": "Bookmark",
                  "type": "object",
                  "properties": {
                    "bookmark": {
                      "$ref": "#/components/schemas/updateMediaContentWithUrlAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "bookmark"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "bookmark"
                  ]
                },
                {
                  "title": "Image",
                  "type": "object",
                  "properties": {
                    "image": {
                      "$ref": "#/components/schemas/updateMediaContentWithFileAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "image"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "image"
                  ]
                },
                {
                  "title": "Video",
                  "type": "object",
                  "properties": {
                    "video": {
                      "$ref": "#/components/schemas/updateMediaContentWithFileAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "video"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "video"
                  ]
                },
                {
                  "title": "Pdf",
                  "type": "object",
                  "properties": {
                    "pdf": {
                      "$ref": "#/components/schemas/updateMediaContentWithFileAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "pdf"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "pdf"
                  ]
                },
                {
                  "title": "File",
                  "type": "object",
                  "properties": {
                    "file": {
                      "$ref": "#/components/schemas/updateMediaContentWithFileNameAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "file"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "file"
                  ]
                },
                {
                  "title": "Audio",
                  "type": "object",
                  "properties": {
                    "audio": {
                      "$ref": "#/components/schemas/updateMediaContentWithFileAndCaptionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "audio"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "audio"
                  ]
                },
                {
                  "title": "Code",
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "object",
                      "properties": {
                        "rich_text": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/richTextItemRequest"
                          },
                          "maxItems": 100
                        },
                        "language": {
                          "$ref": "#/components/schemas/languageRequest"
                        },
                        "caption": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/richTextItemRequest"
                          },
                          "maxItems": 100
                        }
                      },
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "code"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "code"
                  ]
                },
                {
                  "title": "Equation",
                  "type": "object",
                  "properties": {
                    "equation": {
                      "$ref": "#/components/schemas/contentWithExpressionRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "equation"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "equation"
                  ]
                },
                {
                  "title": "Divider",
                  "type": "object",
                  "properties": {
                    "divider": {
                      "$ref": "#/components/schemas/emptyObject"
                    },
                    "type": {
                      "type": "string",
                      "const": "divider"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "divider"
                  ]
                },
                {
                  "title": "Breadcrumb",
                  "type": "object",
                  "properties": {
                    "breadcrumb": {
                      "$ref": "#/components/schemas/emptyObject"
                    },
                    "type": {
                      "type": "string",
                      "const": "breadcrumb"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "breadcrumb"
                  ]
                },
                {
                  "title": "Tab",
                  "type": "object",
                  "properties": {
                    "tab": {
                      "$ref": "#/components/schemas/emptyObject"
                    },
                    "type": {
                      "type": "string",
                      "const": "tab"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "tab"
                  ]
                },
                {
                  "title": "Table Of Contents",
                  "type": "object",
                  "properties": {
                    "table_of_contents": {
                      "type": "object",
                      "properties": {
                        "color": {
                          "$ref": "#/components/schemas/apiColor"
                        }
                      },
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "table_of_contents"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "table_of_contents"
                  ]
                },
                {
                  "title": "Link To Page",
                  "type": "object",
                  "properties": {
                    "link_to_page": {
                      "anyOf": [
                        {
                          "title": "Page Id",
                          "type": "object",
                          "properties": {
                            "page_id": {
                              "$ref": "#/components/schemas/idRequest"
                            },
                            "type": {
                              "type": "string",
                              "const": "page_id"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "page_id"
                          ]
                        },
                        {
                          "title": "Database Id",
                          "type": "object",
                          "properties": {
                            "database_id": {
                              "$ref": "#/components/schemas/idRequest"
                            },
                            "type": {
                              "type": "string",
                              "const": "database_id"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "database_id"
                          ]
                        },
                        {
                          "title": "Comment Id",
                          "type": "object",
                          "properties": {
                            "comment_id": {
                              "$ref": "#/components/schemas/idRequest"
                            },
                            "type": {
                              "type": "string",
                              "const": "comment_id"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "comment_id"
                          ]
                        }
                      ]
                    },
                    "type": {
                      "type": "string",
                      "const": "link_to_page"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "link_to_page"
                  ]
                },
                {
                  "title": "Table Row",
                  "type": "object",
                  "properties": {
                    "table_row": {
                      "$ref": "#/components/schemas/contentWithTableRowRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "table_row"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "table_row"
                  ]
                },
                {
                  "title": "Heading 1",
                  "type": "object",
                  "properties": {
                    "heading_1": {
                      "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "heading_1"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "heading_1"
                  ]
                },
                {
                  "title": "Heading 2",
                  "type": "object",
                  "properties": {
                    "heading_2": {
                      "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "heading_2"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "heading_2"
                  ]
                },
                {
                  "title": "Heading 3",
                  "type": "object",
                  "properties": {
                    "heading_3": {
                      "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "heading_3"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "heading_3"
                  ]
                },
                {
                  "title": "Heading 4",
                  "type": "object",
                  "properties": {
                    "heading_4": {
                      "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "heading_4"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "heading_4"
                  ]
                },
                {
                  "title": "Paragraph",
                  "type": "object",
                  "properties": {
                    "paragraph": {
                      "$ref": "#/components/schemas/contentWithRichTextColorAndIconUpdateRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "paragraph"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "paragraph"
                  ]
                },
                {
                  "title": "Bulleted List Item",
                  "type": "object",
                  "properties": {
                    "bulleted_list_item": {
                      "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "bulleted_list_item"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "bulleted_list_item"
                  ]
                },
                {
                  "title": "Numbered List Item",
                  "type": "object",
                  "properties": {
                    "numbered_list_item": {
                      "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "numbered_list_item"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "numbered_list_item"
                  ]
                },
                {
                  "title": "Quote",
                  "type": "object",
                  "properties": {
                    "quote": {
                      "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "quote"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "quote"
                  ]
                },
                {
                  "title": "To Do",
                  "type": "object",
                  "properties": {
                    "to_do": {
                      "type": "object",
                      "properties": {
                        "rich_text": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/richTextItemRequest"
                          },
                          "maxItems": 100
                        },
                        "checked": {
                          "type": "boolean"
                        },
                        "color": {
                          "$ref": "#/components/schemas/apiColor"
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "const": "to_do"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "to_do"
                  ]
                },
                {
                  "title": "Toggle",
                  "type": "object",
                  "properties": {
                    "toggle": {
                      "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "toggle"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "toggle"
                  ]
                },
                {
                  "title": "Template",
                  "type": "object",
                  "properties": {
                    "template": {
                      "$ref": "#/components/schemas/contentWithRichTextRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "template"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "template"
                  ]
                },
                {
                  "title": "Callout",
                  "type": "object",
                  "properties": {
                    "callout": {
                      "type": "object",
                      "properties": {
                        "rich_text": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/richTextItemRequest"
                          },
                          "maxItems": 100
                        },
                        "icon": {
                          "$ref": "#/components/schemas/pageIconRequest"
                        },
                        "color": {
                          "$ref": "#/components/schemas/apiColor"
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "const": "callout"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "callout"
                  ]
                },
                {
                  "title": "Synced Block",
                  "type": "object",
                  "properties": {
                    "synced_block": {
                      "type": "object",
                      "properties": {
                        "synced_from": {
                          "title": "Block Id",
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "block_id": {
                              "$ref": "#/components/schemas/idRequest"
                            },
                            "type": {
                              "type": "string",
                              "const": "block_id"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "block_id"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "synced_from"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "const": "synced_block"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "synced_block"
                  ]
                },
                {
                  "title": "Table",
                  "type": "object",
                  "properties": {
                    "table": {
                      "type": "object",
                      "properties": {
                        "has_column_header": {
                          "type": "boolean"
                        },
                        "has_row_header": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "table"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "table"
                  ]
                },
                {
                  "title": "Column",
                  "type": "object",
                  "properties": {
                    "column": {
                      "type": "object",
                      "properties": {
                        "width_ratio": {
                          "description": "Ratio between 0 and 1 of the width of this column relative to all columns in the list. If not provided, uses an equal width.",
                          "examples": [
                            0.5
                          ],
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "exclusiveMaximum": 1
                        }
                      },
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "column"
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "column"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "in_trash": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/partialBlockObjectResponse"
              },
              {
                "$ref": "#/components/schemas/blockObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/blocks/{block_id}/children

Retrieve block children

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve block children",
  "operationId": "get-block-children",
  "tags": [
    "Blocks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.children.list({\n  block_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\",\n  start_cursor: undefined,\n  page_size: 50\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/get-block-children",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "number"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "title": "Block",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "block"
              },
              "block": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "object": {
                "type": "string",
                "const": "list"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/partialBlockObjectResponse"
                    },
                    {
                      "$ref": "#/components/schemas/blockObjectResponse"
                    }
                  ]
                }
              }
            },
            "required": [
              "type",
              "block",
              "object",
              "next_cursor",
              "has_more",
              "results"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/blocks/{block_id}/children

Append block children

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Append block children",
  "operationId": "patch-block-children",
  "tags": [
    "Blocks"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.children.append({\n  block_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\",\n  children: [\n    {\n      type: \"paragraph\",\n      paragraph: {\n        rich_text: [{ text: { content: \"Hello, world!\" } }]\n      }\n    }\n  ]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/patch-block-children",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequest"
              },
              "maxItems": 100
            },
            "position": {
              "$ref": "#/components/schemas/contentPositionSchema"
            }
          },
          "additionalProperties": false,
          "required": [
            "children"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "title": "Block",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "block"
              },
              "block": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "object": {
                "type": "string",
                "const": "list"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/partialBlockObjectResponse"
                    },
                    {
                      "$ref": "#/components/schemas/blockObjectResponse"
                    }
                  ]
                }
              }
            },
            "required": [
              "type",
              "block",
              "object",
              "next_cursor",
              "has_more",
              "results"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/blocks/meeting_notes

Create a meeting note

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a meeting note",
  "operationId": "create-meeting-note",
  "tags": [
    "Meeting notes"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.meetingNotes.create({\n  source: {\n    type: \"file_upload\",\n    file_upload_id: \"a02fc1d3-db8b-45c5-a222-27595b15aea7\"\n  },\n  parent: {\n    type: \"page_id\",\n    page_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\"\n  },\n  title: \"Weekly sync\",\n  language: \"en\",\n  options: {\n    kickoff_summary: true\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-meeting-note",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Title for the meeting note."
                },
                "language": {
                  "type": "string",
                  "enum": [
                    "auto",
                    "en",
                    "zh-CN",
                    "zh-TW",
                    "es",
                    "fr",
                    "de",
                    "ja",
                    "ko",
                    "pt",
                    "ru",
                    "th",
                    "vi",
                    "id",
                    "da",
                    "fi",
                    "no",
                    "nl",
                    "it",
                    "sv",
                    "ar",
                    "he",
                    "pl"
                  ],
                  "description": "Language hint for transcription. Defaults to automatic detection."
                },
                "options": {
                  "type": "object",
                  "properties": {
                    "kickoff_summary": {
                      "type": "boolean",
                      "description": "Whether to start summary generation after transcription."
                    }
                  },
                  "additionalProperties": false,
                  "description": "Optional processing settings."
                }
              }
            },
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "file_upload",
                          "description": "Always \"file_upload\"."
                        },
                        "file_upload_id": {
                          "$ref": "#/components/schemas/idRequest",
                          "description": "ID of a completed public API file upload."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "file_upload_id"
                      ],
                      "description": "Audio or video source for the meeting note."
                    },
                    "parent": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "page_id",
                          "description": "Always \"page_id\"."
                        },
                        "page_id": {
                          "$ref": "#/components/schemas/idRequest",
                          "description": "Page ID where the meeting note should be created. Required for file_upload sources."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "page_id"
                      ],
                      "description": "Parent page for the new meeting note."
                    }
                  },
                  "required": [
                    "source",
                    "parent"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "block",
                          "description": "Always \"block\"."
                        },
                        "block_id": {
                          "$ref": "#/components/schemas/idRequest",
                          "description": "ID of an existing audio, video, or file block."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "block_id"
                      ],
                      "description": "Audio or video source for the meeting note."
                    },
                    "parent": {
                      "not": {},
                      "description": "Not accepted for block sources."
                    }
                  },
                  "required": [
                    "source"
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "block",
                    "description": "Always \"block\"."
                  },
                  "id": {
                    "$ref": "#/components/schemas/idResponse",
                    "description": "The ID of the meeting note block."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "object",
                  "id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "const": "block",
                    "description": "Always \"block\"."
                  },
                  "id": {
                    "$ref": "#/components/schemas/idResponse",
                    "description": "The ID of the meeting note block."
                  },
                  "type": {
                    "type": "string",
                    "const": "meeting_notes",
                    "description": "Always \"meeting_notes\"."
                  },
                  "meeting_notes": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/richTextItemResponse"
                        },
                        "maxItems": 100,
                        "description": "Title of the meeting note as rich text."
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "transcription_not_started",
                          "transcription_paused",
                          "transcription_in_progress",
                          "transcription_failed",
                          "summary_in_progress",
                          "notes_ready"
                        ],
                        "description": "Current processing status of the meeting note transcription."
                      },
                      "children": {
                        "type": "object",
                        "properties": {
                          "summary_block_id": {
                            "$ref": "#/components/schemas/idResponse",
                            "description": "Block ID of the AI summary tab."
                          },
                          "notes_block_id": {
                            "$ref": "#/components/schemas/idResponse",
                            "description": "Block ID of the meeting notes tab."
                          },
                          "transcript_block_id": {
                            "$ref": "#/components/schemas/idResponse",
                            "description": "Block ID of the transcript tab."
                          }
                        },
                        "additionalProperties": false,
                        "description": "Block IDs for each tab (summary, notes, transcript)."
                      },
                      "calendar_event": {
                        "type": "object",
                        "properties": {
                          "start_time": {
                            "type": "string",
                            "description": "ISO-8601 start time of the calendar event."
                          },
                          "end_time": {
                            "type": "string",
                            "description": "ISO-8601 end time of the calendar event."
                          },
                          "attendees": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/idResponse"
                            },
                            "maxItems": 100,
                            "description": "List of attendee user IDs."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "start_time",
                          "end_time"
                        ],
                        "description": "Calendar event metadata associated with this meeting note."
                      },
                      "recording": {
                        "type": "object",
                        "properties": {
                          "start_time": {
                            "type": "string",
                            "description": "ISO-8601 timestamp when the recording started."
                          },
                          "end_time": {
                            "type": "string",
                            "description": "ISO-8601 timestamp when the recording ended."
                          }
                        },
                        "additionalProperties": false,
                        "description": "Start and end times of the actual recording."
                      }
                    },
                    "additionalProperties": false,
                    "description": "Meeting note content fields."
                  },
                  "created_time": {
                    "type": "string",
                    "description": "ISO-8601 timestamp when this meeting note was created."
                  },
                  "last_edited_time": {
                    "type": "string",
                    "description": "ISO-8601 timestamp when this meeting note was last edited."
                  },
                  "created_by": {
                    "$ref": "#/components/schemas/partialUserObjectResponse",
                    "description": "User who created this meeting note."
                  },
                  "last_edited_by": {
                    "$ref": "#/components/schemas/partialUserObjectResponse",
                    "description": "User who last edited this meeting note."
                  },
                  "has_children": {
                    "type": "boolean",
                    "description": "Whether this block has child blocks."
                  },
                  "in_trash": {
                    "type": "boolean",
                    "description": "Whether this meeting note is in the trash."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "object",
                  "id",
                  "type",
                  "meeting_notes",
                  "created_time",
                  "last_edited_time",
                  "created_by",
                  "last_edited_by",
                  "has_children",
                  "in_trash"
                ]
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/blocks/meeting_notes/query

Query meeting notes

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Query meeting notes",
  "operationId": "query-meeting-notes",
  "tags": [
    "Meeting notes"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.blocks.meetingNotes.query({\n  filter: {\n    operator: \"and\",\n    filters: [\n      {\n        property: \"title\",\n        filter: {\n          operator: \"string_contains\",\n          value: {\n            type: \"exact\",\n            value: \"Weekly sync\"\n          }\n        }\n      },\n      {\n        property: \"attendees\",\n        filter: {\n          operator: \"is_not_empty\"\n        }\n      }\n    ]\n  },\n  sort: [\n    {\n      property: \"created_time\",\n      direction: \"descending\"\n    }\n  ],\n  limit: 10\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/query-meeting-notes",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "filter": {
              "type": "object",
              "properties": {
                "operator": {
                  "type": "string",
                  "enum": [
                    "and",
                    "or"
                  ],
                  "description": "Operator for combinator filters."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "property": {
                            "type": "string",
                            "enum": [
                              "title",
                              "attendees",
                              "created_time",
                              "created_by",
                              "last_edited_time",
                              "last_edited_by",
                              "notion://meeting_notes/attendees"
                            ],
                            "description": "Which meeting-note property to filter on. Prefer the short names; the schema URI form is accepted for compatibility."
                          },
                          "filter": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "string_is",
                                      "string_is_not",
                                      "string_contains",
                                      "string_does_not_contain",
                                      "string_starts_with",
                                      "string_ends_with"
                                    ],
                                    "description": "How to compare the text."
                                  },
                                  "value": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "exact",
                                        "description": "Always `exact`"
                                      },
                                      "value": {
                                        "type": "string",
                                        "description": "The literal text the operator compares against."
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "type",
                                      "value"
                                    ],
                                    "description": "The text to compare against."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "operator",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "person_contains",
                                      "person_does_not_contain"
                                    ],
                                    "description": "Whether the property must contain the people listed."
                                  },
                                  "value": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "exact",
                                              "description": "Always `exact`"
                                            },
                                            "value": {
                                              "type": "object",
                                              "properties": {
                                                "table": {
                                                  "type": "string",
                                                  "const": "notion_user",
                                                  "description": "Always `notion_user`"
                                                },
                                                "id": {
                                                  "type": "string",
                                                  "examples": [
                                                    "3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e",
                                                    "user://3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e"
                                                  ],
                                                  "description": "The user's ID, as a UUID or the `user://<uuid>` form returned by user search."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "table",
                                                "id"
                                              ],
                                              "description": "Pointer to the Notion user to match."
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "type",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "relative",
                                              "description": "Always `relative`"
                                            },
                                            "value": {
                                              "type": "string",
                                              "const": "me",
                                              "description": "Always `me`"
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "type",
                                            "value"
                                          ]
                                        }
                                      ]
                                    },
                                    "maxItems": 100,
                                    "description": "The people to compare against."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "operator",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "date_is",
                                      "date_is_before",
                                      "date_is_after",
                                      "date_is_on_or_before",
                                      "date_is_on_or_after"
                                    ],
                                    "description": "How to compare the date."
                                  },
                                  "value": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "relative",
                                            "description": "Always `relative`"
                                          },
                                          "value": {
                                            "type": "string",
                                            "enum": [
                                              "today",
                                              "tomorrow",
                                              "yesterday",
                                              "one_week_ago",
                                              "one_week_from_now",
                                              "one_month_ago",
                                              "one_month_from_now"
                                            ],
                                            "description": "One of: `today`, `tomorrow`, `yesterday`, `one_week_ago`, `one_week_from_now`, `one_month_ago`, `one_month_from_now`"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "exact",
                                            "description": "Always `exact`"
                                          },
                                          "value": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "date",
                                                    "description": "Always `date`"
                                                  },
                                                  "start_date": {
                                                    "type": "string",
                                                    "examples": [
                                                      "1990-12-28"
                                                    ],
                                                    "format": "date",
                                                    "description": "The calendar date as an ISO 8601 date string."
                                                  }
                                                },
                                                "additionalProperties": false,
                                                "required": [
                                                  "type",
                                                  "start_date"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "datetime",
                                                    "description": "Always `datetime`"
                                                  },
                                                  "start_date": {
                                                    "type": "string",
                                                    "examples": [
                                                      "1990-12-28"
                                                    ],
                                                    "format": "date",
                                                    "description": "The calendar date as an ISO 8601 date string."
                                                  },
                                                  "start_time": {
                                                    "type": "string",
                                                    "examples": [
                                                      "09:30"
                                                    ],
                                                    "description": "The time of day in 24-hour HH:MM format."
                                                  },
                                                  "time_zone": {
                                                    "type": "string",
                                                    "examples": [
                                                      "America/Los_Angeles"
                                                    ],
                                                    "description": "The IANA time zone name the time is interpreted in."
                                                  }
                                                },
                                                "additionalProperties": false,
                                                "required": [
                                                  "type",
                                                  "start_date",
                                                  "start_time",
                                                  "time_zone"
                                                ]
                                              }
                                            ],
                                            "description": "Use the is_empty operator to match an unset date."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value"
                                        ]
                                      }
                                    ],
                                    "description": "The date to compare against."
                                  },
                                  "use_end": {
                                    "type": "boolean",
                                    "description": "Compare against the end of a date range rather than its start."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "operator",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "date_is_within",
                                      "date_is_relative_to"
                                    ],
                                    "description": "How to compare the date against the range."
                                  },
                                  "value": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "relative",
                                            "description": "Always `relative`"
                                          },
                                          "value": {
                                            "type": "string",
                                            "const": "custom",
                                            "description": "Always `custom`"
                                          },
                                          "direction": {
                                            "type": "string",
                                            "enum": [
                                              "past",
                                              "future"
                                            ],
                                            "description": "Whether the window runs backwards or forwards from now."
                                          },
                                          "unit": {
                                            "type": "string",
                                            "enum": [
                                              "year",
                                              "month",
                                              "week",
                                              "day"
                                            ],
                                            "description": "One of: `year`, `month`, `week`, `day`"
                                          },
                                          "count": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "description": "How many units wide the window is."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value",
                                          "direction",
                                          "unit",
                                          "count"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "relative",
                                            "description": "Always `relative`"
                                          },
                                          "value": {
                                            "type": "string",
                                            "const": "surrounding",
                                            "description": "Always `surrounding`"
                                          },
                                          "unit": {
                                            "type": "string",
                                            "enum": [
                                              "year",
                                              "month",
                                              "week",
                                              "day"
                                            ],
                                            "description": "One of: `year`, `month`, `week`, `day`"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value",
                                          "unit"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "relative",
                                            "description": "Always `relative`"
                                          },
                                          "value": {
                                            "type": "string",
                                            "enum": [
                                              "this_week",
                                              "the_past_week",
                                              "the_past_month",
                                              "the_past_year",
                                              "the_next_week",
                                              "the_next_month",
                                              "the_next_year"
                                            ],
                                            "description": "One of: `this_week`, `the_past_week`, `the_past_month`, `the_past_year`, `the_next_week`, `the_next_month`, `the_next_year`"
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "exact",
                                            "description": "Always `exact`"
                                          },
                                          "value": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "const": "daterange",
                                                "description": "Always `daterange`"
                                              },
                                              "start_date": {
                                                "type": "string",
                                                "examples": [
                                                  "1990-12-28"
                                                ],
                                                "format": "date",
                                                "description": "Inclusive start of the range as an ISO 8601 date string, if any."
                                              },
                                              "end_date": {
                                                "type": "string",
                                                "examples": [
                                                  "1991-01-04"
                                                ],
                                                "format": "date",
                                                "description": "Inclusive end of the range as an ISO 8601 date string, if any."
                                              }
                                            },
                                            "additionalProperties": false,
                                            "required": [
                                              "type"
                                            ],
                                            "description": "Use the is_empty operator to match an unset date."
                                          }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                          "type",
                                          "value"
                                        ]
                                      }
                                    ],
                                    "description": "The range to compare against."
                                  },
                                  "use_end": {
                                    "type": "boolean",
                                    "description": "Compare against the end of a date range rather than its start."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "operator",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      "is_empty",
                                      "is_not_empty"
                                    ],
                                    "description": "Whether the property must be empty or set."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "operator"
                                ]
                              }
                            ],
                            "description": "The comparison to apply. Use the arm matching the property's type."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "property",
                          "filter"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "operator": {
                            "type": "string",
                            "enum": [
                              "and",
                              "or"
                            ],
                            "description": "Whether every child must match, or any of them."
                          },
                          "filters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "property": {
                                  "type": "string",
                                  "enum": [
                                    "title",
                                    "attendees",
                                    "created_time",
                                    "created_by",
                                    "last_edited_time",
                                    "last_edited_by",
                                    "notion://meeting_notes/attendees"
                                  ],
                                  "description": "Which meeting-note property to filter on. Prefer the short names; the schema URI form is accepted for compatibility."
                                },
                                "filter": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "enum": [
                                            "string_is",
                                            "string_is_not",
                                            "string_contains",
                                            "string_does_not_contain",
                                            "string_starts_with",
                                            "string_ends_with"
                                          ],
                                          "description": "How to compare the text."
                                        },
                                        "value": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "exact",
                                              "description": "Always `exact`"
                                            },
                                            "value": {
                                              "type": "string",
                                              "description": "The literal text the operator compares against."
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "type",
                                            "value"
                                          ],
                                          "description": "The text to compare against."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "operator",
                                        "value"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "enum": [
                                            "person_contains",
                                            "person_does_not_contain"
                                          ],
                                          "description": "Whether the property must contain the people listed."
                                        },
                                        "value": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "exact",
                                                    "description": "Always `exact`"
                                                  },
                                                  "value": {
                                                    "type": "object",
                                                    "properties": {
                                                      "table": {
                                                        "type": "string",
                                                        "const": "notion_user",
                                                        "description": "Always `notion_user`"
                                                      },
                                                      "id": {
                                                        "type": "string",
                                                        "examples": [
                                                          "3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e",
                                                          "user://3f2b25f3-0a52-4a90-8f0d-5a3f0e6c1d2e"
                                                        ],
                                                        "description": "The user's ID, as a UUID or the `user://<uuid>` form returned by user search."
                                                      }
                                                    },
                                                    "additionalProperties": false,
                                                    "required": [
                                                      "table",
                                                      "id"
                                                    ],
                                                    "description": "Pointer to the Notion user to match."
                                                  }
                                                },
                                                "additionalProperties": false,
                                                "required": [
                                                  "type",
                                                  "value"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "const": "relative",
                                                    "description": "Always `relative`"
                                                  },
                                                  "value": {
                                                    "type": "string",
                                                    "const": "me",
                                                    "description": "Always `me`"
                                                  }
                                                },
                                                "additionalProperties": false,
                                                "required": [
                                                  "type",
                                                  "value"
                                                ]
                                              }
                                            ]
                                          },
                                          "maxItems": 100,
                                          "description": "The people to compare against."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "operator",
                                        "value"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "enum": [
                                            "date_is",
                                            "date_is_before",
                                            "date_is_after",
                                            "date_is_on_or_before",
                                            "date_is_on_or_after"
                                          ],
                                          "description": "How to compare the date."
                                        },
                                        "value": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "relative",
                                                  "description": "Always `relative`"
                                                },
                                                "value": {
                                                  "type": "string",
                                                  "enum": [
                                                    "today",
                                                    "tomorrow",
                                                    "yesterday",
                                                    "one_week_ago",
                                                    "one_week_from_now",
                                                    "one_month_ago",
                                                    "one_month_from_now"
                                                  ],
                                                  "description": "One of: `today`, `tomorrow`, `yesterday`, `one_week_ago`, `one_week_from_now`, `one_month_ago`, `one_month_from_now`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "exact",
                                                  "description": "Always `exact`"
                                                },
                                                "value": {
                                                  "oneOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "const": "date",
                                                          "description": "Always `date`"
                                                        },
                                                        "start_date": {
                                                          "type": "string",
                                                          "examples": [
                                                            "1990-12-28"
                                                          ],
                                                          "format": "date",
                                                          "description": "The calendar date as an ISO 8601 date string."
                                                        }
                                                      },
                                                      "additionalProperties": false,
                                                      "required": [
                                                        "type",
                                                        "start_date"
                                                      ]
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "type": {
                                                          "type": "string",
                                                          "const": "datetime",
                                                          "description": "Always `datetime`"
                                                        },
                                                        "start_date": {
                                                          "type": "string",
                                                          "examples": [
                                                            "1990-12-28"
                                                          ],
                                                          "format": "date",
                                                          "description": "The calendar date as an ISO 8601 date string."
                                                        },
                                                        "start_time": {
                                                          "type": "string",
                                                          "examples": [
                                                            "09:30"
                                                          ],
                                                          "description": "The time of day in 24-hour HH:MM format."
                                                        },
                                                        "time_zone": {
                                                          "type": "string",
                                                          "examples": [
                                                            "America/Los_Angeles"
                                                          ],
                                                          "description": "The IANA time zone name the time is interpreted in."
                                                        }
                                                      },
                                                      "additionalProperties": false,
                                                      "required": [
                                                        "type",
                                                        "start_date",
                                                        "start_time",
                                                        "time_zone"
                                                      ]
                                                    }
                                                  ],
                                                  "description": "Use the is_empty operator to match an unset date."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value"
                                              ]
                                            }
                                          ],
                                          "description": "The date to compare against."
                                        },
                                        "use_end": {
                                          "type": "boolean",
                                          "description": "Compare against the end of a date range rather than its start."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "operator",
                                        "value"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "enum": [
                                            "date_is_within",
                                            "date_is_relative_to"
                                          ],
                                          "description": "How to compare the date against the range."
                                        },
                                        "value": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "relative",
                                                  "description": "Always `relative`"
                                                },
                                                "value": {
                                                  "type": "string",
                                                  "const": "custom",
                                                  "description": "Always `custom`"
                                                },
                                                "direction": {
                                                  "type": "string",
                                                  "enum": [
                                                    "past",
                                                    "future"
                                                  ],
                                                  "description": "Whether the window runs backwards or forwards from now."
                                                },
                                                "unit": {
                                                  "type": "string",
                                                  "enum": [
                                                    "year",
                                                    "month",
                                                    "week",
                                                    "day"
                                                  ],
                                                  "description": "One of: `year`, `month`, `week`, `day`"
                                                },
                                                "count": {
                                                  "type": "integer",
                                                  "minimum": 1,
                                                  "description": "How many units wide the window is."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value",
                                                "direction",
                                                "unit",
                                                "count"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "relative",
                                                  "description": "Always `relative`"
                                                },
                                                "value": {
                                                  "type": "string",
                                                  "const": "surrounding",
                                                  "description": "Always `surrounding`"
                                                },
                                                "unit": {
                                                  "type": "string",
                                                  "enum": [
                                                    "year",
                                                    "month",
                                                    "week",
                                                    "day"
                                                  ],
                                                  "description": "One of: `year`, `month`, `week`, `day`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value",
                                                "unit"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "relative",
                                                  "description": "Always `relative`"
                                                },
                                                "value": {
                                                  "type": "string",
                                                  "enum": [
                                                    "this_week",
                                                    "the_past_week",
                                                    "the_past_month",
                                                    "the_past_year",
                                                    "the_next_week",
                                                    "the_next_month",
                                                    "the_next_year"
                                                  ],
                                                  "description": "One of: `this_week`, `the_past_week`, `the_past_month`, `the_past_year`, `the_next_week`, `the_next_month`, `the_next_year`"
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "type": {
                                                  "type": "string",
                                                  "const": "exact",
                                                  "description": "Always `exact`"
                                                },
                                                "value": {
                                                  "type": "object",
                                                  "properties": {
                                                    "type": {
                                                      "type": "string",
                                                      "const": "daterange",
                                                      "description": "Always `daterange`"
                                                    },
                                                    "start_date": {
                                                      "type": "string",
                                                      "examples": [
                                                        "1990-12-28"
                                                      ],
                                                      "format": "date",
                                                      "description": "Inclusive start of the range as an ISO 8601 date string, if any."
                                                    },
                                                    "end_date": {
                                                      "type": "string",
                                                      "examples": [
                                                        "1991-01-04"
                                                      ],
                                                      "format": "date",
                                                      "description": "Inclusive end of the range as an ISO 8601 date string, if any."
                                                    }
                                                  },
                                                  "additionalProperties": false,
                                                  "required": [
                                                    "type"
                                                  ],
                                                  "description": "Use the is_empty operator to match an unset date."
                                                }
                                              },
                                              "additionalProperties": false,
                                              "required": [
                                                "type",
                                                "value"
                                              ]
                                            }
                                          ],
                                          "description": "The range to compare against."
                                        },
                                        "use_end": {
                                          "type": "boolean",
                                          "description": "Compare against the end of a date range rather than its start."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "operator",
                                        "value"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "enum": [
                                            "is_empty",
                                            "is_not_empty"
                                          ],
                                          "description": "Whether the property must be empty or set."
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "operator"
                                      ]
                                    }
                                  ],
                                  "description": "The comparison to apply. Use the arm matching the property's type."
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "property",
                                "filter"
                              ]
                            },
                            "maxItems": 100,
                            "description": "The conditions in this group. A group with no conditions matches nothing, so send at least one."
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "operator",
                          "filters"
                        ]
                      }
                    ]
                  },
                  "maxItems": 100,
                  "description": "Nested filters; each may be a combinator (and/or) or property filter."
                }
              },
              "required": [
                "operator"
              ],
              "description": "Optional filter for querying meeting notes. Supports combinator (and/or) and property filters on title, attendees, created_time, created_by, last_edited_time, last_edited_by."
            },
            "sort": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "title",
                      "attendees",
                      "created_time",
                      "created_by",
                      "last_edited_time",
                      "last_edited_by"
                    ],
                    "description": "Property name to sort by."
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "ascending",
                      "descending"
                    ],
                    "description": "Sort direction. Must be 'ascending' or 'descending'."
                  }
                },
                "required": [
                  "property",
                  "direction"
                ]
              },
              "maxItems": 100,
              "description": "Optional sort order for the results. Each entry specifies a property name and direction."
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "description": "Maximum number of results to return. Defaults to 50."
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "block",
                      "description": "Always \"block\"."
                    },
                    "id": {
                      "$ref": "#/components/schemas/idResponse",
                      "description": "The ID of the meeting note block."
                    },
                    "type": {
                      "type": "string",
                      "const": "meeting_notes",
                      "description": "Always \"meeting_notes\"."
                    },
                    "meeting_notes": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/richTextItemResponse"
                          },
                          "maxItems": 100,
                          "description": "Title of the meeting note as rich text."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "transcription_not_started",
                            "transcription_paused",
                            "transcription_in_progress",
                            "transcription_failed",
                            "summary_in_progress",
                            "notes_ready"
                          ],
                          "description": "Current processing status of the meeting note transcription."
                        },
                        "children": {
                          "type": "object",
                          "properties": {
                            "summary_block_id": {
                              "$ref": "#/components/schemas/idResponse",
                              "description": "Block ID of the AI summary tab."
                            },
                            "notes_block_id": {
                              "$ref": "#/components/schemas/idResponse",
                              "description": "Block ID of the meeting notes tab."
                            },
                            "transcript_block_id": {
                              "$ref": "#/components/schemas/idResponse",
                              "description": "Block ID of the transcript tab."
                            }
                          },
                          "additionalProperties": false,
                          "description": "Block IDs for each tab (summary, notes, transcript)."
                        },
                        "calendar_event": {
                          "type": "object",
                          "properties": {
                            "start_time": {
                              "type": "string",
                              "description": "ISO-8601 start time of the calendar event."
                            },
                            "end_time": {
                              "type": "string",
                              "description": "ISO-8601 end time of the calendar event."
                            },
                            "attendees": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/idResponse"
                              },
                              "maxItems": 100,
                              "description": "List of attendee user IDs."
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "start_time",
                            "end_time"
                          ],
                          "description": "Calendar event metadata associated with this meeting note."
                        },
                        "recording": {
                          "type": "object",
                          "properties": {
                            "start_time": {
                              "type": "string",
                              "description": "ISO-8601 timestamp when the recording started."
                            },
                            "end_time": {
                              "type": "string",
                              "description": "ISO-8601 timestamp when the recording ended."
                            }
                          },
                          "additionalProperties": false,
                          "description": "Start and end times of the actual recording."
                        }
                      },
                      "additionalProperties": false,
                      "description": "Meeting note content fields."
                    },
                    "created_time": {
                      "type": "string",
                      "description": "ISO-8601 timestamp when this meeting note was created."
                    },
                    "last_edited_time": {
                      "type": "string",
                      "description": "ISO-8601 timestamp when this meeting note was last edited."
                    },
                    "created_by": {
                      "$ref": "#/components/schemas/partialUserObjectResponse",
                      "description": "User who created this meeting note."
                    },
                    "last_edited_by": {
                      "$ref": "#/components/schemas/partialUserObjectResponse",
                      "description": "User who last edited this meeting note."
                    },
                    "has_children": {
                      "type": "boolean",
                      "description": "Whether this block has child blocks."
                    },
                    "in_trash": {
                      "type": "boolean",
                      "description": "Whether this meeting note is in the trash."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "object",
                    "id",
                    "type",
                    "meeting_notes",
                    "created_time",
                    "last_edited_time",
                    "created_by",
                    "last_edited_by",
                    "has_children",
                    "in_trash"
                  ]
                },
                "maxItems": 100,
                "description": "Meeting note block objects."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether additional results exist beyond the returned limit."
              }
            },
            "additionalProperties": false,
            "required": [
              "results",
              "has_more"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/comments

List comments

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List comments",
  "operationId": "list-comments",
  "x-notion-sdk-method": "comments.list",
  "tags": [
    "Comments"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.comments.list({\n  block_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\",\n  start_cursor: undefined,\n  page_size: 50\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/list-comments",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-comments"
  ],
  "parameters": [
    {
      "name": "block_id",
      "in": "query",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "Identifier for a Notion block or page."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of items from the full list desired in the response. Maximum: 100"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/commentObjectResponse"
                }
              },
              "type": {
                "type": "string",
                "const": "comment",
                "description": "Always `comment`"
              },
              "comment": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "request_status": {
                "$ref": "#/components/schemas/requestStatusResponse"
              }
            },
            "required": [
              "object",
              "next_cursor",
              "has_more",
              "results",
              "type",
              "comment"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/comments

Create a comment

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a comment",
  "operationId": "create-a-comment",
  "x-notion-sdk-method": "comments.create",
  "tags": [
    "Comments"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.comments.create({\n  parent: { page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\" },\n  rich_text: [{ text: { content: \"This is a comment\" } }]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-a-comment",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-comments"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "file_upload_id": {
                        "type": "string",
                        "description": "ID of a FileUpload object that has the status `uploaded`."
                      },
                      "type": {
                        "type": "string",
                        "const": "file_upload",
                        "description": "Always `file_upload`"
                      }
                    },
                    "required": [
                      "file_upload_id"
                    ]
                  },
                  "maxItems": 3,
                  "description": "An array of files to attach to the comment. Maximum of 3 allowed."
                },
                "display_name": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "integration",
                          "description": "Always `integration`"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "title": "Integration"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "user",
                          "description": "Always `user`"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "title": "User"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "custom",
                          "description": "Always `custom`"
                        },
                        "custom": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "description": "The custom display name to use"
                            }
                          },
                          "required": [
                            "name"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "custom"
                      ],
                      "title": "Custom"
                    }
                  ],
                  "description": "Display name for the comment."
                }
              }
            },
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "parent": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "page_id": {
                              "$ref": "#/components/schemas/idRequest",
                              "description": "The ID of the parent page (with or without dashes), for example, 195de9221179449fab8075a27c979105"
                            },
                            "type": {
                              "type": "string",
                              "const": "page_id",
                              "description": "Always `page_id`"
                            }
                          },
                          "required": [
                            "page_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "block_id": {
                              "$ref": "#/components/schemas/idRequest",
                              "description": "The ID of the parent block (with or without dashes), for example, 195de9221179449fab8075a27c979105"
                            },
                            "type": {
                              "type": "string",
                              "const": "block_id",
                              "description": "Always `block_id`"
                            }
                          },
                          "required": [
                            "block_id"
                          ]
                        }
                      ],
                      "description": "The parent of the comment. This can be a page or a block."
                    },
                    "rich_text": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/richTextItemRequest"
                      },
                      "maxItems": 100,
                      "description": "An array of rich text objects that represent the content of the comment."
                    }
                  },
                  "required": [
                    "parent",
                    "rich_text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "parent": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "page_id": {
                              "$ref": "#/components/schemas/idRequest",
                              "description": "The ID of the parent page (with or without dashes), for example, 195de9221179449fab8075a27c979105"
                            },
                            "type": {
                              "type": "string",
                              "const": "page_id",
                              "description": "Always `page_id`"
                            }
                          },
                          "required": [
                            "page_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "block_id": {
                              "$ref": "#/components/schemas/idRequest",
                              "description": "The ID of the parent block (with or without dashes), for example, 195de9221179449fab8075a27c979105"
                            },
                            "type": {
                              "type": "string",
                              "const": "block_id",
                              "description": "Always `block_id`"
                            }
                          },
                          "required": [
                            "block_id"
                          ]
                        }
                      ],
                      "description": "The parent of the comment. This can be a page or a block."
                    },
                    "markdown": {
                      "type": "string",
                      "description": "The content of the comment as a Markdown string. Comment Markdown supports inline formatting only (bold, italic, strikethrough, code, links), inline equations ($expression$), and mentions. Block-level Markdown such as fenced code blocks, headings, lists, tables, and blockquotes does not render as structured blocks in comments."
                    }
                  },
                  "required": [
                    "parent",
                    "markdown"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "discussion_id": {
                      "$ref": "#/components/schemas/idRequest",
                      "description": "The ID of the discussion to comment on."
                    },
                    "rich_text": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/richTextItemRequest"
                      },
                      "maxItems": 100,
                      "description": "An array of rich text objects that represent the content of the comment."
                    }
                  },
                  "required": [
                    "discussion_id",
                    "rich_text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "discussion_id": {
                      "$ref": "#/components/schemas/idRequest",
                      "description": "The ID of the discussion to comment on."
                    },
                    "markdown": {
                      "type": "string",
                      "description": "The content of the comment as a Markdown string. Comment Markdown supports inline formatting only (bold, italic, strikethrough, code, links), inline equations ($expression$), and mentions. Block-level Markdown such as fenced code blocks, headings, lists, tables, and blockquotes does not render as structured blocks in comments."
                    }
                  },
                  "required": [
                    "discussion_id",
                    "markdown"
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialCommentObjectResponse"
              },
              {
                "$ref": "#/components/schemas/commentObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

DELETE /v1/comments/{comment_id}

Delete a comment

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Delete a comment",
  "operationId": "delete-a-comment",
  "tags": [
    "Comments"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.comments.delete({\n  comment_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/delete-a-comment",
  "parameters": [
    {
      "name": "comment_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the comment to delete."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialCommentObjectResponse"
              },
              {
                "$ref": "#/components/schemas/commentObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/comments/{comment_id}

Retrieve a comment

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a comment",
  "operationId": "retrieve-comment",
  "tags": [
    "Comments"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.comments.retrieve({\n  comment_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-comment",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-comments"
  ],
  "parameters": [
    {
      "name": "comment_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the comment to retrieve."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialCommentObjectResponse"
              },
              {
                "$ref": "#/components/schemas/commentObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/comments/{comment_id}

Update a comment

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a comment",
  "operationId": "update-a-comment",
  "tags": [
    "Comments"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.comments.update({\n  comment_id: \"c02fc1d3-db8b-45c5-a222-27595b15aea7\",\n  rich_text: [{ text: { content: \"Updated comment text\" } }]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-a-comment",
  "parameters": [
    {
      "name": "comment_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the comment to update."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "rich_text": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/richTextItemRequest"
                  },
                  "maxItems": 100,
                  "description": "An array of rich text objects that represent the updated content of the comment."
                }
              },
              "required": [
                "rich_text"
              ]
            },
            {
              "type": "object",
              "properties": {
                "markdown": {
                  "type": "string",
                  "description": "The updated content of the comment as a Markdown string. Comment Markdown supports inline formatting only (bold, italic, strikethrough, code, links), inline equations ($expression$), and mentions. Block-level Markdown such as fenced code blocks, headings, lists, tables, and blockquotes does not render as structured blocks in comments."
                }
              },
              "required": [
                "markdown"
              ]
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialCommentObjectResponse"
              },
              {
                "$ref": "#/components/schemas/commentObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/custom_emojis

List custom emojis

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List custom emojis",
  "operationId": "list-custom-emojis",
  "tags": [
    "Custom emojis"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\nimport { collectPaginatedAPI } from \"@notionhq/client\"\n\nconst notion = new Client()\n\n// Single page\nconst response = await notion.customEmojis.list()\n\n// All pages with pagination helper\nconst allEmojis = await collectPaginatedAPI(\n  notion.customEmojis.list,\n  {}\n)"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/list-custom-emojis",
  "parameters": [
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of items from the full list desired in the response. Maximum: 100"
      }
    },
    {
      "name": "name",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, filters custom emojis by exact name match. Useful for resolving a custom emoji name to its ID."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "type": {
                "type": "string",
                "const": "custom_emoji",
                "description": "Always `custom_emoji`"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/customEmojiResponse"
                },
                "maxItems": 100,
                "description": "The list of custom emojis."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether there are more results available."
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The cursor to use for the next page of results, or null if there are no more results."
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "type",
              "results",
              "has_more",
              "next_cursor"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/data_sources

Create a data source

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a data source",
  "operationId": "create-a-database",
  "tags": [
    "Data sources"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.dataSources.create({\n  parent: {\n    database_id: \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n  },\n  title: [{ text: { content: \"My Data Source\" } }],\n  properties: {\n    Name: { title: {} },\n    Status: {\n      select: {\n        options: [\n          { name: \"To Do\", color: \"red\" },\n          { name: \"Done\", color: \"green\" }\n        ]\n      }\n    }\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-a-database",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/parentOfDataSourceRequest",
              "description": "An object specifying the parent of the new data source to be created."
            },
            "properties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/propertyConfigurationRequest"
              },
              "description": "Property schema of data source."
            },
            "title": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "Title of data source as it appears in Notion."
            },
            "icon": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/pageIconRequest"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Page icon."
            }
          },
          "required": [
            "parent",
            "properties"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/data_sources/{data_source_id}

Retrieve a data source

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a data source",
  "operationId": "retrieve-a-data-source",
  "tags": [
    "Data sources"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.dataSources.retrieve({\n  data_source_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-a-data-source",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "data_source_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion data source."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/data_sources/{data_source_id}

Update a data source

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a data source",
  "operationId": "update-a-data-source",
  "tags": [
    "Data sources"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.dataSources.update({\n  data_source_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\",\n  title: [{ text: { content: \"Updated Data Source Name\" } }]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-a-data-source",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "data_source_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion data source."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "Title of data source as it appears in Notion."
            },
            "icon": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/pageIconRequest"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Data source icon."
            },
            "properties": {
              "type": "object",
              "additionalProperties": {
                "oneOf": [
                  {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The name of the property."
                          },
                          "description": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/propertyDescriptionRequest"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The description of the property."
                          }
                        }
                      },
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "number",
                                "description": "Always `number`"
                              },
                              "number": {
                                "type": "object",
                                "properties": {
                                  "format": {
                                    "$ref": "#/components/schemas/numberFormat"
                                  }
                                }
                              }
                            },
                            "required": [
                              "number"
                            ],
                            "title": "Number"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "formula",
                                "description": "Always `formula`"
                              },
                              "formula": {
                                "type": "object",
                                "properties": {
                                  "expression": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "required": [
                              "formula"
                            ],
                            "title": "Formula"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "select",
                                "description": "Always `select`"
                              },
                              "select": {
                                "type": "object",
                                "properties": {
                                  "options": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "color": {
                                              "$ref": "#/components/schemas/selectColor"
                                            },
                                            "description": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                }
                              }
                            },
                            "required": [
                              "select"
                            ],
                            "title": "Select"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "multi_select",
                                "description": "Always `multi_select`"
                              },
                              "multi_select": {
                                "type": "object",
                                "properties": {
                                  "options": {
                                    "type": "array",
                                    "items": {
                                      "allOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "color": {
                                              "$ref": "#/components/schemas/selectColor"
                                            },
                                            "description": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          }
                                        },
                                        {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string"
                                                },
                                                "id": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "name"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "id"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    "maxItems": 100
                                  }
                                }
                              }
                            },
                            "required": [
                              "multi_select"
                            ],
                            "title": "Multi Select"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "status",
                                "description": "Always `status`"
                              },
                              "status": {
                                "$ref": "#/components/schemas/statusPropertyConfigUpdateRequest"
                              }
                            },
                            "required": [
                              "status"
                            ],
                            "title": "Status"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "relation",
                                "description": "Always `relation`"
                              },
                              "relation": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "data_source_id": {
                                        "$ref": "#/components/schemas/idRequest"
                                      }
                                    },
                                    "required": [
                                      "data_source_id"
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "single_property",
                                            "description": "Always `single_property`"
                                          },
                                          "single_property": {
                                            "$ref": "#/components/schemas/emptyObject"
                                          }
                                        },
                                        "required": [
                                          "single_property"
                                        ],
                                        "title": "Single Property"
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "dual_property",
                                            "description": "Always `dual_property`"
                                          },
                                          "dual_property": {
                                            "type": "object",
                                            "properties": {
                                              "synced_property_id": {
                                                "type": "string"
                                              },
                                              "synced_property_name": {
                                                "type": "string"
                                              }
                                            }
                                          }
                                        },
                                        "required": [
                                          "dual_property"
                                        ],
                                        "title": "Dual Property"
                                      }
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "relation"
                            ],
                            "title": "Relation"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "rollup",
                                "description": "Always `rollup`"
                              },
                              "rollup": {
                                "allOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "function": {
                                        "$ref": "#/components/schemas/rollupFunction",
                                        "description": "The function to use for the rollup, e.g. count, count_values, percent_not_empty, max."
                                      }
                                    },
                                    "required": [
                                      "function"
                                    ]
                                  },
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "relation_property_name": {
                                            "type": "string"
                                          },
                                          "rollup_property_name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "relation_property_name",
                                          "rollup_property_name"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "relation_property_id": {
                                            "type": "string"
                                          },
                                          "rollup_property_name": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "relation_property_id",
                                          "rollup_property_name"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "relation_property_name": {
                                            "type": "string"
                                          },
                                          "rollup_property_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "relation_property_name",
                                          "rollup_property_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "relation_property_id": {
                                            "type": "string"
                                          },
                                          "rollup_property_id": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "relation_property_id",
                                          "rollup_property_id"
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            },
                            "required": [
                              "rollup"
                            ],
                            "title": "Rollup"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "unique_id",
                                "description": "Always `unique_id`"
                              },
                              "unique_id": {
                                "type": "object",
                                "properties": {
                                  "prefix": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "required": [
                              "unique_id"
                            ],
                            "title": "Unique Id"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "title",
                                "description": "Always `title`"
                              },
                              "title": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "title"
                            ],
                            "title": "Title"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "rich_text",
                                "description": "Always `rich_text`"
                              },
                              "rich_text": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "rich_text"
                            ],
                            "title": "Rich Text"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "url",
                                "description": "Always `url`"
                              },
                              "url": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "title": "Url"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "people",
                                "description": "Always `people`"
                              },
                              "people": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "people"
                            ],
                            "title": "People"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "files",
                                "description": "Always `files`"
                              },
                              "files": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "files"
                            ],
                            "title": "Files"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "email",
                                "description": "Always `email`"
                              },
                              "email": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "title": "Email"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "phone_number",
                                "description": "Always `phone_number`"
                              },
                              "phone_number": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "phone_number"
                            ],
                            "title": "Phone Number"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "date",
                                "description": "Always `date`"
                              },
                              "date": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "date"
                            ],
                            "title": "Date"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "checkbox",
                                "description": "Always `checkbox`"
                              },
                              "checkbox": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "checkbox"
                            ],
                            "title": "Checkbox"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "created_by",
                                "description": "Always `created_by`"
                              },
                              "created_by": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "created_by"
                            ],
                            "title": "Created By"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "created_time",
                                "description": "Always `created_time`"
                              },
                              "created_time": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "created_time"
                            ],
                            "title": "Created Time"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "last_edited_by",
                                "description": "Always `last_edited_by`"
                              },
                              "last_edited_by": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "last_edited_by"
                            ],
                            "title": "Last Edited By"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "last_edited_time",
                                "description": "Always `last_edited_time`"
                              },
                              "last_edited_time": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "last_edited_time"
                            ],
                            "title": "Last Edited Time"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "place",
                                "description": "Always `place`"
                              },
                              "place": {
                                "$ref": "#/components/schemas/emptyObject"
                              }
                            },
                            "required": [
                              "place"
                            ],
                            "title": "Place"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The new name of the property."
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": "The property schema of the data source. The keys are property names or IDs, and the values are property configuration objects. Properties set to null will be removed."
            },
            "in_trash": {
              "type": "boolean",
              "description": "Whether the data source should be moved to or from the trash. If not provided, the trash status will not be updated."
            },
            "parent": {
              "$ref": "#/components/schemas/parentOfDataSourceRequest",
              "description": "The parent of the data source, when moving it to a different database. If not provided, the parent will not be updated."
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/data_sources/{data_source_id}/query

Query a data source

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Query a data source",
  "operationId": "post-database-query",
  "tags": [
    "Data sources"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.dataSources.query({\n  data_source_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\",\n  filter: {\n    property: \"Status\",\n    select: { equals: \"Done\" }\n  },\n  sorts: [\n    {\n      property: \"Created\",\n      direction: \"descending\"\n    }\n  ]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/post-database-query",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "data_source_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "name": "filter_properties",
      "in": "query",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "sorts": {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "property": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "ascending",
                          "descending"
                        ]
                      }
                    },
                    "required": [
                      "property",
                      "direction"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "timestamp": {
                        "type": "string",
                        "enum": [
                          "created_time",
                          "last_edited_time"
                        ]
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "ascending",
                          "descending"
                        ]
                      }
                    },
                    "required": [
                      "timestamp",
                      "direction"
                    ]
                  }
                ]
              }
            },
            "filter": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "or": {
                          "$ref": "#/components/schemas/groupFilterOperatorArray"
                        }
                      },
                      "required": [
                        "or"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "and": {
                          "$ref": "#/components/schemas/groupFilterOperatorArray"
                        }
                      },
                      "required": [
                        "and"
                      ]
                    }
                  ]
                },
                {
                  "$ref": "#/components/schemas/propertyFilter"
                },
                {
                  "$ref": "#/components/schemas/timestampFilter"
                }
              ]
            },
            "start_cursor": {
              "type": "string"
            },
            "page_size": {
              "type": "number"
            },
            "is_archived": {
              "description": "Whether to return archived pages. When omitted or false, returns non-archived pages. When true, returns archived pages.",
              "type": "boolean"
            },
            "result_type": {
              "description": "Optionally filter the results to only include pages or data sources. Regular, non-wiki databases only support page children. The default behavior is no result type filtering, in other words, returning both pages and data sources for wikis.",
              "type": "string",
              "enum": [
                "page",
                "data_source"
              ]
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "title": "Page Or Data Source",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "page_or_data_source"
              },
              "page_or_data_source": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "object": {
                "type": "string",
                "const": "list"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/pageObjectResponse"
                        },
                        {
                          "$ref": "#/components/schemas/partialPageObjectResponse"
                        }
                      ]
                    },
                    {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/partialDataSourceObjectResponse"
                        },
                        {
                          "$ref": "#/components/schemas/dataSourceObjectResponse"
                        }
                      ]
                    }
                  ]
                }
              },
              "request_status": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "incomplete"
                    ]
                  },
                  "incomplete_reason": {
                    "type": "string",
                    "enum": [
                      "query_result_limit_reached"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "type",
              "page_or_data_source",
              "object",
              "next_cursor",
              "has_more",
              "results"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/data_sources/{data_source_id}/templates

List templates in a data source

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List templates in a data source",
  "operationId": "list-data-source-templates",
  "tags": [
    "Data sources"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.dataSources.listTemplates({\n  data_source_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/list-data-source-templates",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "data_source_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion data source."
      }
    },
    {
      "name": "name",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "Filter templates by name (case-insensitive substring match)."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of items from the full list desired in the response. Maximum: 100"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "templates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/idResponse",
                      "description": "ID of the template page."
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the template."
                    },
                    "is_default": {
                      "type": "boolean",
                      "description": "Whether this template is the default template for the data source."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "name",
                    "is_default"
                  ]
                },
                "maxItems": 100,
                "description": "Array of templates available in this data source."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether there are more templates available beyond this page."
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cursor to use for the next page of results. Null if there are no more results."
              }
            },
            "additionalProperties": false,
            "required": [
              "templates",
              "has_more",
              "next_cursor"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/databases

Create a database

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a database",
  "operationId": "create-database",
  "tags": [
    "Databases"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.databases.create({\n  parent: {\n    type: \"page_id\",\n    page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\"\n  },\n  title: [{ text: { content: \"My Database\" } }]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-database",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "parent": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "page_id",
                        "workspace"
                      ],
                      "description": "The type of parent."
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "page_id",
                          "description": "Always `page_id`"
                        },
                        "page_id": {
                          "$ref": "#/components/schemas/idRequest"
                        }
                      },
                      "required": [
                        "type",
                        "page_id"
                      ],
                      "title": "Page Id"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "workspace",
                          "description": "Always `workspace`"
                        },
                        "workspace": {
                          "type": "boolean",
                          "const": true,
                          "description": "Always `true`"
                        }
                      },
                      "required": [
                        "type",
                        "workspace"
                      ],
                      "title": "Workspace"
                    }
                  ]
                }
              ],
              "description": "The parent page or workspace where the database will be created."
            },
            "title": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "The title of the database."
            },
            "description": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "The description of the database."
            },
            "is_inline": {
              "type": "boolean",
              "description": "Whether the database should be displayed inline in the parent page. Defaults to false."
            },
            "initial_data_source": {
              "$ref": "#/components/schemas/initialDataSourceRequest",
              "description": "Initial data source configuration for the database."
            },
            "database_type": {
              "type": "string",
              "enum": [
                "tasks",
                "projects",
                "skills"
              ],
              "description": "Create a typed database with Notion's canonical schema. One of `tasks`, `projects`, or `skills`. Cannot be combined with `initial_data_source`. When `title` is omitted, the database is named after the type."
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest",
              "description": "The icon for the database."
            },
            "cover": {
              "$ref": "#/components/schemas/pageCoverRequest",
              "description": "The cover image for the database."
            }
          },
          "required": [
            "parent"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDatabaseObjectResponse"
              },
              {
                "$ref": "#/components/schemas/databaseObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/databases/{database_id}

Retrieve a database

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a database",
  "operationId": "retrieve-database",
  "tags": [
    "Databases"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.databases.retrieve({\n  database_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-database",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "database_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion database, a container for one or more data sources."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDatabaseObjectResponse"
              },
              {
                "$ref": "#/components/schemas/databaseObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/databases/{database_id}

Update a database

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a database",
  "operationId": "update-database",
  "tags": [
    "Databases"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.databases.update({\n  database_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\",\n  title: [{ text: { content: \"Updated Database Title\" } }]\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-database",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "name": "database_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion database, a container for one or more data sources."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "parent": {
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "page_id",
                        "workspace"
                      ],
                      "description": "The type of parent."
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "page_id",
                          "description": "Always `page_id`"
                        },
                        "page_id": {
                          "$ref": "#/components/schemas/idRequest"
                        }
                      },
                      "required": [
                        "type",
                        "page_id"
                      ],
                      "title": "Page Id"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "workspace",
                          "description": "Always `workspace`"
                        },
                        "workspace": {
                          "type": "boolean",
                          "const": true,
                          "description": "Always `true`"
                        }
                      },
                      "required": [
                        "type",
                        "workspace"
                      ],
                      "title": "Workspace"
                    }
                  ]
                }
              ],
              "description": "The parent page or workspace to move the database to. If not provided, the database will not be moved."
            },
            "title": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "The updated title of the database, if any. If not provided, the title will not be updated."
            },
            "description": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100,
              "description": "The updated description of the database, if any. If not provided, the description will not be updated."
            },
            "is_inline": {
              "type": "boolean",
              "description": "Whether the database should be displayed inline in the parent page. If not provided, the inline status will not be updated."
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest",
              "description": "The updated icon for the database, if any. If not provided, the icon will not be updated."
            },
            "cover": {
              "$ref": "#/components/schemas/pageCoverRequest",
              "description": "The updated cover image for the database, if any. If not provided, the cover will not be updated."
            },
            "in_trash": {
              "type": "boolean",
              "description": "Whether the database should be moved to or from the trash. If not provided, the trash status will not be updated."
            },
            "is_locked": {
              "type": "boolean",
              "description": "Whether the database should be locked from editing in the Notion app UI. If not provided, the locked state will not be updated."
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDatabaseObjectResponse"
              },
              {
                "$ref": "#/components/schemas/databaseObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/file_uploads

List file uploads

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List file uploads",
  "operationId": "list-file-uploads",
  "tags": [
    "File uploads"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.fileUploads.list({\n  start_cursor: undefined,\n  page_size: 50\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/list-file-uploads",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-files-and-media"
  ],
  "parameters": [
    {
      "name": "status",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "pending",
          "uploaded",
          "expired",
          "failed"
        ],
        "description": "If supplied, the endpoint will return file uploads with the specified status."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of items from the full list desired in the response. Maximum: 100"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/fileUploadObjectResponse"
                }
              },
              "type": {
                "type": "string",
                "const": "file_upload",
                "description": "Always `file_upload`"
              },
              "file_upload": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "request_status": {
                "$ref": "#/components/schemas/requestStatusResponse"
              }
            },
            "required": [
              "object",
              "next_cursor",
              "has_more",
              "results",
              "type",
              "file_upload"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/file_uploads

Create a file upload

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a file upload",
  "operationId": "create-file",
  "tags": [
    "File uploads"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.fileUploads.create({\n  mode: \"single_part\",\n  filename: \"document.pdf\",\n  content_type: \"application/pdf\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-file",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-files-and-media",
    "https://developers.notion.com/guides/data-apis/uploading-small-files"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "single_part",
                "multi_part"
              ],
              "description": "How the file is sent. Defaults to single_part. Use multi_part for files larger than 20 MiB or external_url for a temporary public HTTPS URL.",
              "x-purplesuite-narrowed": "Narrowed to the modes this contract executes. `external_url` is omitted: importing a file that way requires an outbound fetch of a caller-supplied URL, which this emulator does not perform. A request naming it is rejected with Notion's 400 rather than silently accepted. See COVERAGE_LEDGER.md."
            },
            "filename": {
              "type": "string",
              "examples": [
                "business_summary.pdf"
              ],
              "description": "The filename. Required for multi_part and external_url uploads. Include an extension or provide content_type so one can be inferred."
            },
            "content_type": {
              "type": "string",
              "examples": [
                "application/pdf"
              ],
              "description": "The MIME type. It must match the uploaded file and any filename extension."
            },
            "number_of_parts": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "description": "The number of parts in a multi_part upload. Required only for multi_part uploads. This must match the number of uploaded parts and the final part_number sent."
            },
            "external_url": {
              "type": "string",
              "description": "A public HTTPS URL to import. Required only for external_url uploads."
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/fileUploadObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/file_uploads/{file_upload_id}

Retrieve a file upload

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a file upload",
  "operationId": "retrieve-file-upload",
  "tags": [
    "File uploads"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.fileUploads.retrieve({\n  file_upload_id: \"a02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-file-upload",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-files-and-media",
    "https://developers.notion.com/guides/data-apis/retrieving-files"
  ],
  "parameters": [
    {
      "name": "file_upload_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "Identifier for a Notion file upload object."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/fileUploadObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/file_uploads/{file_upload_id}/complete

Complete a multi-part file upload

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Complete a multi-part file upload",
  "operationId": "complete-file-upload",
  "tags": [
    "File uploads"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.fileUploads.complete({\n  file_upload_id: \"a02fc1d3-db8b-45c5-a222-27595b15aea7\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/complete-file-upload",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-files-and-media",
    "https://developers.notion.com/guides/data-apis/sending-larger-files"
  ],
  "parameters": [
    {
      "name": "file_upload_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "Identifier for a Notion file upload object."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/fileUploadObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/file_uploads/{file_upload_id}/send

Upload a file

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Upload a file",
  "operationId": "upload-file",
  "tags": [
    "File uploads"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nimport { readFile } from \"fs/promises\"\nimport { basename } from \"path\"\n\nconst filePath = \"./document.pdf\"\n\nconst response = await notion.fileUploads.send({\n  file_upload_id: \"a02fc1d3-db8b-45c5-a222-27595b15aea7\",\n  file: {\n    filename: basename(filePath),\n    data: new Blob([await readFile(filePath)], {\n      type: \"application/pdf\"\n    })\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/upload-file",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-files-and-media",
    "https://developers.notion.com/guides/data-apis/sending-larger-files"
  ],
  "parameters": [
    {
      "name": "file_upload_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "Identifier for a Notion file upload object."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "multipart/form-data": {
        "schema": {
          "type": "object",
          "properties": {
            "file": {
              "type": "object",
              "properties": {},
              "description": "The raw binary file contents to upload."
            },
            "part_number": {
              "type": "string",
              "description": "When uploading files greater than 20MB in parts, this is the current part number. Must be an integer between 1 and 1,000."
            }
          },
          "required": [
            "file"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/fileUploadObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/pages

Create a page

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a page",
  "operationId": "post-page",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.create({\n  parent: {\n    data_source_id: \"d9824bdc-8445-4327-be8b-5b47500af6ce\"\n  },\n  properties: {\n    Name: {\n      title: [{ text: { content: \"New Page Title\" } }]\n    }\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/post-page",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content",
    "https://developers.notion.com/guides/data-apis/creating-pages-from-templates"
  ],
  "parameters": [
    {
      "name": "filter_properties",
      "in": "query",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "parent": {
              "anyOf": [
                {
                  "title": "Page Id",
                  "type": "object",
                  "properties": {
                    "page_id": {
                      "$ref": "#/components/schemas/idRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "page_id"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "page_id"
                  ]
                },
                {
                  "title": "Database Id",
                  "type": "object",
                  "properties": {
                    "database_id": {
                      "$ref": "#/components/schemas/idRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "database_id"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "database_id"
                  ]
                },
                {
                  "title": "Data Source Id",
                  "type": "object",
                  "properties": {
                    "data_source_id": {
                      "$ref": "#/components/schemas/idRequest"
                    },
                    "type": {
                      "type": "string",
                      "const": "data_source_id"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "data_source_id"
                  ]
                },
                {
                  "title": "Workspace",
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "boolean",
                      "const": true
                    },
                    "type": {
                      "type": "string",
                      "const": "workspace"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "workspace"
                  ]
                }
              ]
            },
            "properties": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "title": "Title",
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/richTextItemRequest"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "title"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "title"
                    ]
                  },
                  {
                    "title": "Rich Text",
                    "type": "object",
                    "properties": {
                      "rich_text": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/richTextItemRequest"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "rich_text"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "rich_text"
                    ]
                  },
                  {
                    "title": "Number",
                    "type": "object",
                    "properties": {
                      "number": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "number"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "number"
                    ]
                  },
                  {
                    "title": "Url",
                    "type": "object",
                    "properties": {
                      "url": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/textRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "url"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "url"
                    ]
                  },
                  {
                    "title": "Select",
                    "type": "object",
                    "properties": {
                      "select": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "select"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "select"
                    ]
                  },
                  {
                    "title": "Multi Select",
                    "type": "object",
                    "properties": {
                      "multi_select": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/stringRequest"
                                },
                                "name": {
                                  "$ref": "#/components/schemas/textRequest"
                                },
                                "color": {
                                  "$ref": "#/components/schemas/selectColor"
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/textRequest"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "$ref": "#/components/schemas/textRequest"
                                },
                                "id": {
                                  "$ref": "#/components/schemas/stringRequest"
                                },
                                "color": {
                                  "$ref": "#/components/schemas/selectColor"
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/textRequest"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "name"
                              ]
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "multi_select"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "multi_select"
                    ]
                  },
                  {
                    "title": "People",
                    "type": "object",
                    "properties": {
                      "people": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/partialUserObjectRequest"
                            },
                            {
                              "$ref": "#/components/schemas/groupObjectRequest"
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "people"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "people"
                    ]
                  },
                  {
                    "title": "Email",
                    "type": "object",
                    "properties": {
                      "email": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/stringRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "email"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "email"
                    ]
                  },
                  {
                    "title": "Phone Number",
                    "type": "object",
                    "properties": {
                      "phone_number": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/stringRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "phone_number"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "phone_number"
                    ]
                  },
                  {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "date": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/dateRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "date"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "date"
                    ]
                  },
                  {
                    "title": "Checkbox",
                    "type": "object",
                    "properties": {
                      "checkbox": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "const": "checkbox"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "checkbox"
                    ]
                  },
                  {
                    "title": "Relation",
                    "type": "object",
                    "properties": {
                      "relation": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/relationItemPropertyValueResponse"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "relation"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "relation"
                    ]
                  },
                  {
                    "title": "Files",
                    "type": "object",
                    "properties": {
                      "files": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/internalOrExternalFileWithNameRequest"
                            },
                            {
                              "$ref": "#/components/schemas/fileUploadWithOptionalNameRequest"
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "files"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "files"
                    ]
                  },
                  {
                    "title": "Status",
                    "type": "object",
                    "properties": {
                      "status": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "status"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "status"
                    ]
                  },
                  {
                    "title": "Place",
                    "type": "object",
                    "properties": {
                      "place": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "lat": {
                            "type": "number"
                          },
                          "lon": {
                            "type": "number"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "aws_place_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "google_place_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "lat",
                          "lon"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "place"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "place"
                    ]
                  },
                  {
                    "title": "Verification",
                    "type": "object",
                    "properties": {
                      "verification": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "const": "verified"
                              },
                              "date": {
                                "$ref": "#/components/schemas/dateRequest"
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "const": "unverified"
                              }
                            },
                            "required": [
                              "state"
                            ]
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "verification"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "verification"
                    ]
                  }
                ]
              }
            },
            "icon": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/pageIconRequest"
                },
                {
                  "type": "null"
                }
              ]
            },
            "cover": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/pageCoverRequest"
                },
                {
                  "type": "null"
                }
              ]
            },
            "content": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequest"
              },
              "maxItems": 100
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequest"
              },
              "maxItems": 100
            },
            "markdown": {
              "description": "Page content as Notion-flavored Markdown. Mutually exclusive with content/children.",
              "type": "string"
            },
            "allow_async": {
              "description": "Set to true to receive an async_task response for markdown page creation. Only supported when markdown is provided.",
              "type": "boolean"
            },
            "template": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "none"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "default"
                    },
                    "timezone": {
                      "$ref": "#/components/schemas/templateTimezone"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "template_id"
                    },
                    "template_id": {
                      "$ref": "#/components/schemas/idRequest"
                    },
                    "timezone": {
                      "$ref": "#/components/schemas/templateTimezone"
                    }
                  },
                  "required": [
                    "type",
                    "template_id"
                  ]
                }
              ]
            },
            "position": {
              "$ref": "#/components/schemas/pagePositionSchema"
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/pageObjectResponse"
              },
              {
                "$ref": "#/components/schemas/partialPageObjectResponse"
              }
            ]
          }
        }
      }
    },
    "202": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "async_task"
              },
              "id": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "$ref": "#/components/schemas/nonTerminalAsyncTaskStatus"
              },
              "status_url": {
                "type": "string",
                "minLength": 1
              },
              "created_time": {
                "type": "string",
                "format": "date-time"
              },
              "poll_after_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "operation": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string",
                        "const": "rest"
                      },
                      "name": {
                        "$ref": "#/components/schemas/asyncTaskRestOperationName"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "surface",
                      "name"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "surface": {
                        "type": "string",
                        "const": "mcp"
                      },
                      "name": {
                        "$ref": "#/components/schemas/asyncTaskMcpOperationName"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "surface",
                      "name"
                    ]
                  }
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "status",
              "status_url",
              "created_time",
              "poll_after_seconds",
              "operation"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/pages/{page_id}

Retrieve a page

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a page",
  "operationId": "retrieve-a-page",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.retrieve({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-a-page",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the page to retrieve."
      }
    },
    {
      "name": "filter_properties",
      "in": "query",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "maxItems": 100,
        "description": "Supply a list of property IDs to filter properties in the response. Note that if a page doesn't have a property, it won't be included in the filtered response."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialPageObjectResponse"
              },
              {
                "$ref": "#/components/schemas/pageObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/pages/{page_id}

Update page

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update page",
  "operationId": "patch-page",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.update({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\",\n  properties: {\n    Name: {\n      title: [{ text: { content: \"Updated Title\" } }]\n    }\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/patch-page",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest"
      }
    },
    {
      "name": "filter_properties",
      "in": "query",
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "properties": {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "title": "Title",
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/richTextItemRequest"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "title"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "title"
                    ]
                  },
                  {
                    "title": "Rich Text",
                    "type": "object",
                    "properties": {
                      "rich_text": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/richTextItemRequest"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "rich_text"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "rich_text"
                    ]
                  },
                  {
                    "title": "Number",
                    "type": "object",
                    "properties": {
                      "number": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "number"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "number"
                    ]
                  },
                  {
                    "title": "Url",
                    "type": "object",
                    "properties": {
                      "url": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/textRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "url"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "url"
                    ]
                  },
                  {
                    "title": "Select",
                    "type": "object",
                    "properties": {
                      "select": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "select"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "select"
                    ]
                  },
                  {
                    "title": "Multi Select",
                    "type": "object",
                    "properties": {
                      "multi_select": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/stringRequest"
                                },
                                "name": {
                                  "$ref": "#/components/schemas/textRequest"
                                },
                                "color": {
                                  "$ref": "#/components/schemas/selectColor"
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/textRequest"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "$ref": "#/components/schemas/textRequest"
                                },
                                "id": {
                                  "$ref": "#/components/schemas/stringRequest"
                                },
                                "color": {
                                  "$ref": "#/components/schemas/selectColor"
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/textRequest"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "name"
                              ]
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "multi_select"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "multi_select"
                    ]
                  },
                  {
                    "title": "People",
                    "type": "object",
                    "properties": {
                      "people": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/partialUserObjectRequest"
                            },
                            {
                              "$ref": "#/components/schemas/groupObjectRequest"
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "people"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "people"
                    ]
                  },
                  {
                    "title": "Email",
                    "type": "object",
                    "properties": {
                      "email": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/stringRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "email"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "email"
                    ]
                  },
                  {
                    "title": "Phone Number",
                    "type": "object",
                    "properties": {
                      "phone_number": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/stringRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "phone_number"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "phone_number"
                    ]
                  },
                  {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "date": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/dateRequest"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "date"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "date"
                    ]
                  },
                  {
                    "title": "Checkbox",
                    "type": "object",
                    "properties": {
                      "checkbox": {
                        "type": "boolean"
                      },
                      "type": {
                        "type": "string",
                        "const": "checkbox"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "checkbox"
                    ]
                  },
                  {
                    "title": "Relation",
                    "type": "object",
                    "properties": {
                      "relation": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/relationItemPropertyValueResponse"
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "relation"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "relation"
                    ]
                  },
                  {
                    "title": "Files",
                    "type": "object",
                    "properties": {
                      "files": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/internalOrExternalFileWithNameRequest"
                            },
                            {
                              "$ref": "#/components/schemas/fileUploadWithOptionalNameRequest"
                            }
                          ]
                        },
                        "maxItems": 100
                      },
                      "type": {
                        "type": "string",
                        "const": "files"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "files"
                    ]
                  },
                  {
                    "title": "Status",
                    "type": "object",
                    "properties": {
                      "status": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "name": {
                                "$ref": "#/components/schemas/textRequest"
                              },
                              "id": {
                                "$ref": "#/components/schemas/stringRequest"
                              },
                              "color": {
                                "$ref": "#/components/schemas/selectColor"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/textRequest"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "status"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "status"
                    ]
                  },
                  {
                    "title": "Place",
                    "type": "object",
                    "properties": {
                      "place": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "lat": {
                            "type": "number"
                          },
                          "lon": {
                            "type": "number"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "aws_place_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "google_place_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "lat",
                          "lon"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "place"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "place"
                    ]
                  },
                  {
                    "title": "Verification",
                    "type": "object",
                    "properties": {
                      "verification": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "const": "verified"
                              },
                              "date": {
                                "$ref": "#/components/schemas/dateRequest"
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "const": "unverified"
                              }
                            },
                            "required": [
                              "state"
                            ]
                          }
                        ]
                      },
                      "type": {
                        "type": "string",
                        "const": "verification"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "verification"
                    ]
                  }
                ]
              }
            },
            "icon": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/pageIconRequest"
                },
                {
                  "type": "null"
                }
              ]
            },
            "cover": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/pageCoverRequest"
                },
                {
                  "type": "null"
                }
              ]
            },
            "is_locked": {
              "description": "Whether the page should be locked from editing in the Notion app UI. If not provided, the locked state will not be updated.",
              "type": "boolean"
            },
            "template": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "default"
                    },
                    "timezone": {
                      "$ref": "#/components/schemas/templateTimezone"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "template_id"
                    },
                    "template_id": {
                      "$ref": "#/components/schemas/idRequest"
                    },
                    "timezone": {
                      "$ref": "#/components/schemas/templateTimezone"
                    }
                  },
                  "required": [
                    "type",
                    "template_id"
                  ]
                }
              ]
            },
            "erase_content": {
              "description": "Whether to erase all existing content from the page. When used with a template, the template content replaces the existing content. When used without a template, simply clears the page content.",
              "type": "boolean"
            },
            "in_trash": {
              "type": "boolean"
            },
            "is_archived": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/pageObjectResponse"
              },
              {
                "$ref": "#/components/schemas/partialPageObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/pages/{page_id}/markdown

Retrieve a page as markdown

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a page as markdown",
  "operationId": "retrieve-page-markdown",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.retrieveMarkdown({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\"\n})\n\nconsole.log(response.markdown)"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-page-markdown",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-markdown-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the page (or block) to retrieve as markdown. Non-navigable block IDs from truncated responses can be passed here to fetch their subtrees."
      }
    },
    {
      "name": "include_transcript",
      "in": "query",
      "schema": {
        "type": "boolean",
        "description": "Whether to include meeting note transcripts. Defaults to false. When true, full transcripts are included; when false, a placeholder with the meeting note URL is shown instead."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/pageMarkdownResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/pages/{page_id}/markdown

Update a page's content as markdown

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a page's content as markdown",
  "operationId": "update-page-markdown",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.updateMarkdown({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\",\n  type: \"update_content\",\n  update_content: {\n    content_updates: [\n      {\n        old_str: \"existing text to find\",\n        new_str: \"replacement text\"\n      }\n    ]\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-page-markdown",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-markdown-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the page to update."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "allow_async": {
                  "type": "boolean",
                  "description": "Set to true to opt into receiving an async_task result when this update operation is accepted for background execution. If omitted or false, the endpoint keeps the existing synchronous response shape."
                }
              }
            },
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "insert_content",
                      "description": "Always `insert_content`"
                    },
                    "insert_content": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string",
                          "examples": [
                            "## New Section\n\nInserted content here."
                          ],
                          "description": "The enhanced markdown content to insert into the page."
                        },
                        "after": {
                          "type": "string",
                          "description": "Selection of existing content to insert after, using the ellipsis format (\"start text...end text\"). Omit to append at the end of the page."
                        },
                        "position": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "start",
                                  "description": "Insert the content at the start of the page."
                                }
                              },
                              "required": [
                                "type"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "end",
                                  "description": "Insert the content at the end of the page."
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ],
                          "description": "Explicit position for inserted content. Use {\"type\":\"start\"} to prepend or {\"type\":\"end\"} to append. Cannot be combined with after."
                        }
                      },
                      "required": [
                        "content"
                      ],
                      "description": "Insert new content into the page."
                    }
                  },
                  "required": [
                    "type",
                    "insert_content"
                  ],
                  "title": "Insert Content",
                  "deprecated": true
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "replace_content_range",
                      "description": "Always `replace_content_range`"
                    },
                    "replace_content_range": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string",
                          "examples": [
                            "## Updated Section\n\nNew content replaces the old."
                          ],
                          "description": "The new enhanced markdown content to replace the matched range."
                        },
                        "content_range": {
                          "type": "string",
                          "description": "Selection of existing content to replace, using the ellipsis format (\"start text...end text\")."
                        },
                        "allow_deleting_content": {
                          "type": "boolean",
                          "description": "Set to true to allow the operation to delete child pages or databases. Defaults to false."
                        }
                      },
                      "required": [
                        "content",
                        "content_range"
                      ],
                      "description": "Replace a range of content in the page."
                    }
                  },
                  "required": [
                    "type",
                    "replace_content_range"
                  ],
                  "title": "Replace Content Range",
                  "deprecated": true
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "update_content",
                      "description": "Always `update_content`"
                    },
                    "update_content": {
                      "type": "object",
                      "properties": {
                        "content_updates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "old_str": {
                                "type": "string",
                                "minLength": 1,
                                "description": "The existing content string to find and replace. Must exactly match the page content."
                              },
                              "new_str": {
                                "type": "string",
                                "description": "The new content string to replace old_str with."
                              },
                              "replace_all_matches": {
                                "type": "boolean",
                                "description": "If true, replaces all occurrences of old_str. If false (default), the operation fails if there are multiple matches."
                              }
                            },
                            "required": [
                              "old_str",
                              "new_str"
                            ]
                          },
                          "maxItems": 100,
                          "description": "An array of search-and-replace operations, each with old_str (content to find) and new_str (replacement content)."
                        },
                        "allow_deleting_content": {
                          "type": "boolean",
                          "description": "Set to true to allow the operation to delete child pages or databases. Defaults to false."
                        }
                      },
                      "required": [
                        "content_updates"
                      ],
                      "description": "Update specific content using search-and-replace operations."
                    }
                  },
                  "required": [
                    "type",
                    "update_content"
                  ],
                  "title": "Update Content"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "replace_content",
                      "description": "Always `replace_content`"
                    },
                    "replace_content": {
                      "type": "object",
                      "properties": {
                        "new_str": {
                          "type": "string",
                          "examples": [
                            "# Updated Page\n\nCompletely new page content."
                          ],
                          "description": "The new enhanced markdown content to replace the entire page content."
                        },
                        "allow_deleting_content": {
                          "type": "boolean",
                          "description": "Set to true to allow the operation to delete child pages or databases. Defaults to false."
                        }
                      },
                      "required": [
                        "new_str"
                      ],
                      "description": "Replace the entire page content with new markdown."
                    }
                  },
                  "required": [
                    "type",
                    "replace_content"
                  ],
                  "title": "Replace Content"
                }
              ]
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/pageMarkdownResponse"
          }
        }
      }
    },
    "202": {
      "description": "Accepted when `allow_async` is true and the update has been queued for background execution.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "status",
              "status_url",
              "created_time",
              "poll_after_seconds",
              "operation"
            ],
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "async_task"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running",
                  "retrying"
                ]
              },
              "status_url": {
                "type": "string",
                "minLength": 1
              },
              "created_time": {
                "type": "string",
                "format": "date-time"
              },
              "poll_after_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "operation": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "surface",
                      "name"
                    ],
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "rest"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "enum": [
                          "PATCH /v1/pages/:page_id/markdown"
                        ]
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "surface",
                      "name"
                    ],
                    "properties": {
                      "surface": {
                        "type": "string",
                        "enum": [
                          "mcp"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "enum": [
                          "create_pages"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/pages/{page_id}/move

Move a page

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Move a page",
  "operationId": "move-page",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.move({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\",\n  parent: {\n    page_id: \"3c357473-a281-49a4-88c0-10d2b245a589\"\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/move-page",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the page to move."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "parent": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "page_id": {
                      "$ref": "#/components/schemas/idRequest",
                      "description": "The ID of the parent page (with or without dashes), for example, 195de9221179449fab8075a27c979105"
                    },
                    "type": {
                      "type": "string",
                      "const": "page_id",
                      "description": "Always `page_id`"
                    }
                  },
                  "required": [
                    "page_id"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "data_source_id": {
                      "$ref": "#/components/schemas/idRequest",
                      "description": "The ID of the parent data source (collection), with or without dashes. For example, f336d0bc-b841-465b-8045-024475c079dd"
                    },
                    "type": {
                      "type": "string",
                      "const": "data_source_id",
                      "description": "Always `data_source_id`"
                    }
                  },
                  "required": [
                    "data_source_id"
                  ]
                }
              ],
              "description": "The new parent of the page."
            }
          },
          "required": [
            "parent"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialPageObjectResponse"
              },
              {
                "$ref": "#/components/schemas/pageObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/pages/{page_id}/properties/{property_id}

Retrieve a page property item

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a page property item",
  "operationId": "retrieve-a-page-property",
  "tags": [
    "Pages"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.pages.properties.retrieve({\n  page_id: \"b55c9c91-384d-452b-81db-d1ef79372b75\",\n  property_id: \"aBcD\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-a-page-property",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-page-content"
  ],
  "parameters": [
    {
      "name": "page_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the page containing the property."
      }
    },
    {
      "name": "property_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "description": "The ID or name of the property to retrieve."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/propertyItemObjectResponse"
              },
              {
                "$ref": "#/components/schemas/propertyItemListResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/search

Search by title

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Search by title",
  "operationId": "post-search",
  "tags": [
    "Search"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.search({\n  query: \"meeting notes\",\n  filter: {\n    property: \"object\",\n    value: \"page\"\n  },\n  sort: {\n    direction: \"descending\",\n    timestamp: \"last_edited_time\"\n  }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/post-search",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/data-apis/working-with-databases"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "sort": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "timestamp": {
                      "type": "string",
                      "enum": [
                        "last_edited_time"
                      ]
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "ascending",
                        "descending"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "timestamp",
                    "direction"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "relevance"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "property"
                  ]
                }
              ]
            },
            "query": {
              "type": "string"
            },
            "start_cursor": {
              "type": "string",
              "format": "uuid"
            },
            "page_size": {
              "type": "number"
            },
            "filter": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "object"
                      ]
                    },
                    "value": {
                      "type": "string",
                      "enum": [
                        "page",
                        "data_source"
                      ]
                    },
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "property",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "in_trash": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "in_trash"
                  ]
                }
              ]
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "title": "Page Or Data Source",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "page_or_data_source"
              },
              "page_or_data_source": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "object": {
                "type": "string",
                "const": "list"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/pageObjectResponse"
                        },
                        {
                          "$ref": "#/components/schemas/partialPageObjectResponse"
                        }
                      ]
                    },
                    {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/partialDataSourceObjectResponse"
                        },
                        {
                          "$ref": "#/components/schemas/dataSourceObjectResponse"
                        }
                      ]
                    }
                  ]
                }
              },
              "request_status": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "incomplete"
                    ]
                  },
                  "incomplete_reason": {
                    "type": "string",
                    "enum": [
                      "query_result_limit_reached"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              }
            },
            "required": [
              "type",
              "page_or_data_source",
              "object",
              "next_cursor",
              "has_more",
              "results"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/sessions

Update a session

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a session",
  "operationId": "update-session",
  "x-notion-sdk-method": "sessions.update",
  "tags": [
    "Sessions"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\n// Start a session by omitting session_id\nconst session = await notion.sessions.update({\n  agent_id: \"1f0c7c06-781b-4987-9986-5c8dd3028013\",\n  message: \"What can you help me with?\"\n})\n\n// Continue it by passing the session_id back\nconst followUp = await notion.sessions.update({\n  session_id: session.id,\n  message: \"Summarize that as bullet points.\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/update-session",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "session_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "action_id": {
                        "$ref": "#/components/schemas/idRequest"
                      },
                      "option_id": {
                        "type": "string",
                        "enum": [
                          "approve",
                          "reject"
                        ],
                        "description": "One of: `approve`, `reject`"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "action_id",
                      "option_id"
                    ]
                  },
                  "maxItems": 100,
                  "minItems": 1,
                  "uniqueItems": true
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "maxProperties": 20
                }
              },
              "additionalProperties": false,
              "required": [
                "session_id",
                "actions"
              ]
            }
          ],
          "title": "Update session request",
          "description": "Exactly one mode: append a message, answer pending actions, or replay from an event.",
          "x-purplesuite-narrowed": "Narrowed to the `{session_id, actions}` branch, which approves or rejects a pending `required_action` and is a real state transition. The `{message}` and `{session_id, continue_from}` branches both ask a Notion-hosted agent to generate new output; both are rejected rather than answered with fabricated content. See COVERAGE_LEDGER.md."
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "session",
                "description": "Always `session`"
              },
              "id": {
                "type": "string"
              },
              "agent_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "in_progress",
                  "requires_action",
                  "completed",
                  "failed",
                  "canceled",
                  "terminated"
                ],
                "description": "One of: `queued`, `in_progress`, `requires_action`, `completed`, `failed`, `canceled`, `terminated`"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "required_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "approve",
                              "reject"
                            ],
                            "description": "One of: `approve`, `reject`"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "maxItems": 100
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "action_id",
                    "title",
                    "options"
                  ]
                },
                "maxItems": 100
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "code",
                  "message",
                  "retryable"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "agent_id",
              "title",
              "status",
              "created_at",
              "updated_at"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/sessions/{session_id}

Retrieve a session

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a session",
  "operationId": "retrieve-session",
  "x-notion-sdk-method": "sessions.retrieve",
  "tags": [
    "Sessions"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.sessions.retrieve({\n  session_id: \"2a1c7c06-781b-4987-9986-5c8dd3028014\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/retrieve-session",
  "parameters": [
    {
      "name": "session_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the session to retrieve."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "session",
                "description": "Always `session`"
              },
              "id": {
                "type": "string"
              },
              "agent_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "in_progress",
                  "requires_action",
                  "completed",
                  "failed",
                  "canceled",
                  "terminated"
                ],
                "description": "One of: `queued`, `in_progress`, `requires_action`, `completed`, `failed`, `canceled`, `terminated`"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "user",
                      "bot"
                    ],
                    "description": "One of: `user`, `bot`"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "id",
                  "type"
                ]
              },
              "agent_version": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "number": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "published_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "number",
                      "published_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "models": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "auto",
                        "description": "Always `auto`"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "type"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "pinned",
                        "description": "Always `pinned`"
                      },
                      "ids": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "type",
                      "ids"
                    ]
                  }
                ]
              },
              "required_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "approve",
                              "reject"
                            ],
                            "description": "One of: `approve`, `reject`"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "maxItems": 100
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "action_id",
                    "title",
                    "options"
                  ]
                }
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "code",
                  "message",
                  "retryable"
                ]
              },
              "trigger_type": {
                "type": "string"
              },
              "type_labels": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chat_user_emails": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tool_types": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tool_call_count": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "credits_used": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runs_completed": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "message_count": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "agent_id",
              "title",
              "status",
              "created_at",
              "updated_at",
              "created_by",
              "agent_version",
              "models"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/sessions/{session_id}/cancel

Cancel a session

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Cancel a session",
  "operationId": "cancel-session",
  "x-notion-sdk-method": "sessions.cancel",
  "tags": [
    "Sessions"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.sessions.cancel({\n  session_id: \"2a1c7c06-781b-4987-9986-5c8dd3028014\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/cancel-session",
  "parameters": [
    {
      "name": "session_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the session to cancel."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "event_id": {
              "type": "string",
              "description": "A session event identifying the turn to cancel. If omitted, cancels the current nonterminal turn."
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "session",
                "description": "Always `session`"
              },
              "id": {
                "type": "string"
              },
              "agent_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "in_progress",
                  "requires_action",
                  "completed",
                  "failed",
                  "canceled",
                  "terminated"
                ],
                "description": "One of: `queued`, `in_progress`, `requires_action`, `completed`, `failed`, `canceled`, `terminated`"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "required_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "approve",
                              "reject"
                            ],
                            "description": "One of: `approve`, `reject`"
                          },
                          "label": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "maxItems": 100
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "action_id",
                    "title",
                    "options"
                  ]
                },
                "maxItems": 100
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "code",
                  "message",
                  "retryable"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "id",
              "agent_id",
              "title",
              "status",
              "created_at",
              "updated_at"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/sessions/{session_id}/events/query

Query session events

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Query session events",
  "operationId": "query-session-events",
  "x-notion-sdk-method": "sessions.queryEvents",
  "tags": [
    "Sessions"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.sessions.queryEvents({\n  session_id: \"2a1c7c06-781b-4987-9986-5c8dd3028014\",\n  filter: { property: \"type\", event_type: { equals: \"agent.message\" } }\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/query-session-events",
  "parameters": [
    {
      "name": "session_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the session whose events should be queried."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "filter": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "property",
                    "string"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "id"
                      ]
                    },
                    "string": {
                      "type": "object",
                      "required": [
                        "equals"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "event_type"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "type"
                      ]
                    },
                    "event_type": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string",
                          "enum": [
                            "user.message",
                            "agent.message",
                            "agent.thinking",
                            "agent.tool_use",
                            "agent.tool_result",
                            "session.status"
                          ]
                        },
                        "in": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "user.message",
                              "agent.message",
                              "agent.thinking",
                              "agent.tool_use",
                              "agent.tool_result",
                              "session.status"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "number"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "sequence"
                      ]
                    },
                    "number": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "greater_than": {
                          "type": "number"
                        },
                        "greater_than_or_equal_to": {
                          "type": "number"
                        },
                        "less_than": {
                          "type": "number"
                        },
                        "less_than_or_equal_to": {
                          "type": "number"
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "timestamp"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "created_at"
                      ]
                    },
                    "timestamp": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "before": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "after": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "on_or_before": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "on_or_after": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "and"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "and": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "event_type"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "type"
                                ]
                              },
                              "event_type": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "enum": [
                                      "user.message",
                                      "agent.message",
                                      "agent.thinking",
                                      "agent.tool_use",
                                      "agent.tool_result",
                                      "session.status"
                                    ]
                                  },
                                  "in": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "user.message",
                                        "agent.message",
                                        "agent.thinking",
                                        "agent.tool_use",
                                        "agent.tool_result",
                                        "session.status"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "number"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "sequence"
                                ]
                              },
                              "number": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "greater_than": {
                                    "type": "number"
                                  },
                                  "greater_than_or_equal_to": {
                                    "type": "number"
                                  },
                                  "less_than": {
                                    "type": "number"
                                  },
                                  "less_than_or_equal_to": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "timestamp"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "created_at"
                                ]
                              },
                              "timestamp": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "before": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "after": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "on_or_before": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "on_or_after": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "and"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "and": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "event_type"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "type"
                                          ]
                                        },
                                        "event_type": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "enum": [
                                                "user.message",
                                                "agent.message",
                                                "agent.thinking",
                                                "agent.tool_use",
                                                "agent.tool_result",
                                                "session.status"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "user.message",
                                                  "agent.message",
                                                  "agent.thinking",
                                                  "agent.tool_use",
                                                  "agent.tool_result",
                                                  "session.status"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "number"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "sequence"
                                          ]
                                        },
                                        "number": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "greater_than": {
                                              "type": "number"
                                            },
                                            "greater_than_or_equal_to": {
                                              "type": "number"
                                            },
                                            "less_than": {
                                              "type": "number"
                                            },
                                            "less_than_or_equal_to": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "created_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "and"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "and": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "or"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "or": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "or"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "or": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "event_type"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "type"
                                          ]
                                        },
                                        "event_type": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "enum": [
                                                "user.message",
                                                "agent.message",
                                                "agent.thinking",
                                                "agent.tool_use",
                                                "agent.tool_result",
                                                "session.status"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "user.message",
                                                  "agent.message",
                                                  "agent.thinking",
                                                  "agent.tool_use",
                                                  "agent.tool_result",
                                                  "session.status"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "number"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "sequence"
                                          ]
                                        },
                                        "number": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "greater_than": {
                                              "type": "number"
                                            },
                                            "greater_than_or_equal_to": {
                                              "type": "number"
                                            },
                                            "less_than": {
                                              "type": "number"
                                            },
                                            "less_than_or_equal_to": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "created_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "and"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "and": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "or"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "or": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "or"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "or": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "event_type"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "type"
                                ]
                              },
                              "event_type": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "enum": [
                                      "user.message",
                                      "agent.message",
                                      "agent.thinking",
                                      "agent.tool_use",
                                      "agent.tool_result",
                                      "session.status"
                                    ]
                                  },
                                  "in": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "user.message",
                                        "agent.message",
                                        "agent.thinking",
                                        "agent.tool_use",
                                        "agent.tool_result",
                                        "session.status"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "number"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "sequence"
                                ]
                              },
                              "number": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "greater_than": {
                                    "type": "number"
                                  },
                                  "greater_than_or_equal_to": {
                                    "type": "number"
                                  },
                                  "less_than": {
                                    "type": "number"
                                  },
                                  "less_than_or_equal_to": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "timestamp"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "created_at"
                                ]
                              },
                              "timestamp": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "before": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "after": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "on_or_before": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "on_or_after": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "and"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "and": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "event_type"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "type"
                                          ]
                                        },
                                        "event_type": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "enum": [
                                                "user.message",
                                                "agent.message",
                                                "agent.thinking",
                                                "agent.tool_use",
                                                "agent.tool_result",
                                                "session.status"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "user.message",
                                                  "agent.message",
                                                  "agent.thinking",
                                                  "agent.tool_use",
                                                  "agent.tool_result",
                                                  "session.status"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "number"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "sequence"
                                          ]
                                        },
                                        "number": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "greater_than": {
                                              "type": "number"
                                            },
                                            "greater_than_or_equal_to": {
                                              "type": "number"
                                            },
                                            "less_than": {
                                              "type": "number"
                                            },
                                            "less_than_or_equal_to": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "created_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "and"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "and": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "or"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "or": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "or"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "or": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "event_type"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "type"
                                          ]
                                        },
                                        "event_type": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "enum": [
                                                "user.message",
                                                "agent.message",
                                                "agent.thinking",
                                                "agent.tool_use",
                                                "agent.tool_result",
                                                "session.status"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "user.message",
                                                  "agent.message",
                                                  "agent.thinking",
                                                  "agent.tool_use",
                                                  "agent.tool_result",
                                                  "session.status"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "number"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "sequence"
                                          ]
                                        },
                                        "number": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "greater_than": {
                                              "type": "number"
                                            },
                                            "greater_than_or_equal_to": {
                                              "type": "number"
                                            },
                                            "less_than": {
                                              "type": "number"
                                            },
                                            "less_than_or_equal_to": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "created_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "and"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "and": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "or"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "or": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "string"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "id"
                                                    ]
                                                  },
                                                  "string": {
                                                    "type": "object",
                                                    "required": [
                                                      "equals"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "event_type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "type"
                                                    ]
                                                  },
                                                  "event_type": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "enum": [
                                                          "user.message",
                                                          "agent.message",
                                                          "agent.thinking",
                                                          "agent.tool_use",
                                                          "agent.tool_result",
                                                          "session.status"
                                                        ]
                                                      },
                                                      "in": {
                                                        "type": "array",
                                                        "items": {
                                                          "type": "string",
                                                          "enum": [
                                                            "user.message",
                                                            "agent.message",
                                                            "agent.thinking",
                                                            "agent.tool_use",
                                                            "agent.tool_result",
                                                            "session.status"
                                                          ]
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "number"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "sequence"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "greater_than": {
                                                        "type": "number"
                                                      },
                                                      "greater_than_or_equal_to": {
                                                        "type": "number"
                                                      },
                                                      "less_than": {
                                                        "type": "number"
                                                      },
                                                      "less_than_or_equal_to": {
                                                        "type": "number"
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              {
                                                "type": "object",
                                                "required": [
                                                  "property",
                                                  "timestamp"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                  "property": {
                                                    "type": "string",
                                                    "enum": [
                                                      "created_at"
                                                    ]
                                                  },
                                                  "timestamp": {
                                                    "type": "object",
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "equals": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_before": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      },
                                                      "on_or_after": {
                                                        "type": "string",
                                                        "format": "date-time"
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              ],
              "description": "A session event property filter, or an and/or compound filter nested up to three levels deep."
            },
            "sorts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "sequence",
                      "created_at"
                    ],
                    "description": "One of: `sequence`, `created_at`"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "ascending",
                      "descending"
                    ],
                    "description": "One of: `ascending`, `descending`"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "property",
                  "direction"
                ]
              },
              "maxItems": 2,
              "minItems": 1,
              "description": "Ordered sort precedence. Defaults to sequence ascending."
            },
            "start_cursor": {
              "type": "string",
              "description": "The continuation cursor returned by the previous page."
            },
            "page_size": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "The number of events to return. Maximum: 100."
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "type": {
                "type": "string",
                "const": "session_event",
                "description": "Always `session_event`"
              },
              "session_event": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "results": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "user.message",
                          "description": "Always `user.message`"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "text",
                                    "description": "Always `text`"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "file",
                                    "description": "Always `file`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "content_type": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "expiry_time": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "content_type",
                                  "url"
                                ]
                              }
                            ]
                          }
                        },
                        "created_by": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "bot"
                                  ],
                                  "description": "One of: `user`, `bot`"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string",
                                "maxLength": 2000
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "content",
                        "created_by",
                        "metadata"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "agent.message",
                          "description": "Always `agent.message`"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "text",
                                    "description": "Always `text`"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "text"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "file",
                                    "description": "Always `file`"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "content_type": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "expiry_time": {
                                    "type": "string"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "type",
                                  "name",
                                  "content_type",
                                  "url"
                                ]
                              }
                            ]
                          }
                        },
                        "created_by": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "user",
                                    "bot"
                                  ],
                                  "description": "One of: `user`, `bot`"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id",
                                "type"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "model": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "model"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "content",
                        "created_by",
                        "metadata"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "agent.thinking",
                          "description": "Always `agent.thinking`"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "text",
                                "description": "Always `text`"
                              },
                              "text": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "type",
                              "text"
                            ]
                          }
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "content"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "agent.tool_use",
                          "description": "Always `agent.tool_use`"
                        },
                        "tool_name": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "tool_name"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "agent.tool_result",
                          "description": "Always `agent.tool_result`"
                        },
                        "tool_use_id": {
                          "type": "string"
                        },
                        "tool_name": {
                          "type": "string"
                        },
                        "is_error": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "tool_use_id",
                        "tool_name",
                        "is_error"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "const": "session_event",
                          "description": "Always `session_event`"
                        },
                        "id": {
                          "type": "string"
                        },
                        "session_id": {
                          "type": "string"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "session.status",
                          "description": "Always `session.status`"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "requires_action",
                            "completed",
                            "failed",
                            "canceled",
                            "terminated"
                          ],
                          "description": "One of: `requires_action`, `completed`, `failed`, `canceled`, `terminated`"
                        },
                        "required_actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "action_id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "enum": [
                                        "approve",
                                        "reject"
                                      ],
                                      "description": "One of: `approve`, `reject`"
                                    },
                                    "label": {
                                      "type": "string"
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "id",
                                    "label"
                                  ]
                                },
                                "maxItems": 100
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "action_id",
                              "title",
                              "options"
                            ]
                          }
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "code",
                            "message",
                            "retryable"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "object",
                        "id",
                        "session_id",
                        "sequence",
                        "created_at",
                        "type",
                        "status"
                      ]
                    }
                  ]
                },
                "maxItems": 100
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "title": "Cursor",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "type",
              "session_event",
              "results",
              "has_more",
              "next_cursor"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/sessions/query

Query sessions

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Query sessions",
  "operationId": "query-sessions",
  "x-notion-sdk-method": "sessions.query",
  "tags": [
    "Sessions"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.sessions.query({\n  filter: { property: \"agent_id\", string: { equals: \"1f0c7c06-781b-4987-9986-5c8dd3028013\" } },\n  sorts: [{ property: \"updated_at\", direction: \"descending\" }],\n  page_size: 10\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/notion-agent-apis/query-sessions",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "maxLength": 2000,
              "description": "A case-insensitive substring search over session titles."
            },
            "filter": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "property",
                    "string"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "id"
                      ]
                    },
                    "string": {
                      "type": "object",
                      "description": "An exact string comparison.",
                      "required": [
                        "equals"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string",
                          "description": "Return sessions with this exact value."
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "string"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "agent_id"
                      ]
                    },
                    "string": {
                      "type": "object",
                      "description": "An exact string comparison.",
                      "required": [
                        "equals"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string",
                          "description": "Return sessions with this exact value."
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "status"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "enum": [
                        "status"
                      ]
                    },
                    "status": {
                      "type": "object",
                      "description": "A session status comparison.",
                      "additionalProperties": false,
                      "properties": {
                        "equals": {
                          "type": "string",
                          "description": "Return sessions with this status.",
                          "enum": [
                            "queued",
                            "in_progress",
                            "requires_action",
                            "completed",
                            "failed",
                            "canceled",
                            "terminated"
                          ]
                        },
                        "in": {
                          "type": "array",
                          "description": "Return sessions with any of these statuses.",
                          "maxItems": 7,
                          "items": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "in_progress",
                              "requires_action",
                              "completed",
                              "failed",
                              "canceled",
                              "terminated"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "property",
                    "timestamp"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "property": {
                      "type": "string",
                      "description": "The session timestamp to compare.",
                      "enum": [
                        "created_at",
                        "updated_at"
                      ]
                    },
                    "timestamp": {
                      "type": "object",
                      "description": "A timestamp range.",
                      "additionalProperties": false,
                      "properties": {
                        "before": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Return sessions before this time."
                        },
                        "after": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Return sessions after this time."
                        },
                        "on_or_before": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Return sessions at or before this time."
                        },
                        "on_or_after": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Return sessions at or after this time."
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "and"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "and": {
                      "type": "array",
                      "maxItems": 100,
                      "description": "Return sessions that match every child filter.",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "description": "An exact string comparison.",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this exact value."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "agent_id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "description": "An exact string comparison.",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this exact value."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "status"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "status"
                                ]
                              },
                              "status": {
                                "type": "object",
                                "description": "A session status comparison.",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this status.",
                                    "enum": [
                                      "queued",
                                      "in_progress",
                                      "requires_action",
                                      "completed",
                                      "failed",
                                      "canceled",
                                      "terminated"
                                    ]
                                  },
                                  "in": {
                                    "type": "array",
                                    "description": "Return sessions with any of these statuses.",
                                    "maxItems": 7,
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "in_progress",
                                        "requires_action",
                                        "completed",
                                        "failed",
                                        "canceled",
                                        "terminated"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "timestamp"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "description": "The session timestamp to compare.",
                                "enum": [
                                  "created_at",
                                  "updated_at"
                                ]
                              },
                              "timestamp": {
                                "type": "object",
                                "description": "A timestamp range.",
                                "additionalProperties": false,
                                "properties": {
                                  "before": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions before this time."
                                  },
                                  "after": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions after this time."
                                  },
                                  "on_or_before": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions at or before this time."
                                  },
                                  "on_or_after": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions at or after this time."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "and"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "and": {
                                "type": "array",
                                "maxItems": 100,
                                "description": "Return sessions that match every child filter.",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "agent_id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "status"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "status"
                                          ]
                                        },
                                        "status": {
                                          "type": "object",
                                          "description": "A session status comparison.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this status.",
                                              "enum": [
                                                "queued",
                                                "in_progress",
                                                "requires_action",
                                                "completed",
                                                "failed",
                                                "canceled",
                                                "terminated"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "description": "Return sessions with any of these statuses.",
                                              "maxItems": 7,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "queued",
                                                  "in_progress",
                                                  "requires_action",
                                                  "completed",
                                                  "failed",
                                                  "canceled",
                                                  "terminated"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "description": "The session timestamp to compare.",
                                          "enum": [
                                            "created_at",
                                            "updated_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "description": "A timestamp range.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions before this time."
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions after this time."
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or before this time."
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or after this time."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "or"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "or": {
                                "type": "array",
                                "maxItems": 100,
                                "description": "Return sessions that match any child filter.",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "agent_id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "status"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "status"
                                          ]
                                        },
                                        "status": {
                                          "type": "object",
                                          "description": "A session status comparison.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this status.",
                                              "enum": [
                                                "queued",
                                                "in_progress",
                                                "requires_action",
                                                "completed",
                                                "failed",
                                                "canceled",
                                                "terminated"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "description": "Return sessions with any of these statuses.",
                                              "maxItems": 7,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "queued",
                                                  "in_progress",
                                                  "requires_action",
                                                  "completed",
                                                  "failed",
                                                  "canceled",
                                                  "terminated"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "description": "The session timestamp to compare.",
                                          "enum": [
                                            "created_at",
                                            "updated_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "description": "A timestamp range.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions before this time."
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions after this time."
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or before this time."
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or after this time."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "or"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "or": {
                      "type": "array",
                      "maxItems": 100,
                      "description": "Return sessions that match any child filter.",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "description": "An exact string comparison.",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this exact value."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "string"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "agent_id"
                                ]
                              },
                              "string": {
                                "type": "object",
                                "description": "An exact string comparison.",
                                "required": [
                                  "equals"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this exact value."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "status"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "enum": [
                                  "status"
                                ]
                              },
                              "status": {
                                "type": "object",
                                "description": "A session status comparison.",
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string",
                                    "description": "Return sessions with this status.",
                                    "enum": [
                                      "queued",
                                      "in_progress",
                                      "requires_action",
                                      "completed",
                                      "failed",
                                      "canceled",
                                      "terminated"
                                    ]
                                  },
                                  "in": {
                                    "type": "array",
                                    "description": "Return sessions with any of these statuses.",
                                    "maxItems": 7,
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "queued",
                                        "in_progress",
                                        "requires_action",
                                        "completed",
                                        "failed",
                                        "canceled",
                                        "terminated"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "property",
                              "timestamp"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "property": {
                                "type": "string",
                                "description": "The session timestamp to compare.",
                                "enum": [
                                  "created_at",
                                  "updated_at"
                                ]
                              },
                              "timestamp": {
                                "type": "object",
                                "description": "A timestamp range.",
                                "additionalProperties": false,
                                "properties": {
                                  "before": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions before this time."
                                  },
                                  "after": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions after this time."
                                  },
                                  "on_or_before": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions at or before this time."
                                  },
                                  "on_or_after": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "Return sessions at or after this time."
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "and"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "and": {
                                "type": "array",
                                "maxItems": 100,
                                "description": "Return sessions that match every child filter.",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "agent_id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "status"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "status"
                                          ]
                                        },
                                        "status": {
                                          "type": "object",
                                          "description": "A session status comparison.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this status.",
                                              "enum": [
                                                "queued",
                                                "in_progress",
                                                "requires_action",
                                                "completed",
                                                "failed",
                                                "canceled",
                                                "terminated"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "description": "Return sessions with any of these statuses.",
                                              "maxItems": 7,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "queued",
                                                  "in_progress",
                                                  "requires_action",
                                                  "completed",
                                                  "failed",
                                                  "canceled",
                                                  "terminated"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "description": "The session timestamp to compare.",
                                          "enum": [
                                            "created_at",
                                            "updated_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "description": "A timestamp range.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions before this time."
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions after this time."
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or before this time."
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or after this time."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "or"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "or": {
                                "type": "array",
                                "maxItems": 100,
                                "description": "Return sessions that match any child filter.",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "string"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "agent_id"
                                          ]
                                        },
                                        "string": {
                                          "type": "object",
                                          "description": "An exact string comparison.",
                                          "required": [
                                            "equals"
                                          ],
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this exact value."
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "status"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "enum": [
                                            "status"
                                          ]
                                        },
                                        "status": {
                                          "type": "object",
                                          "description": "A session status comparison.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "equals": {
                                              "type": "string",
                                              "description": "Return sessions with this status.",
                                              "enum": [
                                                "queued",
                                                "in_progress",
                                                "requires_action",
                                                "completed",
                                                "failed",
                                                "canceled",
                                                "terminated"
                                              ]
                                            },
                                            "in": {
                                              "type": "array",
                                              "description": "Return sessions with any of these statuses.",
                                              "maxItems": 7,
                                              "items": {
                                                "type": "string",
                                                "enum": [
                                                  "queued",
                                                  "in_progress",
                                                  "requires_action",
                                                  "completed",
                                                  "failed",
                                                  "canceled",
                                                  "terminated"
                                                ]
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "property",
                                        "timestamp"
                                      ],
                                      "additionalProperties": false,
                                      "properties": {
                                        "property": {
                                          "type": "string",
                                          "description": "The session timestamp to compare.",
                                          "enum": [
                                            "created_at",
                                            "updated_at"
                                          ]
                                        },
                                        "timestamp": {
                                          "type": "object",
                                          "description": "A timestamp range.",
                                          "additionalProperties": false,
                                          "properties": {
                                            "before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions before this time."
                                            },
                                            "after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions after this time."
                                            },
                                            "on_or_before": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or before this time."
                                            },
                                            "on_or_after": {
                                              "type": "string",
                                              "format": "date-time",
                                              "description": "Return sessions at or after this time."
                                            }
                                          }
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              ],
              "description": "A session property filter, or an and/or compound filter nested up to two levels deep."
            },
            "sorts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "property": {
                    "type": "string",
                    "enum": [
                      "created_at",
                      "updated_at"
                    ],
                    "description": "One of: `created_at`, `updated_at`"
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "ascending",
                      "descending"
                    ],
                    "description": "One of: `ascending`, `descending`"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "property",
                  "direction"
                ]
              },
              "maxItems": 2,
              "minItems": 1,
              "description": "Ordered sort precedence. Defaults to updated_at descending."
            },
            "start_cursor": {
              "type": "string",
              "description": "The continuation cursor returned by the previous page."
            },
            "page_size": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "The number of sessions to return. Maximum: 100."
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "type": {
                "type": "string",
                "const": "session",
                "description": "Always `session`"
              },
              "session": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "session",
                      "description": "Always `session`"
                    },
                    "id": {
                      "type": "string"
                    },
                    "agent_id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "in_progress",
                        "requires_action",
                        "completed",
                        "failed",
                        "canceled",
                        "terminated"
                      ],
                      "description": "One of: `queued`, `in_progress`, `requires_action`, `completed`, `failed`, `canceled`, `terminated`"
                    },
                    "created_by": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "user",
                            "bot"
                          ],
                          "description": "One of: `user`, `bot`"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "type"
                      ]
                    },
                    "agent_version": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "number": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "published_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "number",
                            "published_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "models": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "auto",
                              "description": "Always `auto`"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "pinned",
                              "description": "Always `pinned`"
                            },
                            "ids": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "ids"
                          ]
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "required_actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action_id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "enum": [
                                    "approve",
                                    "reject"
                                  ],
                                  "description": "One of: `approve`, `reject`"
                                },
                                "label": {
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "id",
                                "label"
                              ]
                            },
                            "maxItems": 100
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "action_id",
                          "title",
                          "options"
                        ]
                      }
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "code",
                        "message",
                        "retryable"
                      ]
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "type_labels": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "chat_user_emails": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tool_types": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tool_call_count": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "credits_used": {
                      "oneOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "runs_completed": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "message_count": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "object",
                    "id",
                    "agent_id",
                    "title",
                    "status",
                    "created_by",
                    "agent_version",
                    "models",
                    "created_at",
                    "updated_at"
                  ]
                },
                "maxItems": 100,
                "description": "Sessions found in this bounded scan. Access filtering can leave this array empty while has_more is true."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether more session candidates remain after this bounded scan."
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Pass this cursor as start_cursor when has_more is true, even when results is empty."
              }
            },
            "additionalProperties": false,
            "required": [
              "object",
              "type",
              "session",
              "results",
              "has_more",
              "next_cursor"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/users

List all users

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List all users",
  "operationId": "get-users",
  "tags": [
    "Users"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.users.list({\n  start_cursor: undefined,\n  page_size: 10\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/get-users",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/get-started/overview"
  ],
  "parameters": [
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "number"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "title": "User",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "user"
              },
              "user": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "object": {
                "type": "string",
                "const": "list"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/userObjectResponse"
                }
              }
            },
            "required": [
              "type",
              "user",
              "object",
              "next_cursor",
              "has_more",
              "results"
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/users/{user_id}

Retrieve a user

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a user",
  "operationId": "get-user",
  "tags": [
    "Users"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.users.retrieve({\n  user_id: \"e79a0b74-3aba-4149-9f74-0bb5791a6ee6\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/get-user",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/get-started/overview"
  ],
  "parameters": [
    {
      "name": "user_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the user or bot to retrieve."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/userObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/users/me

Retrieve your token's bot user

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve your token's bot user",
  "operationId": "get-self",
  "tags": [
    "Users"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.users.me()"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/get-self",
  "x-notion-docs-guides": [
    "https://developers.notion.com/guides/get-started/overview"
  ],
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/userObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/views

List views

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "List views",
  "operationId": "list-views",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.list({\n  database_id: \"248104cd-477e-80fd-b757-e945d38000bd\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/list-views",
  "parameters": [
    {
      "name": "database_id",
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion database (collection view block) to list views for. At least one of database_id or data_source_id is required."
      }
    },
    {
      "name": "data_source_id",
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a data source (collection) to list all views for, including linked views across the workspace. At least one of database_id or data_source_id is required."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of items from the full list desired in the response. Maximum: 100"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/dataSourceViewReferenceResponse"
                }
              },
              "type": {
                "type": "string",
                "const": "view",
                "description": "Always `view`"
              },
              "view": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "request_status": {
                "$ref": "#/components/schemas/requestStatusResponse"
              }
            },
            "required": [
              "object",
              "next_cursor",
              "has_more",
              "results",
              "type",
              "view"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/views

Create a view

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a view",
  "operationId": "create-view",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.create({\n  database_id: \"248104cd-477e-80fd-b757-e945d38000bd\",\n  data_source_id: \"248104cd-477e-80af-bc30-000bd28de8f9\",\n  name: \"High priority items\",\n  type: \"table\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-view",
  "parameters": [
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/createViewRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceViewObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceViewObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

DELETE /v1/views/{view_id}

Delete a view

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Delete a view",
  "operationId": "delete-view",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.delete({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/delete-view",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the view to delete."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/partialDataSourceViewObjectResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/views/{view_id}

Retrieve a view

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Retrieve a view",
  "operationId": "retrieve-a-view",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.retrieve({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/retrieve-a-view",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion view."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceViewObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceViewObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

PATCH /v1/views/{view_id}

Update a view

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Update a view",
  "operationId": "update-a-view",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.update({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\",\n  name: \"Updated view name\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/update-a-view",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "ID of a Notion view."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/updateViewRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/partialDataSourceViewObjectResponse"
              },
              {
                "$ref": "#/components/schemas/dataSourceViewObjectResponse"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

POST /v1/views/{view_id}/queries

Create a view query

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Create a view query",
  "operationId": "create-view-query",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.queries.create({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/create-view-query",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the view."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/createViewQueryRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/viewQueryResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

DELETE /v1/views/{view_id}/queries/{query_id}

Delete a view query

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Delete a view query",
  "operationId": "delete-view-query",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.queries.delete({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\",\n  query_id: \"b4e2c3d5-6789-4abc-def0-1234567890cd\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/delete-view-query",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the view."
      }
    },
    {
      "name": "query_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the query."
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/deletedViewQueryResponse"
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

GET /v1/views/{view_id}/queries/{query_id}

Get view query results

Authentication

[
  {
    "bearerAuth": []
  }
]

Request, responses and operation details

{
  "summary": "Get view query results",
  "operationId": "get-view-query-results",
  "tags": [
    "Views"
  ],
  "x-codeSamples": [
    {
      "lang": "javascript",
      "label": "TypeScript SDK",
      "source": "import { Client } from \"@notionhq/client\"\n\nconst notion = new Client({ auth: process.env.NOTION_API_KEY })\n\nconst response = await notion.views.queries.results({\n  view_id: \"a3f1b2c4-5678-4def-abcd-1234567890ab\",\n  query_id: \"b4e2c3d5-6789-4abc-def0-1234567890cd\"\n})"
    }
  ],
  "x-notion-docs-ref": "https://developers.notion.com/reference/get-view-query-results",
  "parameters": [
    {
      "name": "view_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the view."
      }
    },
    {
      "name": "query_id",
      "in": "path",
      "required": true,
      "schema": {
        "$ref": "#/components/schemas/idRequest",
        "description": "The ID of the query."
      }
    },
    {
      "name": "start_cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "description": "If supplied, this endpoint will return a page of results starting after the cursor provided."
      }
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "The number of results to return per page. Maximum: 100"
      }
    },
    {
      "$ref": "#/components/parameters/notionVersion"
    }
  ],
  "responses": {
    "200": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "list",
                "description": "Always `list`"
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/idResponse"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_more": {
                "type": "boolean"
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/partialPageObjectResponse"
                }
              },
              "type": {
                "type": "string",
                "const": "page",
                "description": "Always `page`"
              },
              "page": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "request_status": {
                "$ref": "#/components/schemas/requestStatusResponse"
              }
            },
            "required": [
              "object",
              "next_cursor",
              "has_more",
              "results",
              "type",
              "page"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_400"
          }
        }
      }
    },
    "401": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_401"
          }
        }
      }
    },
    "403": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_403"
          }
        }
      }
    },
    "404": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_404"
          }
        }
      }
    },
    "406": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_406"
          }
        }
      }
    },
    "409": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_409"
          }
        }
      }
    },
    "429": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_429"
          }
        }
      }
    },
    "500": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_500"
          }
        }
      }
    },
    "503": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_503"
          }
        }
      }
    },
    "504": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_504"
          }
        }
      }
    },
    "529": {
      "description": "",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/error_api_529"
          }
        }
      }
    }
  }
}

Schemas and reusable components

securitySchemes

bearerAuth

{
  "type": "http",
  "scheme": "bearer"
}

basicAuth

{
  "type": "http",
  "scheme": "basic"
}

schemas

agentIdParentForBlockBasedObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "agent_id",
      "description": "The parent type."
    },
    "agent_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent agent."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "agent_id"
  ]
}

annotationRequest

{
  "type": "object",
  "properties": {
    "bold": {
      "type": "boolean",
      "description": "Whether the text is formatted as bold."
    },
    "italic": {
      "type": "boolean",
      "description": "Whether the text is formatted as italic."
    },
    "strikethrough": {
      "type": "boolean",
      "description": "Whether the text is formatted with a strikethrough."
    },
    "underline": {
      "type": "boolean",
      "description": "Whether the text is formatted with an underline."
    },
    "code": {
      "type": "boolean",
      "description": "Whether the text is formatted as code."
    },
    "color": {
      "$ref": "#/components/schemas/apiColor",
      "description": "The color of the text."
    }
  }
}

annotationResponse

{
  "type": "object",
  "properties": {
    "bold": {
      "type": "boolean"
    },
    "italic": {
      "type": "boolean"
    },
    "strikethrough": {
      "type": "boolean"
    },
    "underline": {
      "type": "boolean"
    },
    "code": {
      "type": "boolean"
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    }
  },
  "additionalProperties": false,
  "required": [
    "bold",
    "italic",
    "strikethrough",
    "underline",
    "code",
    "color"
  ]
}

apiColor

{
  "type": "string",
  "enum": [
    "default",
    "gray",
    "brown",
    "orange",
    "yellow",
    "green",
    "blue",
    "purple",
    "pink",
    "red",
    "default_background",
    "gray_background",
    "brown_background",
    "orange_background",
    "yellow_background",
    "green_background",
    "blue_background",
    "purple_background",
    "pink_background",
    "red_background"
  ],
  "description": "One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`, `default_background`, `gray_background`, `brown_background`, `orange_background`, `yellow_background`, `green_background`, `blue_background`, `purple_background`, `pink_background`, `red_background`"
}

apiTranscriptionStatus

{
  "type": "string",
  "enum": [
    "transcription_not_started",
    "transcription_paused",
    "transcription_in_progress",
    "transcription_failed",
    "summary_in_progress",
    "notes_ready"
  ]
}

arrayBasedPropertyValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/titleArrayBasedPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/richTextArrayBasedPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/peopleArrayBasedPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/relationArrayBasedPropertyValueResponse"
    }
  ]
}

arrayPartialRollupValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "array",
      "description": "Always `array`"
    },
    "array": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/simpleOrArrayPropertyValueResponse"
      },
      "maxItems": 100
    }
  },
  "required": [
    "type",
    "array"
  ],
  "title": "Array"
}

asyncTaskMcpOperationName

{
  "type": "string",
  "enum": [
    "create_pages",
    "update_page"
  ]
}

asyncTaskRestOperationName

{
  "type": "string",
  "enum": [
    "POST /v1/pages",
    "PATCH /v1/pages/:page_id/markdown"
  ]
}

audioBlockObjectResponse

{
  "title": "Audio",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "audio"
    },
    "audio": {
      "$ref": "#/components/schemas/mediaContentWithFileAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "audio",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

baseWebhookPayload

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for this webhook event."
    },
    "timestamp": {
      "type": "string",
      "description": "ISO 8601 timestamp of when the event occurred. Can be used to order events."
    },
    "workspace_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the workspace where the event originated."
    },
    "workspace_name": {
      "type": "string",
      "description": "The name of the workspace where the event originated."
    },
    "subscription_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the webhook subscription."
    },
    "integration_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the integration the subscription is set up with."
    },
    "authors": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/idResponse",
                "description": "The ID of the user."
              },
              "type": {
                "type": "string",
                "const": "person",
                "description": "Always `person`"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/idResponse",
                "description": "The ID of the bot."
              },
              "type": {
                "type": "string",
                "const": "bot",
                "description": "Always `bot`"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "type"
            ]
          }
        ]
      },
      "maxItems": 100,
      "description": "The users or bots that performed the action. Typically an array of length 1; can be more for aggregated events."
    },
    "attempt_number": {
      "type": "integer",
      "description": "The delivery attempt number (1-8) of the current event delivery."
    },
    "api_version": {
      "type": "string",
      "enum": [
        "2022-06-28",
        "2025-09-03",
        "2026-03-11"
      ],
      "description": "The Notion API version that was used to render this webhook event's shape."
    },
    "accessible_by": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/idResponse",
                "description": "The ID of the user."
              },
              "type": {
                "type": "string",
                "const": "person",
                "description": "Always `person`"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/idResponse",
                "description": "The ID of the bot."
              },
              "type": {
                "type": "string",
                "const": "bot",
                "description": "Always `bot`"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "type"
            ]
          }
        ]
      },
      "maxItems": 100,
      "description": "The users or bots who own the bot connection to the `integration_id` and have access to the webhook's `entity`. Only present for public integrations."
    }
  },
  "required": [
    "id",
    "timestamp",
    "workspace_id",
    "workspace_name",
    "subscription_id",
    "integration_id",
    "authors",
    "attempt_number",
    "api_version"
  ]
}

blockIdCommentParentResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "block_id",
      "description": "Always `block_id`"
    },
    "block_id": {
      "$ref": "#/components/schemas/idResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "block_id"
  ],
  "title": "Block Id"
}

blockIdParentForBlockBasedObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "block_id",
      "description": "The parent type."
    },
    "block_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent block."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "block_id"
  ]
}

blockObjectRequest

{
  "anyOf": [
    {
      "title": "Embed",
      "type": "object",
      "properties": {
        "embed": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
            },
            {
              "$ref": "#/components/schemas/embedFileUploadRequest"
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "embed"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "embed"
      ]
    },
    {
      "title": "Bookmark",
      "type": "object",
      "properties": {
        "bookmark": {
          "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "bookmark"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bookmark"
      ]
    },
    {
      "title": "Image",
      "type": "object",
      "properties": {
        "image": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "image"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "image"
      ]
    },
    {
      "title": "Video",
      "type": "object",
      "properties": {
        "video": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "video"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "video"
      ]
    },
    {
      "title": "Pdf",
      "type": "object",
      "properties": {
        "pdf": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "pdf"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "pdf"
      ]
    },
    {
      "title": "File",
      "type": "object",
      "properties": {
        "file": {
          "$ref": "#/components/schemas/mediaContentWithFileNameAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "file"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "file"
      ]
    },
    {
      "title": "Audio",
      "type": "object",
      "properties": {
        "audio": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "audio"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "audio"
      ]
    },
    {
      "title": "Code",
      "type": "object",
      "properties": {
        "code": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "language": {
              "$ref": "#/components/schemas/languageRequest"
            },
            "caption": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text",
            "language"
          ]
        },
        "type": {
          "type": "string",
          "const": "code"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "code"
      ]
    },
    {
      "title": "Equation",
      "type": "object",
      "properties": {
        "equation": {
          "$ref": "#/components/schemas/contentWithExpressionRequest"
        },
        "type": {
          "type": "string",
          "const": "equation"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "equation"
      ]
    },
    {
      "title": "Divider",
      "type": "object",
      "properties": {
        "divider": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "divider"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "divider"
      ]
    },
    {
      "title": "Breadcrumb",
      "type": "object",
      "properties": {
        "breadcrumb": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "breadcrumb"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "breadcrumb"
      ]
    },
    {
      "title": "Tab",
      "type": "object",
      "properties": {
        "tab": {
          "$ref": "#/components/schemas/tabRequestWithNestedTabItemChildren"
        },
        "type": {
          "type": "string",
          "const": "tab"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "tab"
      ]
    },
    {
      "title": "Table Of Contents",
      "type": "object",
      "properties": {
        "table_of_contents": {
          "type": "object",
          "properties": {
            "color": {
              "$ref": "#/components/schemas/apiColor"
            }
          },
          "additionalProperties": false
        },
        "type": {
          "type": "string",
          "const": "table_of_contents"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_of_contents"
      ]
    },
    {
      "title": "Link To Page",
      "type": "object",
      "properties": {
        "link_to_page": {
          "anyOf": [
            {
              "title": "Page Id",
              "type": "object",
              "properties": {
                "page_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "page_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "page_id"
              ]
            },
            {
              "title": "Database Id",
              "type": "object",
              "properties": {
                "database_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "database_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "database_id"
              ]
            },
            {
              "title": "Comment Id",
              "type": "object",
              "properties": {
                "comment_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "comment_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "comment_id"
              ]
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "link_to_page"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "link_to_page"
      ]
    },
    {
      "title": "Table Row",
      "type": "object",
      "properties": {
        "table_row": {
          "$ref": "#/components/schemas/contentWithTableRowRequest"
        },
        "type": {
          "type": "string",
          "const": "table_row"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_row"
      ]
    },
    {
      "title": "Table",
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/components/schemas/tableRequestWithTableRowChildren"
        },
        "type": {
          "type": "string",
          "const": "table"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table"
      ]
    },
    {
      "title": "Column List",
      "type": "object",
      "properties": {
        "column_list": {
          "$ref": "#/components/schemas/columnListRequest"
        },
        "type": {
          "type": "string",
          "const": "column_list"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "column_list"
      ]
    },
    {
      "title": "Column",
      "type": "object",
      "properties": {
        "column": {
          "$ref": "#/components/schemas/columnWithChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "column"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "column"
      ]
    },
    {
      "title": "Heading 1",
      "type": "object",
      "properties": {
        "heading_1": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "is_toggleable": {
              "type": "boolean"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "heading_1"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_1"
      ]
    },
    {
      "title": "Heading 2",
      "type": "object",
      "properties": {
        "heading_2": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "is_toggleable": {
              "type": "boolean"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "heading_2"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_2"
      ]
    },
    {
      "title": "Heading 3",
      "type": "object",
      "properties": {
        "heading_3": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "is_toggleable": {
              "type": "boolean"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "heading_3"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_3"
      ]
    },
    {
      "title": "Heading 4",
      "type": "object",
      "properties": {
        "heading_4": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "is_toggleable": {
              "type": "boolean"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "heading_4"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_4"
      ]
    },
    {
      "title": "Paragraph",
      "type": "object",
      "properties": {
        "paragraph": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "paragraph"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "paragraph"
      ]
    },
    {
      "title": "Bulleted List Item",
      "type": "object",
      "properties": {
        "bulleted_list_item": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "bulleted_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bulleted_list_item"
      ]
    },
    {
      "title": "Numbered List Item",
      "type": "object",
      "properties": {
        "numbered_list_item": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "numbered_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "numbered_list_item"
      ]
    },
    {
      "title": "Quote",
      "type": "object",
      "properties": {
        "quote": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "quote"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "quote"
      ]
    },
    {
      "title": "To Do",
      "type": "object",
      "properties": {
        "to_do": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            },
            "checked": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "to_do"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "to_do"
      ]
    },
    {
      "title": "Toggle",
      "type": "object",
      "properties": {
        "toggle": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "toggle"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "toggle"
      ]
    },
    {
      "title": "Template",
      "type": "object",
      "properties": {
        "template": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "template"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "template"
      ]
    },
    {
      "title": "Callout",
      "type": "object",
      "properties": {
        "callout": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "callout"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "callout"
      ]
    },
    {
      "title": "Synced Block",
      "type": "object",
      "properties": {
        "synced_block": {
          "type": "object",
          "properties": {
            "synced_from": {
              "title": "Block Id",
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "block_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "block_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "block_id"
              ]
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "synced_from"
          ]
        },
        "type": {
          "type": "string",
          "const": "synced_block"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "synced_block"
      ]
    }
  ]
}

blockObjectRequestWithoutChildren

{
  "anyOf": [
    {
      "title": "Embed",
      "type": "object",
      "properties": {
        "embed": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
            },
            {
              "$ref": "#/components/schemas/embedFileUploadRequest"
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "embed"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "embed"
      ]
    },
    {
      "title": "Bookmark",
      "type": "object",
      "properties": {
        "bookmark": {
          "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "bookmark"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bookmark"
      ]
    },
    {
      "title": "Image",
      "type": "object",
      "properties": {
        "image": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "image"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "image"
      ]
    },
    {
      "title": "Video",
      "type": "object",
      "properties": {
        "video": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "video"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "video"
      ]
    },
    {
      "title": "Pdf",
      "type": "object",
      "properties": {
        "pdf": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "pdf"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "pdf"
      ]
    },
    {
      "title": "File",
      "type": "object",
      "properties": {
        "file": {
          "$ref": "#/components/schemas/mediaContentWithFileNameAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "file"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "file"
      ]
    },
    {
      "title": "Audio",
      "type": "object",
      "properties": {
        "audio": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "audio"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "audio"
      ]
    },
    {
      "title": "Code",
      "type": "object",
      "properties": {
        "code": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "language": {
              "$ref": "#/components/schemas/languageRequest"
            },
            "caption": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text",
            "language"
          ]
        },
        "type": {
          "type": "string",
          "const": "code"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "code"
      ]
    },
    {
      "title": "Equation",
      "type": "object",
      "properties": {
        "equation": {
          "$ref": "#/components/schemas/contentWithExpressionRequest"
        },
        "type": {
          "type": "string",
          "const": "equation"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "equation"
      ]
    },
    {
      "title": "Divider",
      "type": "object",
      "properties": {
        "divider": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "divider"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "divider"
      ]
    },
    {
      "title": "Breadcrumb",
      "type": "object",
      "properties": {
        "breadcrumb": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "breadcrumb"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "breadcrumb"
      ]
    },
    {
      "title": "Tab",
      "type": "object",
      "properties": {
        "tab": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "tab"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "tab"
      ]
    },
    {
      "title": "Table Of Contents",
      "type": "object",
      "properties": {
        "table_of_contents": {
          "type": "object",
          "properties": {
            "color": {
              "$ref": "#/components/schemas/apiColor"
            }
          },
          "additionalProperties": false
        },
        "type": {
          "type": "string",
          "const": "table_of_contents"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_of_contents"
      ]
    },
    {
      "title": "Link To Page",
      "type": "object",
      "properties": {
        "link_to_page": {
          "anyOf": [
            {
              "title": "Page Id",
              "type": "object",
              "properties": {
                "page_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "page_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "page_id"
              ]
            },
            {
              "title": "Database Id",
              "type": "object",
              "properties": {
                "database_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "database_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "database_id"
              ]
            },
            {
              "title": "Comment Id",
              "type": "object",
              "properties": {
                "comment_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "comment_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "comment_id"
              ]
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "link_to_page"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "link_to_page"
      ]
    },
    {
      "title": "Table Row",
      "type": "object",
      "properties": {
        "table_row": {
          "$ref": "#/components/schemas/contentWithTableRowRequest"
        },
        "type": {
          "type": "string",
          "const": "table_row"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_row"
      ]
    },
    {
      "title": "Heading 1",
      "type": "object",
      "properties": {
        "heading_1": {
          "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_1"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_1"
      ]
    },
    {
      "title": "Heading 2",
      "type": "object",
      "properties": {
        "heading_2": {
          "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_2"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_2"
      ]
    },
    {
      "title": "Heading 3",
      "type": "object",
      "properties": {
        "heading_3": {
          "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_3"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_3"
      ]
    },
    {
      "title": "Heading 4",
      "type": "object",
      "properties": {
        "heading_4": {
          "$ref": "#/components/schemas/headerContentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_4"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_4"
      ]
    },
    {
      "title": "Paragraph",
      "type": "object",
      "properties": {
        "paragraph": {
          "$ref": "#/components/schemas/contentWithRichTextColorAndIconRequest"
        },
        "type": {
          "type": "string",
          "const": "paragraph"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "paragraph"
      ]
    },
    {
      "title": "Bulleted List Item",
      "type": "object",
      "properties": {
        "bulleted_list_item": {
          "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "bulleted_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bulleted_list_item"
      ]
    },
    {
      "title": "Numbered List Item",
      "type": "object",
      "properties": {
        "numbered_list_item": {
          "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "numbered_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "numbered_list_item"
      ]
    },
    {
      "title": "Quote",
      "type": "object",
      "properties": {
        "quote": {
          "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "quote"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "quote"
      ]
    },
    {
      "title": "To Do",
      "type": "object",
      "properties": {
        "to_do": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "checked": {
              "type": "boolean"
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "to_do"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "to_do"
      ]
    },
    {
      "title": "Toggle",
      "type": "object",
      "properties": {
        "toggle": {
          "$ref": "#/components/schemas/contentWithRichTextAndColorRequest"
        },
        "type": {
          "type": "string",
          "const": "toggle"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "toggle"
      ]
    },
    {
      "title": "Template",
      "type": "object",
      "properties": {
        "template": {
          "$ref": "#/components/schemas/contentWithRichTextRequest"
        },
        "type": {
          "type": "string",
          "const": "template"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "template"
      ]
    },
    {
      "title": "Callout",
      "type": "object",
      "properties": {
        "callout": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest"
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "callout"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "callout"
      ]
    },
    {
      "title": "Synced Block",
      "type": "object",
      "properties": {
        "synced_block": {
          "type": "object",
          "properties": {
            "synced_from": {
              "title": "Block Id",
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "block_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "block_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "block_id"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "synced_from"
          ]
        },
        "type": {
          "type": "string",
          "const": "synced_block"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "synced_block"
      ]
    }
  ]
}

blockObjectResponse

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/paragraphBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/heading1BlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/heading2BlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/heading3BlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/heading4BlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/bulletedListItemBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/numberedListItemBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/quoteBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/toDoBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/toggleBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/templateBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/syncedBlockBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/childPageBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/childDatabaseBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/equationBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/codeBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/calloutBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/dividerBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/breadcrumbBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/tableOfContentsBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/tabBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/columnListBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/columnBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/linkToPageBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/tableBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/tableRowBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/meetingNotesBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/embedBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/bookmarkBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/imageBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/videoBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/pdfBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/fileBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/audioBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/linkPreviewBlockObjectResponse"
    },
    {
      "$ref": "#/components/schemas/unsupportedBlockObjectResponse"
    }
  ]
}

blockObjectWithSingleLevelOfChildrenRequest

{
  "anyOf": [
    {
      "title": "Embed",
      "type": "object",
      "properties": {
        "embed": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
            },
            {
              "$ref": "#/components/schemas/embedFileUploadRequest"
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "embed"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "embed"
      ]
    },
    {
      "title": "Bookmark",
      "type": "object",
      "properties": {
        "bookmark": {
          "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "bookmark"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bookmark"
      ]
    },
    {
      "title": "Image",
      "type": "object",
      "properties": {
        "image": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "image"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "image"
      ]
    },
    {
      "title": "Video",
      "type": "object",
      "properties": {
        "video": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "video"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "video"
      ]
    },
    {
      "title": "Pdf",
      "type": "object",
      "properties": {
        "pdf": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "pdf"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "pdf"
      ]
    },
    {
      "title": "File",
      "type": "object",
      "properties": {
        "file": {
          "$ref": "#/components/schemas/mediaContentWithFileNameAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "file"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "file"
      ]
    },
    {
      "title": "Audio",
      "type": "object",
      "properties": {
        "audio": {
          "$ref": "#/components/schemas/mediaContentWithFileAndCaptionRequest"
        },
        "type": {
          "type": "string",
          "const": "audio"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "audio"
      ]
    },
    {
      "title": "Code",
      "type": "object",
      "properties": {
        "code": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "language": {
              "$ref": "#/components/schemas/languageRequest"
            },
            "caption": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text",
            "language"
          ]
        },
        "type": {
          "type": "string",
          "const": "code"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "code"
      ]
    },
    {
      "title": "Equation",
      "type": "object",
      "properties": {
        "equation": {
          "$ref": "#/components/schemas/contentWithExpressionRequest"
        },
        "type": {
          "type": "string",
          "const": "equation"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "equation"
      ]
    },
    {
      "title": "Divider",
      "type": "object",
      "properties": {
        "divider": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "divider"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "divider"
      ]
    },
    {
      "title": "Breadcrumb",
      "type": "object",
      "properties": {
        "breadcrumb": {
          "$ref": "#/components/schemas/emptyObject"
        },
        "type": {
          "type": "string",
          "const": "breadcrumb"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "breadcrumb"
      ]
    },
    {
      "title": "Tab",
      "type": "object",
      "properties": {
        "tab": {
          "$ref": "#/components/schemas/tabRequestWithTabItemChildren"
        },
        "type": {
          "type": "string",
          "const": "tab"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "tab"
      ]
    },
    {
      "title": "Table Of Contents",
      "type": "object",
      "properties": {
        "table_of_contents": {
          "type": "object",
          "properties": {
            "color": {
              "$ref": "#/components/schemas/apiColor"
            }
          },
          "additionalProperties": false
        },
        "type": {
          "type": "string",
          "const": "table_of_contents"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_of_contents"
      ]
    },
    {
      "title": "Link To Page",
      "type": "object",
      "properties": {
        "link_to_page": {
          "anyOf": [
            {
              "title": "Page Id",
              "type": "object",
              "properties": {
                "page_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "page_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "page_id"
              ]
            },
            {
              "title": "Database Id",
              "type": "object",
              "properties": {
                "database_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "database_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "database_id"
              ]
            },
            {
              "title": "Comment Id",
              "type": "object",
              "properties": {
                "comment_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "comment_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "comment_id"
              ]
            }
          ]
        },
        "type": {
          "type": "string",
          "const": "link_to_page"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "link_to_page"
      ]
    },
    {
      "title": "Table Row",
      "type": "object",
      "properties": {
        "table_row": {
          "$ref": "#/components/schemas/contentWithTableRowRequest"
        },
        "type": {
          "type": "string",
          "const": "table_row"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table_row"
      ]
    },
    {
      "title": "Heading 1",
      "type": "object",
      "properties": {
        "heading_1": {
          "$ref": "#/components/schemas/headerContentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_1"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_1"
      ]
    },
    {
      "title": "Heading 2",
      "type": "object",
      "properties": {
        "heading_2": {
          "$ref": "#/components/schemas/headerContentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_2"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_2"
      ]
    },
    {
      "title": "Heading 3",
      "type": "object",
      "properties": {
        "heading_3": {
          "$ref": "#/components/schemas/headerContentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_3"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_3"
      ]
    },
    {
      "title": "Heading 4",
      "type": "object",
      "properties": {
        "heading_4": {
          "$ref": "#/components/schemas/headerContentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "heading_4"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "heading_4"
      ]
    },
    {
      "title": "Paragraph",
      "type": "object",
      "properties": {
        "paragraph": {
          "$ref": "#/components/schemas/paragraphWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "paragraph"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "paragraph"
      ]
    },
    {
      "title": "Bulleted List Item",
      "type": "object",
      "properties": {
        "bulleted_list_item": {
          "$ref": "#/components/schemas/contentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "bulleted_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "bulleted_list_item"
      ]
    },
    {
      "title": "Numbered List Item",
      "type": "object",
      "properties": {
        "numbered_list_item": {
          "$ref": "#/components/schemas/contentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "numbered_list_item"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "numbered_list_item"
      ]
    },
    {
      "title": "Quote",
      "type": "object",
      "properties": {
        "quote": {
          "$ref": "#/components/schemas/contentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "quote"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "quote"
      ]
    },
    {
      "title": "Table",
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/components/schemas/tableRequestWithTableRowChildren"
        },
        "type": {
          "type": "string",
          "const": "table"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "table"
      ]
    },
    {
      "title": "To Do",
      "type": "object",
      "properties": {
        "to_do": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
              },
              "maxItems": 100
            },
            "checked": {
              "type": "boolean"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "to_do"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "to_do"
      ]
    },
    {
      "title": "Toggle",
      "type": "object",
      "properties": {
        "toggle": {
          "$ref": "#/components/schemas/contentWithSingleLevelOfChildrenRequest"
        },
        "type": {
          "type": "string",
          "const": "toggle"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "toggle"
      ]
    },
    {
      "title": "Template",
      "type": "object",
      "properties": {
        "template": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "template"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "template"
      ]
    },
    {
      "title": "Callout",
      "type": "object",
      "properties": {
        "callout": {
          "type": "object",
          "properties": {
            "rich_text": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/richTextItemRequest"
              },
              "maxItems": 100
            },
            "color": {
              "$ref": "#/components/schemas/apiColor"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
              },
              "maxItems": 100
            },
            "icon": {
              "$ref": "#/components/schemas/pageIconRequest"
            }
          },
          "additionalProperties": false,
          "required": [
            "rich_text"
          ]
        },
        "type": {
          "type": "string",
          "const": "callout"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "callout"
      ]
    },
    {
      "title": "Synced Block",
      "type": "object",
      "properties": {
        "synced_block": {
          "type": "object",
          "properties": {
            "synced_from": {
              "title": "Block Id",
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "block_id": {
                  "$ref": "#/components/schemas/idRequest"
                },
                "type": {
                  "type": "string",
                  "const": "block_id"
                }
              },
              "additionalProperties": false,
              "required": [
                "block_id"
              ]
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
              },
              "maxItems": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "synced_from"
          ]
        },
        "type": {
          "type": "string",
          "const": "synced_block"
        },
        "object": {
          "type": "string",
          "const": "block"
        }
      },
      "additionalProperties": false,
      "required": [
        "synced_block"
      ]
    }
  ]
}

boardViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "board",
      "description": "The view type. Must be \"board\"."
    },
    "group_by": {
      "$ref": "#/components/schemas/groupByConfigRequest",
      "description": "Group-by configuration for board columns."
    },
    "sub_group_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Secondary group-by configuration for sub-grouping within columns. Pass null to remove sub-grouping."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration on cards. Pass null to clear."
    },
    "cover": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/coverConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cover image configuration for cards. Pass null to clear."
    },
    "cover_size": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large"
          ],
          "description": "One of: `small`, `medium`, `large`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Size of the cover image on cards. Pass null to clear."
    },
    "cover_aspect": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "contain",
            "cover"
          ],
          "description": "One of: `contain`, `cover`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Aspect ratio mode for cover images. \"contain\" fits the image, \"cover\" fills the area. Pass null to clear."
    },
    "card_layout": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "list",
            "compact"
          ],
          "description": "One of: `list`, `compact`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Card layout mode. \"list\" shows full cards, \"compact\" shows condensed cards. Pass null to clear."
    }
  },
  "required": [
    "type",
    "group_by"
  ]
}

boardViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "board",
      "description": "The view configuration type."
    },
    "group_by": {
      "$ref": "#/components/schemas/groupByConfigResponse",
      "description": "Column (horizontal) grouping - required for board view."
    },
    "sub_group_by": {
      "$ref": "#/components/schemas/groupByConfigResponse",
      "description": "Sub-grouping (vertical swimlanes within columns)."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display on each card."
    },
    "cover": {
      "$ref": "#/components/schemas/coverConfigResponse",
      "description": "Card cover/preview image configuration."
    },
    "cover_size": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "large"
      ],
      "description": "Cover image size."
    },
    "cover_aspect": {
      "type": "string",
      "enum": [
        "contain",
        "cover"
      ],
      "description": "Cover image aspect ratio."
    },
    "card_layout": {
      "type": "string",
      "enum": [
        "list",
        "compact"
      ],
      "description": "Card layout mode (list shows all properties, compact shows inline)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "group_by"
  ]
}

bookmarkBlockObjectResponse

{
  "title": "Bookmark",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "bookmark"
    },
    "bookmark": {
      "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "bookmark",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

booleanFormulaPropertyResponse

{
  "title": "Boolean",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "boolean"
    },
    "boolean": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "required": [
    "type",
    "boolean"
  ]
}

booleanFormulaPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "boolean",
      "description": "Always `boolean`"
    },
    "boolean": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "boolean"
  ],
  "title": "Boolean"
}

botInfoResponse

{
  "type": "object",
  "properties": {
    "owner": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "user",
              "description": "Always `user`"
            },
            "user": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/idResponse",
                      "description": "The ID of the user."
                    },
                    "object": {
                      "type": "string",
                      "const": "user",
                      "description": "The user object type name."
                    },
                    "name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The name of the user."
                    },
                    "avatar_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The avatar URL of the user."
                    },
                    "type": {
                      "type": "string",
                      "const": "person",
                      "description": "The type of the user."
                    },
                    "person": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "description": "The email of the person."
                        },
                        "email_verified": {
                          "type": "boolean",
                          "description": "Whether the person's email is verified."
                        }
                      },
                      "additionalProperties": false,
                      "description": "The person info of the user."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "object",
                    "name",
                    "avatar_url",
                    "type",
                    "person"
                  ]
                },
                {
                  "$ref": "#/components/schemas/partialUserObjectResponse"
                }
              ],
              "description": "Details about the owner of the bot, when the `type` of the owner is `user`. This means the bot is for a integration."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "user"
          ],
          "title": "User"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "workspace",
              "description": "Always `workspace`"
            },
            "workspace": {
              "type": "boolean",
              "const": true,
              "description": "Details about the owner of the bot, when the `type` of the owner is `workspace`. This means the bot is for an internal integration."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "workspace"
          ],
          "title": "Workspace"
        }
      ],
      "description": "Details about the owner of the bot."
    },
    "workspace_id": {
      "type": "string",
      "description": "The ID of the bot's workspace."
    },
    "workspace_limits": {
      "type": "object",
      "properties": {
        "max_file_upload_size_in_bytes": {
          "type": "integer",
          "minimum": 0,
          "description": "The maximum allowable size of a file upload, in bytes"
        }
      },
      "additionalProperties": false,
      "required": [
        "max_file_upload_size_in_bytes"
      ],
      "description": "Limits and restrictions that apply to the bot's workspace"
    },
    "workspace_name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The name of the bot's workspace."
    }
  },
  "additionalProperties": false,
  "required": [
    "owner",
    "workspace_id",
    "workspace_limits",
    "workspace_name"
  ]
}

botUserObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "bot",
      "description": "Indicates this user is a bot."
    },
    "bot": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/emptyObject"
        },
        {
          "$ref": "#/components/schemas/botInfoResponse"
        }
      ],
      "description": "Details about the bot, when the `type` of the user is `bot`."
    }
  },
  "required": [
    "type",
    "bot"
  ],
  "title": "Bot"
}

breadcrumbBlockObjectResponse

{
  "title": "Breadcrumb",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "breadcrumb"
    },
    "breadcrumb": {
      "$ref": "#/components/schemas/emptyObject"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "breadcrumb",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

bulletedListItemBlockObjectResponse

{
  "title": "Bulleted List Item",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "bulleted_list_item"
    },
    "bulleted_list_item": {
      "$ref": "#/components/schemas/contentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "bulleted_list_item",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

buttonPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "button",
      "description": "Always `button`"
    },
    "button": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "button"
  ],
  "title": "Button"
}

buttonPropertyItemObjectResponse

{
  "title": "Button",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "button"
    },
    "button": {
      "$ref": "#/components/schemas/emptyObject"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "button",
    "object",
    "id"
  ]
}

buttonSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "button",
      "description": "Always `button`"
    },
    "button": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "button"
  ],
  "title": "Button"
}

calendarViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "calendar",
      "description": "The view type. Must be \"calendar\"."
    },
    "date_property_id": {
      "type": "string",
      "description": "Property ID of the date property used to position items on the calendar."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration on calendar cards. Pass null to clear."
    },
    "view_range": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "week",
            "month"
          ],
          "description": "One of: `week`, `month`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Default calendar range. \"week\" shows a week view, \"month\" shows a month view. Pass null to clear."
    },
    "show_weekends": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to show weekend days. Pass null to clear."
    }
  },
  "required": [
    "type",
    "date_property_id"
  ]
}

calendarViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "calendar",
      "description": "The view configuration type."
    },
    "date_property_id": {
      "type": "string",
      "description": "Date property used to position items on the calendar - required."
    },
    "date_property_name": {
      "type": "string",
      "description": "Date property name (convenience field)."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display on calendar event cards."
    },
    "view_range": {
      "type": "string",
      "enum": [
        "week",
        "month"
      ],
      "description": "Calendar view range."
    },
    "show_weekends": {
      "type": "boolean",
      "description": "Whether to show weekend days."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "date_property_id"
  ]
}

calloutBlockObjectResponse

{
  "title": "Callout",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "callout"
    },
    "callout": {
      "type": "object",
      "properties": {
        "rich_text": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemResponse"
          },
          "maxItems": 100
        },
        "color": {
          "$ref": "#/components/schemas/apiColor"
        },
        "icon": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/pageIconResponse"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "rich_text",
        "color",
        "icon"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "callout",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

chartAggregationRequest

{
  "type": "object",
  "properties": {
    "aggregator": {
      "type": "string",
      "enum": [
        "count",
        "count_values",
        "sum",
        "average",
        "median",
        "min",
        "max",
        "range",
        "unique",
        "empty",
        "not_empty",
        "percent_empty",
        "percent_not_empty",
        "checked",
        "unchecked",
        "percent_checked",
        "percent_unchecked",
        "earliest_date",
        "latest_date",
        "date_range"
      ],
      "description": "The aggregation operator. \"count\" counts all rows and does not require a property_id. All other operators require a property_id."
    },
    "property_id": {
      "type": "string",
      "description": "The property to aggregate on. Required for all operators except \"count\"."
    }
  },
  "required": [
    "aggregator"
  ]
}

chartAggregationResponse

{
  "type": "object",
  "properties": {
    "aggregator": {
      "type": "string",
      "enum": [
        "count",
        "count_values",
        "sum",
        "average",
        "median",
        "min",
        "max",
        "range",
        "unique",
        "empty",
        "not_empty",
        "percent_empty",
        "percent_not_empty",
        "checked",
        "unchecked",
        "percent_checked",
        "percent_unchecked",
        "earliest_date",
        "latest_date",
        "date_range"
      ],
      "description": "The aggregation operator. \"count\" counts all rows and does not require a property_id. All other operators require a property_id."
    },
    "property_id": {
      "type": "string",
      "description": "The property to aggregate on. Required for all operators except \"count\"."
    }
  },
  "additionalProperties": false,
  "required": [
    "aggregator"
  ]
}

chartReferenceLineRequest

{
  "type": "object",
  "properties": {
    "value": {
      "type": "number",
      "description": "The y-axis value where the reference line is drawn."
    },
    "label": {
      "type": "string",
      "description": "Label displayed alongside the reference line."
    },
    "color": {
      "type": "string",
      "enum": [
        "gray",
        "lightgray",
        "brown",
        "yellow",
        "orange",
        "green",
        "blue",
        "purple",
        "pink",
        "red"
      ],
      "description": "Color of the reference line."
    },
    "dash_style": {
      "type": "string",
      "enum": [
        "solid",
        "dash"
      ],
      "description": "Line style: \"solid\" for a continuous line, \"dash\" for a dashed line."
    },
    "id": {
      "type": "string",
      "description": "Unique identifier for the reference line. Auto-generated if omitted."
    }
  },
  "required": [
    "value",
    "label",
    "color",
    "dash_style"
  ]
}

chartReferenceLineResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the reference line."
    },
    "value": {
      "type": "number",
      "description": "The y-axis value where the reference line is drawn."
    },
    "label": {
      "type": "string",
      "description": "Label displayed alongside the reference line."
    },
    "color": {
      "type": "string",
      "enum": [
        "gray",
        "lightgray",
        "brown",
        "yellow",
        "orange",
        "green",
        "blue",
        "purple",
        "pink",
        "red"
      ],
      "description": "Color of the reference line."
    },
    "dash_style": {
      "type": "string",
      "enum": [
        "solid",
        "dash"
      ],
      "description": "Line style: \"solid\" for a continuous line, \"dash\" for a dashed line."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "value",
    "label",
    "color",
    "dash_style"
  ]
}

chartViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "chart",
      "description": "The view type. Must be \"chart\"."
    },
    "chart_type": {
      "type": "string",
      "enum": [
        "column",
        "bar",
        "line",
        "donut",
        "number"
      ],
      "description": "The chart type."
    },
    "x_axis": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "X-axis grouping configuration for grouped data mode. Pass null to clear."
    },
    "y_axis": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/chartAggregationRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Y-axis aggregation for grouped data mode. Pass null to clear."
    },
    "x_axis_property_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Property ID for x-axis values in results mode. Pass null to clear."
    },
    "y_axis_property_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Property ID for y-axis values in results mode. Pass null to clear."
    },
    "value": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/chartAggregationRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Aggregation for number charts. Pass null to clear."
    },
    "sort": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "manual",
            "x_ascending",
            "x_descending",
            "y_ascending",
            "y_descending"
          ],
          "description": "One of: `manual`, `x_ascending`, `x_descending`, `y_ascending`, `y_descending`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Sort order for chart data. Pass null to clear."
    },
    "color_theme": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "gray",
            "blue",
            "yellow",
            "green",
            "purple",
            "teal",
            "orange",
            "pink",
            "red",
            "auto",
            "colorful"
          ],
          "description": "One of: `gray`, `blue`, `yellow`, `green`, `purple`, `teal`, `orange`, `pink`, `red`, `auto`, `colorful`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Color theme. Pass null to clear."
    },
    "height": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large",
            "extra_large"
          ],
          "description": "One of: `small`, `medium`, `large`, `extra_large`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Chart height. Pass null to clear."
    },
    "hide_empty_groups": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to hide groups with no data. Pass null to clear."
    },
    "legend_position": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "off",
            "bottom",
            "side"
          ],
          "description": "One of: `off`, `bottom`, `side`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Legend position. Pass null to clear."
    },
    "show_data_labels": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to show data labels. Pass null to clear."
    },
    "axis_labels": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "x_axis",
            "y_axis",
            "both"
          ],
          "description": "One of: `none`, `x_axis`, `y_axis`, `both`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Which axis labels to show. Pass null to clear."
    },
    "grid_lines": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "horizontal",
            "vertical",
            "both"
          ],
          "description": "One of: `none`, `horizontal`, `vertical`, `both`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Which grid lines to show. Pass null to clear."
    },
    "cumulative": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cumulative values (line only). Pass null to clear."
    },
    "smooth_line": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Smooth line curves (line only). Pass null to clear."
    },
    "hide_line_fill_area": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Hide area fill (line only). Pass null to clear."
    },
    "group_style": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "percent",
            "side_by_side"
          ],
          "description": "One of: `normal`, `percent`, `side_by_side`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Grouped/stacked bar display style. Pass null to clear."
    },
    "y_axis_min": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom y-axis minimum. Pass null to clear."
    },
    "y_axis_max": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom y-axis maximum. Pass null to clear."
    },
    "donut_labels": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "value",
            "name",
            "name_and_value"
          ],
          "description": "One of: `none`, `value`, `name`, `name_and_value`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Donut slice labels. Pass null to clear."
    },
    "hide_title": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Hide title (number only). Pass null to clear."
    },
    "stack_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Stack-by grouping for stacked/grouped bar charts. Pass null to clear."
    },
    "reference_lines": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/chartReferenceLineRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Reference lines on the chart. Pass null to clear."
    },
    "caption": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Chart caption text. Pass null to clear."
    },
    "color_by_value": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to color chart elements by their numeric value (gradient coloring). Pass null to clear."
    }
  },
  "required": [
    "type",
    "chart_type"
  ]
}

chartViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "chart",
      "description": "The view configuration type."
    },
    "chart_type": {
      "type": "string",
      "enum": [
        "column",
        "bar",
        "line",
        "donut",
        "number"
      ],
      "description": "The chart type: column (vertical bars), bar (horizontal bars), line, donut, or number (single value display)."
    },
    "x_axis": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "X-axis grouping configuration for column/bar/line/donut charts using grouped data. Null when using results (raw property values) mode."
    },
    "y_axis": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/chartAggregationResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Y-axis aggregation for column/bar/line/donut charts using grouped data. Null when using results mode."
    },
    "x_axis_property_id": {
      "type": "string",
      "description": "Property ID for the x-axis name values when using results (raw property values) mode."
    },
    "y_axis_property_id": {
      "type": "string",
      "description": "Property ID for the y-axis numeric values when using results (raw property values) mode."
    },
    "value": {
      "$ref": "#/components/schemas/chartAggregationResponse",
      "description": "Aggregation configuration for number charts (single value display)."
    },
    "sort": {
      "type": "string",
      "enum": [
        "manual",
        "x_ascending",
        "x_descending",
        "y_ascending",
        "y_descending"
      ],
      "description": "Sort order for chart data."
    },
    "color_theme": {
      "type": "string",
      "enum": [
        "gray",
        "blue",
        "yellow",
        "green",
        "purple",
        "teal",
        "orange",
        "pink",
        "red",
        "auto",
        "colorful"
      ],
      "description": "Color theme for the chart."
    },
    "height": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "large",
        "extra_large"
      ],
      "description": "Chart height."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups with no data on the x-axis."
    },
    "legend_position": {
      "type": "string",
      "enum": [
        "off",
        "bottom",
        "side"
      ],
      "description": "Legend display position. \"off\" hides the legend."
    },
    "show_data_labels": {
      "type": "boolean",
      "description": "Whether to show data value labels on chart elements."
    },
    "axis_labels": {
      "type": "string",
      "enum": [
        "none",
        "x_axis",
        "y_axis",
        "both"
      ],
      "description": "Which axis labels to display."
    },
    "grid_lines": {
      "type": "string",
      "enum": [
        "none",
        "horizontal",
        "vertical",
        "both"
      ],
      "description": "Which grid lines to display."
    },
    "cumulative": {
      "type": "boolean",
      "description": "Whether to show cumulative values (line charts only)."
    },
    "smooth_line": {
      "type": "boolean",
      "description": "Whether to use smooth curves (line charts only)."
    },
    "hide_line_fill_area": {
      "type": "boolean",
      "description": "Whether to hide the shaded area under the line (line charts only)."
    },
    "group_style": {
      "type": "string",
      "enum": [
        "normal",
        "percent",
        "side_by_side"
      ],
      "description": "How grouped/stacked bars are displayed. \"normal\" stacks values, \"percent\" normalizes to 100%, \"side_by_side\" places bars next to each other."
    },
    "y_axis_min": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom minimum value for the y-axis. Null clears the override."
    },
    "y_axis_max": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "Custom maximum value for the y-axis. Null clears the override."
    },
    "donut_labels": {
      "type": "string",
      "enum": [
        "none",
        "value",
        "name",
        "name_and_value"
      ],
      "description": "What to display on donut chart slices."
    },
    "hide_title": {
      "type": "boolean",
      "description": "Whether to hide the title label (number charts only)."
    },
    "stack_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Stack-by grouping configuration for stacked/grouped bar charts (column/bar/line only). Null when not stacked."
    },
    "reference_lines": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/chartReferenceLineResponse"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Reference lines drawn on the chart. Null when no reference lines are configured."
    },
    "caption": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Text caption displayed below the chart. Null when no caption is shown."
    },
    "color_by_value": {
      "type": "boolean",
      "description": "Whether chart elements are colored by their numeric value (gradient coloring)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "chart_type"
  ]
}

checkboxDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "Always `checkbox`"
    },
    "checkbox": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "checkbox"
  ],
  "title": "Checkbox"
}

checkboxGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

checkboxGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (only manual for checkbox)."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

checkboxPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "Always `checkbox`"
    },
    "checkbox": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "checkbox"
  ],
  "title": "Checkbox"
}

checkboxPropertyFilter

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "equals": {
          "type": "boolean"
        }
      },
      "required": [
        "equals"
      ]
    },
    {
      "type": "object",
      "properties": {
        "does_not_equal": {
          "type": "boolean"
        }
      },
      "required": [
        "does_not_equal"
      ]
    }
  ]
}

checkboxPropertyItemObjectResponse

{
  "title": "Checkbox",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox"
    },
    "checkbox": {
      "type": "boolean"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "checkbox",
    "object",
    "id"
  ]
}

checkboxSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "Always `checkbox`"
    },
    "checkbox": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "checkbox"
  ],
  "title": "Checkbox"
}

childDatabaseBlockObjectResponse

{
  "title": "Child Database",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "child_database"
    },
    "child_database": {
      "$ref": "#/components/schemas/titleObjectResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "child_database",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

childPageBlockObjectResponse

{
  "title": "Child Page",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "child_page"
    },
    "child_page": {
      "$ref": "#/components/schemas/titleObjectResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "child_page",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

codeBlockObjectResponse

{
  "title": "Code",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "code"
    },
    "code": {
      "type": "object",
      "properties": {
        "rich_text": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemResponse"
          },
          "maxItems": 100
        },
        "caption": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemResponse"
          },
          "maxItems": 100
        },
        "language": {
          "$ref": "#/components/schemas/languageRequest"
        }
      },
      "required": [
        "rich_text",
        "caption",
        "language"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "code",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

columnBlockObjectResponse

{
  "title": "Column",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "column"
    },
    "column": {
      "$ref": "#/components/schemas/columnResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "column",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

columnBlockWithChildrenRequest

{
  "title": "Column",
  "type": "object",
  "properties": {
    "column": {
      "$ref": "#/components/schemas/columnWithChildrenRequest"
    },
    "type": {
      "type": "string",
      "const": "column"
    },
    "object": {
      "type": "string",
      "const": "block"
    }
  },
  "additionalProperties": false,
  "required": [
    "column"
  ]
}

columnListBlockObjectResponse

{
  "title": "Column List",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "column_list"
    },
    "column_list": {
      "$ref": "#/components/schemas/emptyObject"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "column_list",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

columnListRequest

{
  "type": "object",
  "properties": {
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/columnBlockWithChildrenRequest"
      },
      "maxItems": 100,
      "minItems": 2
    }
  },
  "additionalProperties": false,
  "required": [
    "children"
  ]
}

columnResponse

{
  "type": "object",
  "properties": {
    "width_ratio": {
      "description": "Ratio between 0 and 1 of the width of this column relative to all columns in the list. If not provided, uses an equal width.",
      "examples": [
        0.5
      ],
      "type": "number"
    }
  }
}

columnWithChildrenRequest

{
  "type": "object",
  "properties": {
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/blockObjectWithSingleLevelOfChildrenRequest"
      },
      "maxItems": 100
    },
    "width_ratio": {
      "description": "Ratio between 0 and 1 of the width of this column relative to all columns in the list. If not provided, uses an equal width.",
      "examples": [
        0.5
      ],
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 1
    }
  },
  "additionalProperties": false,
  "required": [
    "children"
  ]
}

commentCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "comment.created",
          "description": "Always `comment.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookCommentEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookExternalBlock",
              "description": "The parent of the comment (the page or block the comment is attached to)."
            },
            "page_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the page containing the comment."
            },
            "discussion_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the discussion containing the comment."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "page_id",
            "discussion_id"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

commentDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "comment.deleted",
          "description": "Always `comment.deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookCommentEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookExternalBlock",
              "description": "The parent of the comment (the page or block the comment is attached to)."
            },
            "page_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the page containing the comment."
            },
            "discussion_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the discussion containing the comment."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "page_id",
            "discussion_id"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

commentObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "comment",
      "description": "The comment object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the comment."
    },
    "parent": {
      "$ref": "#/components/schemas/commentParentResponse",
      "description": "The parent of the comment."
    },
    "discussion_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the discussion thread this comment belongs to."
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the comment was created."
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the comment was last edited."
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse",
      "description": "The user who created the comment."
    },
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100,
      "description": "The rich text content of the comment."
    },
    "display_name": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "custom",
            "user",
            "integration"
          ],
          "description": "One of: `custom`, `user`, `integration`"
        },
        "resolved_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "type",
        "resolved_name"
      ],
      "description": "The display name of the comment."
    },
    "original_content_deleted": {
      "type": "boolean",
      "description": "Whether this comment's original content was deleted."
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "audio",
              "image",
              "pdf",
              "productivity",
              "video"
            ],
            "description": "One of: `audio`, `image`, `pdf`, `productivity`, `video`"
          },
          "file": {
            "$ref": "#/components/schemas/internalFileResponse"
          }
        },
        "additionalProperties": false,
        "required": [
          "category",
          "file"
        ]
      },
      "maxItems": 100,
      "description": "Any file attachments associated with the comment."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "parent",
    "discussion_id",
    "created_time",
    "last_edited_time",
    "created_by",
    "rich_text",
    "display_name",
    "original_content_deleted"
  ]
}

commentParentResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/pageIdCommentParentResponse"
    },
    {
      "$ref": "#/components/schemas/blockIdCommentParentResponse"
    }
  ]
}

commentUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "comment.updated",
          "description": "Always `comment.updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookCommentEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookExternalBlock",
              "description": "The parent of the comment (the page or block the comment is attached to)."
            },
            "page_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the page containing the comment."
            },
            "discussion_id": {
              "$ref": "#/components/schemas/idResponse",
              "description": "The ID of the discussion containing the comment."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "page_id",
            "discussion_id"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

contentPositionSchema

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "after_block"
        },
        "after_block": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "id"
          ]
        }
      },
      "required": [
        "type",
        "after_block"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "start"
        }
      },
      "required": [
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "end"
        }
      },
      "required": [
        "type"
      ]
    }
  ]
}

contentWithExpressionRequest

{
  "type": "object",
  "properties": {
    "expression": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "required": [
    "expression"
  ]
}

contentWithRichTextAndColorAndListResponse

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "list_start_index": {
      "type": "integer",
      "minimum": 1
    },
    "list_format": {
      "$ref": "#/components/schemas/numberedListFormat"
    }
  },
  "required": [
    "rich_text",
    "color"
  ]
}

contentWithRichTextAndColorRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

contentWithRichTextAndColorResponse

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    }
  },
  "required": [
    "rich_text",
    "color"
  ]
}

contentWithRichTextColorAndIconRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "icon": {
      "$ref": "#/components/schemas/pageIconRequest"
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

contentWithRichTextColorAndIconResponse

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "icon": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/pageIconResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "rich_text",
    "color",
    "icon"
  ]
}

contentWithRichTextColorAndIconUpdateRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "icon": {
      "$ref": "#/components/schemas/pageIconRequest"
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    }
  }
}

contentWithRichTextRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

contentWithSingleLevelOfChildrenRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

contentWithTableResponse

{
  "type": "object",
  "properties": {
    "has_column_header": {
      "type": "boolean"
    },
    "has_row_header": {
      "type": "boolean"
    },
    "table_width": {
      "type": "integer",
      "minimum": 1
    }
  },
  "required": [
    "has_column_header",
    "has_row_header",
    "table_width"
  ]
}

contentWithTableRowRequest

{
  "type": "object",
  "properties": {
    "cells": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/richTextItemRequest"
        },
        "maxItems": 100
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "cells"
  ]
}

contentWithTableRowResponse

{
  "type": "object",
  "properties": {
    "cells": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/richTextItemResponse"
        },
        "maxItems": 100
      },
      "maxItems": 100
    }
  },
  "required": [
    "cells"
  ]
}

coverConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "page_cover",
        "page_content",
        "property"
      ],
      "description": "Source of the cover image."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID when type is \"property\"."
    }
  },
  "required": [
    "type"
  ]
}

coverConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "page_cover",
        "page_content",
        "page_content_first",
        "property"
      ],
      "description": "Source of the cover image."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID when type is \"property\"."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

createDatabaseForViewRequest

{
  "type": "object",
  "properties": {
    "parent": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page_id",
          "description": "The parent type. Must be \"page_id\"."
        },
        "page_id": {
          "$ref": "#/components/schemas/idRequest",
          "description": "The ID of the page to create the database on."
        }
      },
      "required": [
        "type",
        "page_id"
      ],
      "description": "The parent page for the new linked database block."
    },
    "position": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "after_block",
          "description": "Position type. \"after_block\" places the new database after the specified block in the page."
        },
        "block_id": {
          "$ref": "#/components/schemas/idRequest",
          "description": "The ID of an existing block in the page. The new database will be placed after this block."
        }
      },
      "required": [
        "type",
        "block_id"
      ],
      "description": "Where to place the new database block within the parent page. Defaults to appending at the end."
    }
  },
  "required": [
    "parent"
  ]
}

createViewQueryRequest

{
  "type": "object",
  "properties": {
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "The number of results to return per page. Maximum: 100"
    }
  }
}

createViewRequest

{
  "type": "object",
  "properties": {
    "data_source_id": {
      "$ref": "#/components/schemas/idRequest",
      "description": "The ID of the data source this view should be scoped to."
    },
    "name": {
      "type": "string",
      "description": "The name of the view."
    },
    "type": {
      "$ref": "#/components/schemas/viewTypeRequest",
      "description": "The type of view to create."
    },
    "database_id": {
      "$ref": "#/components/schemas/idRequest",
      "description": "The ID of the database to create a view in. Mutually exclusive with view_id and create_database."
    },
    "view_id": {
      "$ref": "#/components/schemas/idRequest",
      "description": "The ID of a dashboard view to add this view to as a widget. Mutually exclusive with database_id and create_database."
    },
    "filter": {
      "$ref": "#/components/schemas/viewFilterRequest",
      "description": "Filter to apply to the view. Uses the same format as the data source query filter."
    },
    "sorts": {
      "$ref": "#/components/schemas/viewSortsRequest",
      "description": "Sorts to apply to the view. Uses the same format as the data source query sorts."
    },
    "quick_filters": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/quickFilterConditionRequest"
      },
      "description": "Quick filters to pin in the view's filter bar. Keys are property names or IDs. Values are filter conditions (same shape as a property filter but without the property field). Each quick filter appears as a clickable pill above the view, independent of the advanced filter."
    },
    "create_database": {
      "$ref": "#/components/schemas/createDatabaseForViewRequest",
      "description": "Create a new linked database block on a page and add the view to it. Mutually exclusive with database_id and view_id."
    },
    "configuration": {
      "$ref": "#/components/schemas/viewConfigRequest",
      "description": "View presentation configuration. The type field must match the view type."
    },
    "position": {
      "$ref": "#/components/schemas/viewPositionRequest",
      "description": "Where to place the new view in the database's view tab bar. Only applicable when database_id is provided. Defaults to \"end\" (append)."
    },
    "placement": {
      "$ref": "#/components/schemas/widgetPlacementRequest",
      "description": "Where to place the new widget in a dashboard view. Only applicable when view_id is provided. Defaults to creating a new row at the end."
    }
  },
  "required": [
    "data_source_id",
    "name",
    "type"
  ]
}

createdByDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_by",
      "description": "Always `created_by`"
    },
    "created_by": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "created_by"
  ],
  "title": "Created By"
}

createdByPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_by",
      "description": "Always `created_by`"
    },
    "created_by": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "created_by"
  ],
  "title": "Created By"
}

createdByPropertyItemObjectResponse

{
  "title": "Created By",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_by"
    },
    "created_by": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/partialUserObjectResponse"
        },
        {
          "$ref": "#/components/schemas/userObjectResponse"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "created_by",
    "object",
    "id"
  ]
}

createdBySimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_by",
      "description": "Always `created_by`"
    },
    "created_by": {
      "$ref": "#/components/schemas/userValueResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "created_by"
  ],
  "title": "Created By"
}

createdTimeDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_time",
      "description": "Always `created_time`"
    },
    "created_time": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "created_time"
  ],
  "title": "Created Time"
}

createdTimePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_time",
      "description": "Always `created_time`"
    },
    "created_time": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "created_time"
  ],
  "title": "Created Time"
}

createdTimePropertyItemObjectResponse

{
  "title": "Created Time",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_time"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "created_time",
    "object",
    "id"
  ]
}

createdTimeSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "created_time",
      "description": "Always `created_time`"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "created_time"
  ],
  "title": "Created Time"
}

customEmojiPageIconRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "custom_emoji",
      "description": "Always `custom_emoji`"
    },
    "custom_emoji": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/components/schemas/idRequest",
          "description": "The ID of the custom emoji."
        },
        "name": {
          "type": "string",
          "description": "The name of the custom emoji."
        },
        "url": {
          "type": "string",
          "description": "The URL of the custom emoji."
        }
      },
      "required": [
        "id"
      ]
    }
  },
  "required": [
    "custom_emoji"
  ],
  "title": "Custom Emoji"
}

customEmojiPageIconResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "custom_emoji",
      "description": "Type of icon. In this case, a custom emoji."
    },
    "custom_emoji": {
      "$ref": "#/components/schemas/customEmojiResponse",
      "description": "The custom emoji details for the icon."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "custom_emoji"
  ],
  "title": "Custom Emoji"
}

customEmojiResponse

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the custom emoji."
    },
    "name": {
      "type": "string",
      "description": "The name of the custom emoji."
    },
    "url": {
      "type": "string",
      "description": "The URL of the custom emoji."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "url"
  ]
}

dashboardRowResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of this row module."
    },
    "widgets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/dashboardWidgetResponse"
      },
      "maxItems": 100,
      "description": "The widget modules within this row."
    },
    "height": {
      "type": "integer",
      "description": "Fixed height of the row in pixels."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "widgets"
  ]
}

dashboardViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "dashboard",
      "description": "The view configuration type."
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/dashboardRowResponse"
      },
      "maxItems": 100,
      "description": "The rows that make up the dashboard layout. Each row contains one or more widget modules."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "rows"
  ]
}

dashboardWidgetResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of this widget module."
    },
    "view_id": {
      "type": "string",
      "description": "The ID of the collection view rendered by this widget."
    },
    "width": {
      "type": "integer",
      "description": "Width of the widget in a 12-column grid (1-12). 12 means full width."
    },
    "row_index": {
      "type": "integer",
      "description": "The 0-based index of the row this widget belongs to. Widgets in the same row share the same row_index."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "view_id"
  ]
}

dataSourceContentUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.content_updated",
          "description": "Always `data_source.content_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity whose content was updated."
            },
            "updated_blocks": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/webhookUpdatedBlock"
              },
              "maxItems": 100,
              "description": "The blocks that were updated in this event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "updated_blocks"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.created",
          "description": "Always `data_source.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.deleted",
          "description": "Always `data_source.deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceMovedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.moved",
          "description": "Always `data_source.moved`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "data_source",
      "description": "The data source object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the data source."
    },
    "title": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100,
      "description": "The title of the data source."
    },
    "description": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100,
      "description": "The description of the data source."
    },
    "parent": {
      "$ref": "#/components/schemas/parentOfDataSourceResponse",
      "description": "The parent of the data source."
    },
    "database_parent": {
      "$ref": "#/components/schemas/parentOfDatabaseResponse",
      "description": "The parent of the data source's containing database. This is typically a page, block, or workspace, but can be another database in the case of wikis."
    },
    "is_inline": {
      "type": "boolean",
      "description": "Whether the data source is inline."
    },
    "database_type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "tasks",
            "projects",
            "sprints",
            "docs",
            "wiki",
            "meetings",
            "meeting_notes",
            "skills",
            "github_prs"
          ],
          "description": "One of: `tasks`, `projects`, `sprints`, `docs`, `wiki`, `meetings`, `meeting_notes`, `skills`, `github_prs`"
        },
        {
          "type": "null"
        }
      ],
      "description": "The type of typed database this data source belongs to, or `null` for a regular data source."
    },
    "in_trash": {
      "type": "boolean",
      "description": "Whether the data source is in the trash."
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the data source was created."
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the data source was last edited."
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse",
      "description": "The user who created the data source."
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse",
      "description": "The user who last edited the data source."
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/databasePropertyConfigResponse"
      },
      "description": "The properties schema of the data source."
    },
    "icon": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageIconResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The icon of the data source."
    },
    "cover": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageCoverResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The cover of the data source."
    },
    "url": {
      "type": "string",
      "description": "The URL of the data source."
    },
    "public_url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The public URL of the data source if it is publicly accessible."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "title",
    "description",
    "parent",
    "database_parent",
    "is_inline",
    "database_type",
    "in_trash",
    "created_time",
    "last_edited_time",
    "created_by",
    "last_edited_by",
    "properties",
    "icon",
    "cover",
    "url",
    "public_url"
  ]
}

dataSourceParentResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "data_source_id",
      "description": "The parent type."
    },
    "data_source_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent data source."
    },
    "database_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the data source's parent database."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "data_source_id",
    "database_id"
  ]
}

dataSourceReferenceResponse

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the data source."
    },
    "name": {
      "type": "string",
      "description": "The name of the data source."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name"
  ]
}

dataSourceSchemaUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.schema_updated",
          "description": "Always `data_source.schema_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the database whose schema was updated."
            },
            "updated_properties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The ID of the database property that changed."
                  },
                  "name": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The name of the database property, or `null` if deleted."
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "created",
                      "updated",
                      "deleted"
                    ],
                    "description": "The action taken on the property."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "id",
                  "name",
                  "action"
                ]
              },
              "maxItems": 100,
              "description": "The database properties that were created, updated, or deleted."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceUndeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "data_source.undeleted",
          "description": "Always `data_source.undeleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dataSourceViewObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "view",
      "description": "The object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the view."
    },
    "parent": {
      "$ref": "#/components/schemas/databaseParentResponse",
      "description": "The parent database of the view."
    },
    "name": {
      "type": "string",
      "description": "The name of the view."
    },
    "type": {
      "type": "string",
      "enum": [
        "table",
        "board",
        "list",
        "calendar",
        "timeline",
        "gallery",
        "form",
        "chart",
        "map",
        "dashboard"
      ],
      "description": "The view type."
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the view was created."
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the view was last edited."
    },
    "url": {
      "type": "string",
      "description": "Canonical deep link to the view in Notion."
    },
    "data_source_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The ID of the data source this view is scoped to, or null for dashboard views."
    },
    "created_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/partialUserObjectResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The user who created the view, or null if not available."
    },
    "last_edited_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/partialUserObjectResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The user who last edited the view, or null if not available."
    },
    "filter": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/viewFilterResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The filter applied to this view (same shape as data source query filter)."
    },
    "sorts": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewSortResponse"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "The sorts applied to this view (same shape as data source query sorts)."
    },
    "quick_filters": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/components/schemas/quickFilterConditionResponse"
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Quick filters pinned to the view's filter bar. Keys are property IDs. Values are filter conditions (same shape as a property filter without the property field). Null when no quick filters are set."
    },
    "configuration": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/viewConfigResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "View presentation configuration."
    },
    "dashboard_view_id": {
      "type": "string",
      "description": "For dashboard widget views, the ID of the parent dashboard view. Only present when this view is a widget inside a dashboard."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "parent",
    "name",
    "type",
    "created_time",
    "last_edited_time",
    "url"
  ]
}

dataSourceViewReferenceResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "view",
      "description": "The object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the view."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id"
  ]
}

databaseContentUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.content_updated",
          "description": "Always `database.content_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity whose content was updated."
            },
            "updated_blocks": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/webhookUpdatedBlock"
              },
              "maxItems": 100,
              "description": "The blocks that were updated in this event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "updated_blocks"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

databaseCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.created",
          "description": "Always `database.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

databaseDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.deleted",
          "description": "Always `database.deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

databaseMovedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.moved",
          "description": "Always `database.moved`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

databaseObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "database",
      "description": "The database object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the database."
    },
    "title": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100,
      "description": "The title of the database."
    },
    "description": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100,
      "description": "The description of the database."
    },
    "parent": {
      "$ref": "#/components/schemas/parentOfDatabaseResponse",
      "description": "The parent of the database. This is typically a page, block, or workspace, but can be another database in the case of wikis."
    },
    "is_inline": {
      "type": "boolean",
      "description": "Whether the database is inline."
    },
    "database_type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "tasks",
            "projects",
            "sprints",
            "docs",
            "wiki",
            "meetings",
            "meeting_notes",
            "skills",
            "github_prs"
          ],
          "description": "One of: `tasks`, `projects`, `sprints`, `docs`, `wiki`, `meetings`, `meeting_notes`, `skills`, `github_prs`"
        },
        {
          "type": "null"
        }
      ],
      "description": "The type of typed database, such as `tasks`, `projects`, or `skills`, or `null` for a regular database. Create a database accepts `tasks`, `projects`, and `skills`."
    },
    "in_trash": {
      "type": "boolean",
      "description": "Whether the database is in the trash."
    },
    "is_locked": {
      "type": "boolean",
      "description": "Whether the database is locked from editing in the Notion app UI."
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the database was created."
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the database was last edited."
    },
    "data_sources": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/dataSourceReferenceResponse"
      },
      "maxItems": 100,
      "description": "The data sources of the database."
    },
    "icon": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageIconResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The icon of the database."
    },
    "cover": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageCoverResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "The cover of the database."
    },
    "url": {
      "type": "string",
      "description": "The URL of the database."
    },
    "public_url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The public URL of the database if it is publicly accessible."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "title",
    "description",
    "parent",
    "is_inline",
    "database_type",
    "in_trash",
    "is_locked",
    "created_time",
    "last_edited_time",
    "data_sources",
    "icon",
    "cover",
    "url",
    "public_url"
  ]
}

databaseParentResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "database_id",
      "description": "The parent type."
    },
    "database_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent database."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "database_id"
  ]
}

databasePropertyConfigResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/databasePropertyConfigResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/numberDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/formulaDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/selectDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/multiSelectDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/statusDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/relationDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/rollupDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/uniqueIdDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/titleDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/richTextDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/urlDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/peopleDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/filesDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/emailDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/phoneNumberDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/dateDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/checkboxDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/createdByDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/createdTimeDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/lastEditedByDatabasePropertyConfigResponse"
        },
        {
          "$ref": "#/components/schemas/lastEditedTimeDatabasePropertyConfigResponse"
        }
      ]
    }
  ]
}

databasePropertyConfigResponseCommon

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the property."
    },
    "name": {
      "type": "string",
      "description": "The name of the property."
    },
    "description": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/propertyDescriptionRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "The description of the property."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "description"
  ]
}

databasePropertyRelationConfigResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/databasePropertyRelationConfigResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/singlePropertyDatabasePropertyRelationConfigResponse"
        },
        {
          "$ref": "#/components/schemas/dualPropertyDatabasePropertyRelationConfigResponse"
        }
      ]
    }
  ]
}

databasePropertyRelationConfigResponseCommon

{
  "type": "object",
  "properties": {
    "database_id": {
      "$ref": "#/components/schemas/idResponse"
    },
    "data_source_id": {
      "$ref": "#/components/schemas/idResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "database_id",
    "data_source_id"
  ]
}

databaseSchemaUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.schema_updated",
          "description": "Always `database.schema_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the database whose schema was updated."
            },
            "updated_properties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The ID of the database property that changed."
                  },
                  "name": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "The name of the database property, or `null` if deleted."
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "created",
                      "updated",
                      "deleted"
                    ],
                    "description": "The action taken on the property."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "id",
                  "name",
                  "action"
                ]
              },
              "maxItems": 100,
              "description": "The database properties that were created, updated, or deleted."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

databaseUndeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "database.undeleted",
          "description": "Always `database.undeleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookDatabaseEventEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

dateDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Always `date`"
    },
    "date": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "date"
  ],
  "title": "Date"
}

dateFormulaPropertyResponse

{
  "title": "Date",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date"
    },
    "date": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "date"
  ]
}

dateFormulaPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Always `date`"
    },
    "date": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "date"
  ],
  "title": "Date"
}

dateGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "date",
        "created_time",
        "last_edited_time"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "relative",
        "day",
        "week",
        "month",
        "year"
      ],
      "description": "Granularity for date grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    },
    "start_day_of_week": {
      "type": "number",
      "enum": [
        0,
        1
      ],
      "description": "Start day of week for week grouping (0 = Sunday, 1 = Monday)."
    }
  },
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

dateGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "date",
        "created_time",
        "last_edited_time"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "relative",
        "day",
        "week",
        "month",
        "year"
      ],
      "description": "Granularity for date grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (no manual sort for dates)."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    },
    "start_day_of_week": {
      "type": "number",
      "enum": [
        0,
        1
      ],
      "description": "Start day of week for week grouping (0 = Sunday, 1 = Monday)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

dateOrRelativeDate

{
  "anyOf": [
    {
      "type": "string",
      "format": "date"
    },
    {
      "$ref": "#/components/schemas/relativeDateValue"
    }
  ]
}

datePartialRollupValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Always `date`"
    },
    "date": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "date"
  ],
  "title": "Date"
}

datePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Always `date`"
    },
    "date": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "date"
  ],
  "title": "Date"
}

datePropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "equals": {
              "$ref": "#/components/schemas/dateOrRelativeDate"
            }
          },
          "required": [
            "equals"
          ]
        },
        {
          "type": "object",
          "properties": {
            "before": {
              "$ref": "#/components/schemas/dateOrRelativeDate"
            }
          },
          "required": [
            "before"
          ]
        },
        {
          "type": "object",
          "properties": {
            "after": {
              "$ref": "#/components/schemas/dateOrRelativeDate"
            }
          },
          "required": [
            "after"
          ]
        },
        {
          "type": "object",
          "properties": {
            "on_or_before": {
              "$ref": "#/components/schemas/dateOrRelativeDate"
            }
          },
          "required": [
            "on_or_before"
          ]
        },
        {
          "type": "object",
          "properties": {
            "on_or_after": {
              "$ref": "#/components/schemas/dateOrRelativeDate"
            }
          },
          "required": [
            "on_or_after"
          ]
        },
        {
          "type": "object",
          "properties": {
            "this_week": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "this_week"
          ]
        },
        {
          "type": "object",
          "properties": {
            "past_week": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "past_week"
          ]
        },
        {
          "type": "object",
          "properties": {
            "past_month": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "past_month"
          ]
        },
        {
          "type": "object",
          "properties": {
            "past_year": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "past_year"
          ]
        },
        {
          "type": "object",
          "properties": {
            "next_week": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "next_week"
          ]
        },
        {
          "type": "object",
          "properties": {
            "next_month": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "next_month"
          ]
        },
        {
          "type": "object",
          "properties": {
            "next_year": {
              "$ref": "#/components/schemas/emptyObject"
            }
          },
          "required": [
            "next_year"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

datePropertyItemObjectResponse

{
  "title": "Date",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date"
    },
    "date": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "date",
    "object",
    "id"
  ]
}

dateRequest

{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "format": "date",
      "description": "The start date of the date object."
    },
    "end": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "description": "The end date of the date object, if any."
    },
    "time_zone": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/timeZoneRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "The time zone of the date object, if any. E.g. America/Los_Angeles, Europe/London, etc."
    }
  },
  "additionalProperties": false,
  "required": [
    "start"
  ]
}

dateResponse

{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "format": "date",
      "description": "The start date of the date object."
    },
    "end": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "description": "The end date of the date object, if any."
    },
    "time_zone": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/timeZoneRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "The time zone of the date object."
    }
  },
  "additionalProperties": false,
  "required": [
    "start",
    "end",
    "time_zone"
  ]
}

dateSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "Always `date`"
    },
    "date": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "date"
  ],
  "title": "Date"
}

deletedViewQueryResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "view_query",
      "description": "The object type."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the deleted view query."
    },
    "deleted": {
      "type": "boolean",
      "description": "Whether the view query was deleted."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "deleted"
  ]
}

dividerBlockObjectResponse

{
  "title": "Divider",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "divider"
    },
    "divider": {
      "$ref": "#/components/schemas/emptyObject"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "divider",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

dualPropertyDatabasePropertyRelationConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "dual_property",
      "description": "Always `dual_property`"
    },
    "dual_property": {
      "type": "object",
      "properties": {
        "synced_property_id": {
          "type": "string"
        },
        "synced_property_name": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "synced_property_id",
        "synced_property_name"
      ]
    }
  },
  "required": [
    "dual_property"
  ],
  "title": "Dual Property"
}

emailDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "email",
      "description": "Always `email`"
    },
    "email": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "email"
  ],
  "title": "Email"
}

emailPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "email",
      "description": "Always `email`"
    },
    "email": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "email"
  ],
  "title": "Email"
}

emailPropertyItemObjectResponse

{
  "title": "Email",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "email"
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "email",
    "object",
    "id"
  ]
}

emailSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "email",
      "description": "Always `email`"
    },
    "email": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "email"
  ],
  "title": "Email"
}

embedBlockObjectResponse

{
  "title": "Embed",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "embed"
    },
    "embed": {
      "$ref": "#/components/schemas/mediaContentWithUrlAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "embed",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

embedFileUploadRequest

{
  "type": "object",
  "properties": {
    "file_upload": {
      "$ref": "#/components/schemas/fileUploadIdRequest"
    },
    "type": {
      "type": "string",
      "const": "file_upload"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "file_upload"
  ]
}

emojiPageIconRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "emoji",
      "description": "Always `emoji`"
    },
    "emoji": {
      "$ref": "#/components/schemas/emojiRequest",
      "description": "An emoji character."
    }
  },
  "required": [
    "emoji"
  ],
  "title": "Emoji"
}

emojiPageIconResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "emoji",
      "description": "Type of icon. In this case, an emoji."
    },
    "emoji": {
      "$ref": "#/components/schemas/emojiRequest",
      "description": "The emoji character used as the icon."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "emoji"
  ],
  "title": "Emoji"
}

emojiRequest

{
  "type": "string",
  "example": "😀"
}

emptyObject

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

equationBlockObjectResponse

{
  "title": "Equation",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "equation"
    },
    "equation": {
      "$ref": "#/components/schemas/expressionObjectResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "equation",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

equationRichTextItemRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "equation",
      "description": "Always `equation`"
    },
    "equation": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string",
          "examples": [
            "e=mc^2"
          ],
          "description": "A KaTeX compatible string."
        }
      },
      "required": [
        "expression"
      ],
      "description": "Notion supports inline LaTeX equations as rich text objects with a type value of `equation`."
    }
  },
  "required": [
    "equation"
  ],
  "title": "Equation"
}

equationRichTextItemResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "equation",
      "description": "Always `equation`"
    },
    "equation": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string",
          "examples": [
            "e=mc^2"
          ],
          "description": "A KaTeX compatible string."
        }
      },
      "additionalProperties": false,
      "required": [
        "expression"
      ],
      "description": "Notion supports inline LaTeX equations as rich text objects with a type value of `equation`."
    }
  },
  "required": [
    "type",
    "equation"
  ],
  "title": "Equation"
}

error_api_400

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "invalid_json",
            "invalid_request_url",
            "invalid_request",
            "missing_version",
            "invalid_beta",
            "validation_error",
            "invalid_credit_limit"
          ]
        },
        "status": {
          "const": 400
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_401

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "unauthorized"
          ]
        },
        "status": {
          "const": 401
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_403

{
  "oneOf": [
    {
      "allOf": [
        {
          "$ref": "#/components/schemas/publicApiCommonErrorResponse"
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "restricted_resource",
                "status_change_not_allowed"
              ]
            },
            "status": {
              "const": 403
            }
          },
          "required": [
            "code",
            "status"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "allOf": [
        {
          "$ref": "#/components/schemas/publicApiCommonErrorResponse"
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "const": "workspace_credits_exhausted"
            },
            "status": {
              "const": 403
            },
            "additional_data": {
              "type": "object",
              "properties": {
                "tool_error_code": {
                  "const": "workspace_credits_exhausted"
                },
                "tool_error_class": {
                  "const": "entitlement_required"
                },
                "tool_error_retryable": {
                  "const": "false"
                },
                "recovery_kind": {
                  "enum": [
                    "contact_workspace_owner",
                    "open_workspace_credit_settings"
                  ],
                  "description": "The recovery action selected by Notion for the caller."
                },
                "recovery_url": {
                  "type": "string",
                  "format": "uri",
                  "description": "Present when recovery_kind directs the caller to a settings page."
                }
              },
              "required": [
                "tool_error_code",
                "tool_error_class",
                "tool_error_retryable",
                "recovery_kind"
              ],
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              }
            }
          },
          "required": [
            "code",
            "status",
            "additional_data"
          ]
        }
      ]
    },
    {
      "allOf": [
        {
          "$ref": "#/components/schemas/publicApiCommonErrorResponse"
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "const": "agent_credit_limit_reached"
            },
            "status": {
              "const": 403
            },
            "additional_data": {
              "type": "object",
              "properties": {
                "tool_error_code": {
                  "const": "agent_credit_limit_reached"
                },
                "tool_error_class": {
                  "const": "entitlement_required"
                },
                "tool_error_retryable": {
                  "const": "false"
                },
                "recovery_kind": {
                  "enum": [
                    "contact_workspace_owner",
                    "none",
                    "open_agent_settings",
                    "request_agent_limit_increase",
                    "request_pending"
                  ],
                  "description": "The recovery action selected by Notion for the caller."
                },
                "recovery_url": {
                  "type": "string",
                  "format": "uri",
                  "description": "Present when recovery_kind directs the caller to a settings page."
                }
              },
              "required": [
                "tool_error_code",
                "tool_error_class",
                "tool_error_retryable",
                "recovery_kind"
              ],
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              }
            }
          },
          "required": [
            "code",
            "status",
            "additional_data"
          ]
        }
      ]
    }
  ]
}

error_api_404

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "object_not_found",
            "directory_not_found"
          ]
        },
        "status": {
          "const": 404
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_406

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "row_limit_exceeded"
          ]
        },
        "status": {
          "const": 406
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_409

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "conflict_error",
            "idempotency_key_reused",
            "agent_deleted"
          ]
        },
        "status": {
          "const": 409
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_429

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "rate_limited"
          ]
        },
        "status": {
          "const": 429
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_500

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "internal_server_error"
          ]
        },
        "status": {
          "const": 500
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_503

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "service_unavailable"
          ]
        },
        "status": {
          "const": 503
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_504

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "gateway_timeout"
          ]
        },
        "status": {
          "const": 504
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_api_529

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "service_overload"
          ]
        },
        "status": {
          "const": 529
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_oauth_400

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "invalid_request",
            "invalid_grant",
            "unauthorized_client",
            "unsupported_grant_type",
            "invalid_scope"
          ]
        },
        "status": {
          "const": 400
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_oauth_401

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "invalid_client"
          ]
        },
        "status": {
          "const": 401
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_oauth_403

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "test_env_error"
          ]
        },
        "status": {
          "const": 403
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

error_oauth_500

{
  "allOf": [
    {
      "$ref": "#/components/schemas/publicApiCommonErrorResponse"
    },
    {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "internal_server_error"
          ]
        },
        "status": {
          "const": 500
        }
      },
      "required": [
        "code",
        "status"
      ],
      "additionalProperties": false
    }
  ]
}

existencePropertyFilter

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "is_empty": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "is_empty"
      ]
    },
    {
      "type": "object",
      "properties": {
        "is_not_empty": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "is_not_empty"
      ]
    }
  ]
}

expressionObjectResponse

{
  "type": "object",
  "properties": {
    "expression": {
      "type": "string"
    }
  },
  "required": [
    "expression"
  ]
}

externalFileRequest

{
  "type": "object",
  "properties": {
    "url": {
      "$ref": "#/components/schemas/textRequest"
    }
  },
  "additionalProperties": false,
  "required": [
    "url"
  ]
}

externalInternalOrExternalFileWithNameResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external",
      "description": "Type of attachment. In this case, an external URL."
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the external file or resource."
        }
      },
      "additionalProperties": false,
      "required": [
        "url"
      ],
      "description": "The external URL."
    }
  },
  "required": [
    "type",
    "external"
  ],
  "title": "External"
}

externalMediaContentWithFileAndCaptionResponse

{
  "title": "External",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external"
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "$ref": "#/components/schemas/textRequest"
        }
      },
      "required": [
        "url"
      ]
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    }
  },
  "required": [
    "type",
    "external",
    "caption"
  ]
}

externalMediaContentWithFileNameAndCaptionResponse

{
  "title": "External",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external"
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "$ref": "#/components/schemas/textRequest"
        }
      },
      "required": [
        "url"
      ]
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "name": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "external",
    "caption",
    "name"
  ]
}

externalPageCoverRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external",
      "description": "Always `external`"
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the external file."
        }
      },
      "required": [
        "url"
      ],
      "description": "External URL for the cover."
    }
  },
  "required": [
    "external"
  ],
  "title": "External"
}

externalPageCoverResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external",
      "description": "Type of cover. In this case, an external URL."
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the external file or resource."
        }
      },
      "additionalProperties": false,
      "required": [
        "url"
      ],
      "description": "The external URL for the cover."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "external"
  ],
  "title": "External"
}

externalPageIconRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external",
      "description": "Always `external`"
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the external file."
        }
      },
      "required": [
        "url"
      ]
    }
  },
  "required": [
    "external"
  ],
  "title": "External"
}

externalPageIconResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "external",
      "description": "Type of icon. In this case, an external URL."
    },
    "external": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of the external file or resource."
        }
      },
      "additionalProperties": false,
      "required": [
        "url"
      ],
      "description": "The external URL for the icon."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "external"
  ],
  "title": "External"
}

fileBlockObjectResponse

{
  "title": "File",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file"
    },
    "file": {
      "$ref": "#/components/schemas/mediaContentWithFileNameAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "file",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

fileInternalOrExternalFileWithNameResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file",
      "description": "Type of attachment. In this case, a file uploaded to a Notion workspace."
    },
    "file": {
      "$ref": "#/components/schemas/internalFileResponse",
      "description": "The file URL."
    }
  },
  "required": [
    "type",
    "file"
  ],
  "title": "File"
}

fileMediaContentWithFileAndCaptionResponse

{
  "title": "File",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file"
    },
    "file": {
      "$ref": "#/components/schemas/internalFileResponse"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    }
  },
  "required": [
    "type",
    "file",
    "caption"
  ]
}

fileMediaContentWithFileNameAndCaptionResponse

{
  "title": "File",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file"
    },
    "file": {
      "$ref": "#/components/schemas/internalFileResponse"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "name": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "file",
    "caption",
    "name"
  ]
}

filePageCoverResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file",
      "description": "Type of cover. In this case, a file."
    },
    "file": {
      "$ref": "#/components/schemas/internalFileResponse",
      "description": "The file URL for the cover."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "file"
  ],
  "title": "File"
}

filePageIconResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file",
      "description": "Type of icon. In this case, a file."
    },
    "file": {
      "$ref": "#/components/schemas/internalFileResponse",
      "description": "The file URL for the icon."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "file"
  ],
  "title": "File"
}

fileUploadCompletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "file_upload.completed",
          "description": "Always `file_upload.completed`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookFileUploadEntity",
          "description": "The object that triggered the event."
        }
      },
      "required": [
        "type",
        "entity"
      ]
    }
  ]
}

fileUploadCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "file_upload.created",
          "description": "Always `file_upload.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookFileUploadEntity",
          "description": "The object that triggered the event."
        }
      },
      "required": [
        "type",
        "entity"
      ]
    }
  ]
}

fileUploadExpiredWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "file_upload.expired",
          "description": "Always `file_upload.expired`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookFileUploadEntity",
          "description": "The object that triggered the event."
        }
      },
      "required": [
        "type",
        "entity"
      ]
    }
  ]
}

fileUploadIdRequest

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idRequest"
    }
  },
  "additionalProperties": false,
  "required": [
    "id"
  ]
}

fileUploadObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "file_upload",
      "description": "Always `file_upload`"
    },
    "id": {
      "$ref": "#/components/schemas/idResponse"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/components/schemas/idResponse"
        },
        "type": {
          "type": "string",
          "enum": [
            "person",
            "bot",
            "agent"
          ],
          "description": "One of: `person`, `bot`, `agent`"
        }
      },
      "additionalProperties": false,
      "required": [
        "id",
        "type"
      ]
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "in_trash": {
      "type": "boolean"
    },
    "expiry_time": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "uploaded",
        "expired",
        "failed"
      ],
      "description": "One of: `pending`, `uploaded`, `expired`, `failed`"
    },
    "filename": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "content_type": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "content_length": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "upload_url": {
      "type": "string"
    },
    "complete_url": {
      "type": "string"
    },
    "file_import_result": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "imported_time": {
              "type": "string",
              "format": "date-time",
              "description": "The time the file was imported into Notion. ISO 8601 format."
            }
          },
          "additionalProperties": false,
          "required": [
            "imported_time"
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "success",
                  "description": "Indicates a successful import."
                },
                "success": {
                  "$ref": "#/components/schemas/emptyObject",
                  "description": "Empty object for success type."
                }
              },
              "required": [
                "type",
                "success"
              ],
              "title": "Success"
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "error",
                  "description": "Indicates an error occurred during import."
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "validation_error",
                        "internal_system_error",
                        "download_error",
                        "upload_error"
                      ],
                      "description": "The type of error that occurred during file import."
                    },
                    "code": {
                      "type": "string",
                      "description": "A short string code representing the error."
                    },
                    "message": {
                      "type": "string",
                      "description": "A human-readable message describing the error."
                    },
                    "parameter": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The parameter related to the error, if applicable. Null if not applicable."
                    },
                    "status_code": {
                      "oneOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The HTTP status code associated with the error, if available. Null if not applicable."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "code",
                    "message",
                    "parameter",
                    "status_code"
                  ],
                  "description": "Details about the error that occurred during file import."
                }
              },
              "required": [
                "type",
                "error"
              ],
              "title": "Error"
            }
          ]
        }
      ]
    },
    "number_of_parts": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "sent": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false,
      "required": [
        "total",
        "sent"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "in_trash",
    "expiry_time",
    "status",
    "filename",
    "content_type",
    "content_length"
  ]
}

fileUploadPageCoverRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file_upload",
      "description": "Always `file_upload`"
    },
    "file_upload": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of a FileUpload object that has the status `uploaded`."
        }
      },
      "required": [
        "id"
      ],
      "description": "The file upload for the cover."
    }
  },
  "required": [
    "file_upload"
  ],
  "title": "File Upload"
}

fileUploadPageIconRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file_upload",
      "description": "Always `file_upload`"
    },
    "file_upload": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of a FileUpload object that has the status `uploaded`."
        }
      },
      "required": [
        "id"
      ]
    }
  },
  "required": [
    "file_upload"
  ],
  "title": "File Upload"
}

fileUploadUploadFailedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "file_upload.upload_failed",
          "description": "Always `file_upload.upload_failed`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookFileUploadEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "file_import_result": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "success",
                      "description": "Always `success`"
                    },
                    "imported_time": {
                      "type": "string",
                      "description": "ISO 8601 timestamp of when the file was imported."
                    },
                    "success": {
                      "$ref": "#/components/schemas/emptyObject",
                      "description": "Empty object indicating success."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "imported_time",
                    "success"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "error",
                      "description": "Always `error`"
                    },
                    "imported_time": {
                      "type": "string",
                      "description": "ISO 8601 timestamp of when the import was attempted."
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "validation_error",
                            "internal_system_error",
                            "download_error",
                            "upload_error"
                          ],
                          "description": "The category of the error."
                        },
                        "code": {
                          "type": "string",
                          "description": "A machine-readable error code."
                        },
                        "message": {
                          "type": "string",
                          "description": "A human-readable description of the error."
                        },
                        "parameter": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The parameter that caused the error, or `null`."
                        },
                        "status_code": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The HTTP status code associated with the error, or `null`."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "code",
                        "message",
                        "parameter",
                        "status_code"
                      ],
                      "description": "Details about the error."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "imported_time",
                    "error"
                  ]
                }
              ],
              "description": "The result of the file import attempt."
            }
          },
          "additionalProperties": false,
          "required": [
            "file_import_result"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

fileUploadWithOptionalNameRequest

{
  "type": "object",
  "properties": {
    "file_upload": {
      "$ref": "#/components/schemas/fileUploadIdRequest"
    },
    "type": {
      "type": "string",
      "const": "file_upload"
    },
    "name": {
      "$ref": "#/components/schemas/stringRequest"
    }
  },
  "additionalProperties": false,
  "required": [
    "file_upload"
  ]
}

filesDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "files",
      "description": "Always `files`"
    },
    "files": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "files"
  ],
  "title": "Files"
}

filesPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "files",
      "description": "Always `files`"
    },
    "files": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "files"
  ],
  "title": "Files"
}

filesPropertyItemObjectResponse

{
  "title": "Files",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "files"
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/internalOrExternalFileWithNameResponse"
      },
      "maxItems": 100
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "files",
    "object",
    "id"
  ]
}

filesSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "files",
      "description": "Always `files`"
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/internalOrExternalFileWithNameResponse"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "files"
  ],
  "title": "Files"
}

formViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "form",
      "description": "The view type. Must be \"form\"."
    },
    "is_form_closed": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether the form is closed for submissions. Pass null to clear."
    },
    "anonymous_submissions": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether anonymous (non-logged-in) submissions are allowed. Pass null to clear."
    },
    "submission_permissions": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "comment_only",
            "reader",
            "read_and_write",
            "editor"
          ],
          "description": "One of: `none`, `comment_only`, `reader`, `read_and_write`, `editor`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Permission level granted to the submitter on the created page after form submission. Pass null to clear."
    }
  },
  "required": [
    "type"
  ]
}

formViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "form",
      "description": "The view configuration type."
    },
    "is_form_closed": {
      "type": "boolean",
      "description": "Whether the form is closed for submissions."
    },
    "anonymous_submissions": {
      "type": "boolean",
      "description": "Whether anonymous (non-logged-in) submissions are allowed."
    },
    "submission_permissions": {
      "type": "string",
      "enum": [
        "none",
        "comment_only",
        "reader",
        "read_and_write",
        "editor"
      ],
      "description": "Permission level granted to the submitter on the created page after form submission."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

formulaCheckboxSubGroupByRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "The formula result type for grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    }
  },
  "required": [
    "type",
    "sort"
  ]
}

formulaCheckboxSubGroupByResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "checkbox",
      "description": "The formula result type for grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (only manual for checkbox)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "sort"
  ]
}

formulaDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula",
      "description": "Always `formula`"
    },
    "formula": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "expression"
      ]
    }
  },
  "required": [
    "type",
    "formula"
  ],
  "title": "Formula"
}

formulaDateSubGroupByRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "The formula result type for grouping."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "relative",
        "day",
        "week",
        "month",
        "year"
      ],
      "description": "Granularity for date grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "start_day_of_week": {
      "type": "number",
      "enum": [
        0,
        1
      ],
      "description": "Start day of week for week grouping (0 = Sunday, 1 = Monday)."
    }
  },
  "required": [
    "type",
    "group_by",
    "sort"
  ]
}

formulaDateSubGroupByResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "date",
      "description": "The formula result type for grouping."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "relative",
        "day",
        "week",
        "month",
        "year"
      ],
      "description": "Granularity for date grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    },
    "start_day_of_week": {
      "type": "number",
      "enum": [
        0,
        1
      ],
      "description": "Start day of week for week grouping (0 = Sunday, 1 = Monday)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "group_by",
    "sort"
  ]
}

formulaGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID of the formula to group by."
    },
    "group_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/formulaDateSubGroupByRequest"
        },
        {
          "$ref": "#/components/schemas/formulaTextSubGroupByRequest"
        },
        {
          "$ref": "#/components/schemas/formulaNumberSubGroupByRequest"
        },
        {
          "$ref": "#/components/schemas/formulaCheckboxSubGroupByRequest"
        }
      ],
      "description": "Sub-group-by configuration based on the formula result type."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "group_by"
  ]
}

formulaGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID of the formula to group by."
    },
    "group_by": {
      "$ref": "#/components/schemas/formulaSubGroupByResponse",
      "description": "Sub-group-by configuration based on the formula result type."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "group_by"
  ]
}

formulaNumberSubGroupByRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "The formula result type for grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "range_start": {
      "type": "integer",
      "description": "Start of the range for number grouping buckets."
    },
    "range_end": {
      "type": "integer",
      "description": "End of the range for number grouping buckets."
    },
    "range_size": {
      "type": "integer",
      "minimum": 1,
      "description": "Size of each bucket in number grouping."
    }
  },
  "required": [
    "type",
    "sort"
  ]
}

formulaNumberSubGroupByResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "The formula result type for grouping."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (ascending or descending only)."
    },
    "range_start": {
      "type": "integer",
      "description": "Start of the range for number grouping buckets."
    },
    "range_end": {
      "type": "integer",
      "description": "End of the range for number grouping buckets."
    },
    "range_size": {
      "type": "integer",
      "minimum": 1,
      "description": "Size of each bucket in number grouping."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "sort"
  ]
}

formulaPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula",
      "description": "Always `formula`"
    },
    "formula": {
      "type": "object",
      "properties": {
        "expression": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "formula"
  ],
  "title": "Formula"
}

formulaPropertyFilter

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "string": {
          "$ref": "#/components/schemas/textPropertyFilter"
        }
      },
      "required": [
        "string"
      ]
    },
    {
      "type": "object",
      "properties": {
        "checkbox": {
          "$ref": "#/components/schemas/checkboxPropertyFilter"
        }
      },
      "required": [
        "checkbox"
      ]
    },
    {
      "type": "object",
      "properties": {
        "number": {
          "$ref": "#/components/schemas/numberPropertyFilter"
        }
      },
      "required": [
        "number"
      ]
    },
    {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/components/schemas/datePropertyFilter"
        }
      },
      "required": [
        "date"
      ]
    }
  ]
}

formulaPropertyItemObjectResponse

{
  "title": "Formula",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula"
    },
    "formula": {
      "$ref": "#/components/schemas/formulaPropertyResponse"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "formula",
    "object",
    "id"
  ]
}

formulaPropertyResponse

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/stringFormulaPropertyResponse"
    },
    {
      "$ref": "#/components/schemas/dateFormulaPropertyResponse"
    },
    {
      "$ref": "#/components/schemas/numberFormulaPropertyResponse"
    },
    {
      "$ref": "#/components/schemas/booleanFormulaPropertyResponse"
    },
    {
      "$ref": "#/components/schemas/unsupportedFormulaPropertyResponse"
    }
  ]
}

formulaPropertyValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/booleanFormulaPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/dateFormulaPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/numberFormulaPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/stringFormulaPropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/unsupportedFormulaPropertyValueResponse"
    }
  ]
}

formulaSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "formula",
      "description": "Always `formula`"
    },
    "formula": {
      "$ref": "#/components/schemas/formulaPropertyValueResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "formula"
  ],
  "title": "Formula"
}

formulaSubGroupByResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/formulaDateSubGroupByResponse"
    },
    {
      "$ref": "#/components/schemas/formulaTextSubGroupByResponse"
    },
    {
      "$ref": "#/components/schemas/formulaNumberSubGroupByResponse"
    },
    {
      "$ref": "#/components/schemas/formulaCheckboxSubGroupByResponse"
    }
  ],
  "description": "Sub-group-by configuration for formula properties based on result type."
}

formulaTextSubGroupByRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "text",
      "description": "The formula result type for grouping."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "exact",
        "alphabet_prefix"
      ],
      "description": "How to group text values. \"exact\" = exact match, \"alphabet_prefix\" = first letter."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    }
  },
  "required": [
    "type",
    "group_by",
    "sort"
  ]
}

formulaTextSubGroupByResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "text",
      "description": "The formula result type for grouping."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "exact",
        "alphabet_prefix"
      ],
      "description": "How to group text values. \"exact\" = exact match, \"alphabet_prefix\" = first letter."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "group_by",
    "sort"
  ]
}

galleryViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "gallery",
      "description": "The view type. Must be \"gallery\"."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration on gallery cards. Pass null to clear."
    },
    "cover": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/coverConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cover image configuration for cards. Pass null to clear."
    },
    "cover_size": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large"
          ],
          "description": "One of: `small`, `medium`, `large`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Size of the cover image on cards. Pass null to clear."
    },
    "cover_aspect": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "contain",
            "cover"
          ],
          "description": "One of: `contain`, `cover`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Aspect ratio mode for cover images. \"contain\" fits the image, \"cover\" fills the area. Pass null to clear."
    },
    "card_layout": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "list",
            "compact"
          ],
          "description": "One of: `list`, `compact`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Card layout mode. \"list\" shows full cards, \"compact\" shows condensed cards. Pass null to clear."
    }
  },
  "required": [
    "type"
  ]
}

galleryViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "gallery",
      "description": "The view configuration type."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display on gallery cards."
    },
    "cover": {
      "$ref": "#/components/schemas/coverConfigResponse",
      "description": "Card cover/preview image configuration."
    },
    "cover_size": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "large"
      ],
      "description": "Cover image size."
    },
    "cover_aspect": {
      "type": "string",
      "enum": [
        "contain",
        "cover"
      ],
      "description": "Cover image aspect ratio."
    },
    "card_layout": {
      "type": "string",
      "enum": [
        "list",
        "compact"
      ],
      "description": "Card layout mode (list shows all properties, compact shows inline)."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

groupByConfigRequest

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/selectGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/statusGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/personGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/relationGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/dateGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/textGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/numberGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/checkboxGroupByConfigRequest"
    },
    {
      "$ref": "#/components/schemas/formulaGroupByConfigRequest"
    }
  ],
  "description": "Group-by configuration based on property type."
}

groupByConfigResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/selectGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/statusGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/personGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/relationGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/dateGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/textGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/numberGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/checkboxGroupByConfigResponse"
    },
    {
      "$ref": "#/components/schemas/formulaGroupByConfigResponse"
    }
  ],
  "description": "Group-by configuration based on property type."
}

groupFilterOperatorArray

{
  "type": "array",
  "items": {
    "anyOf": [
      {
        "$ref": "#/components/schemas/propertyOrTimestampFilter"
      },
      {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "or": {
                "$ref": "#/components/schemas/propertyOrTimestampFilterArray"
              }
            },
            "required": [
              "or"
            ]
          },
          {
            "type": "object",
            "properties": {
              "and": {
                "$ref": "#/components/schemas/propertyOrTimestampFilterArray"
              }
            },
            "required": [
              "and"
            ]
          }
        ]
      }
    ]
  },
  "maxItems": 100
}

groupObjectRequest

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idRequest"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "object": {
      "type": "string",
      "const": "group"
    }
  },
  "additionalProperties": false,
  "required": [
    "id"
  ]
}

groupObjectResponse

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the group."
    },
    "object": {
      "type": "string",
      "const": "group",
      "description": "The group object type name."
    },
    "name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The name of the group."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "object",
    "name"
  ]
}

groupSortRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "manual",
        "ascending",
        "descending"
      ],
      "description": "Sort direction for groups."
    }
  },
  "required": [
    "type"
  ]
}

groupSortResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "manual",
        "ascending",
        "descending"
      ],
      "description": "Sort direction for groups."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

headerContentWithRichTextAndColorRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "is_toggleable": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

headerContentWithRichTextAndColorResponse

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "is_toggleable": {
      "type": "boolean"
    }
  },
  "required": [
    "rich_text",
    "color",
    "is_toggleable"
  ]
}

headerContentWithSingleLevelOfChildrenRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "is_toggleable": {
      "type": "boolean"
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

heading1BlockObjectResponse

{
  "title": "Heading 1",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "heading_1"
    },
    "heading_1": {
      "$ref": "#/components/schemas/headerContentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "heading_1",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

heading2BlockObjectResponse

{
  "title": "Heading 2",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "heading_2"
    },
    "heading_2": {
      "$ref": "#/components/schemas/headerContentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "heading_2",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

heading3BlockObjectResponse

{
  "title": "Heading 3",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "heading_3"
    },
    "heading_3": {
      "$ref": "#/components/schemas/headerContentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "heading_3",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

heading4BlockObjectResponse

{
  "title": "Heading 4",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "heading_4"
    },
    "heading_4": {
      "$ref": "#/components/schemas/headerContentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "heading_4",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

iconPageIconRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "icon",
      "description": "Always `icon`"
    },
    "icon": {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/components/schemas/noticonName",
          "description": "The name of the Notion icon (e.g. pizza, meeting, home). See the Notion icon picker for valid names."
        },
        "color": {
          "$ref": "#/components/schemas/noticonColor",
          "description": "The color variant of the icon. Defaults to gray if not specified. Valid values: gray, lightgray, brown, yellow, orange, green, blue, purple, pink, red."
        }
      },
      "required": [
        "name"
      ],
      "description": "A Notion native icon, specified by name and optional color."
    }
  },
  "required": [
    "icon"
  ],
  "title": "Icon"
}

iconPageIconResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "icon",
      "description": "Type of icon. In this case, a Notion native icon."
    },
    "icon": {
      "$ref": "#/components/schemas/noticonIconResponse",
      "description": "The Notion native icon, specified by name and color."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "icon"
  ],
  "title": "Icon"
}

idObjectResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ]
}

idRequest

{
  "type": "string"
}

idResponse

{
  "type": "string",
  "format": "uuid"
}

imageBlockObjectResponse

{
  "title": "Image",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "image"
    },
    "image": {
      "$ref": "#/components/schemas/mediaContentWithFileAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "image",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

initialDataSourceRequest

{
  "type": "object",
  "properties": {
    "properties": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/propertyConfigurationRequest"
      },
      "description": "Property schema for the initial data source, if you'd like to create one."
    }
  }
}

internalFileRequest

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "expiry_time": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "required": [
    "url"
  ]
}

internalFileResponse

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The URL of the file."
    },
    "expiry_time": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the URL will expire."
    }
  },
  "additionalProperties": false,
  "required": [
    "url",
    "expiry_time"
  ]
}

internalOrExternalFileWithNameRequest

{
  "anyOf": [
    {
      "title": "File",
      "type": "object",
      "properties": {
        "file": {
          "$ref": "#/components/schemas/internalFileRequest"
        },
        "name": {
          "$ref": "#/components/schemas/stringRequest"
        },
        "type": {
          "type": "string",
          "const": "file"
        }
      },
      "additionalProperties": false,
      "required": [
        "file",
        "name"
      ]
    },
    {
      "title": "External",
      "type": "object",
      "properties": {
        "external": {
          "$ref": "#/components/schemas/externalFileRequest"
        },
        "name": {
          "$ref": "#/components/schemas/stringRequest"
        },
        "type": {
          "type": "string",
          "const": "external"
        }
      },
      "additionalProperties": false,
      "required": [
        "external",
        "name"
      ]
    }
  ]
}

internalOrExternalFileWithNameResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/internalOrExternalFileWithNameResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/fileInternalOrExternalFileWithNameResponse"
        },
        {
          "$ref": "#/components/schemas/externalInternalOrExternalFileWithNameResponse"
        }
      ]
    }
  ]
}

internalOrExternalFileWithNameResponseCommon

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the file."
    }
  },
  "additionalProperties": false,
  "required": [
    "name"
  ]
}

languageRequest

{
  "type": "string",
  "enum": [
    "abap",
    "abc",
    "agda",
    "arduino",
    "ascii art",
    "assembly",
    "bash",
    "basic",
    "bnf",
    "c",
    "c#",
    "c++",
    "clojure",
    "coffeescript",
    "coq",
    "css",
    "dart",
    "dhall",
    "diff",
    "docker",
    "ebnf",
    "elixir",
    "elm",
    "erlang",
    "f#",
    "flow",
    "fortran",
    "gherkin",
    "glsl",
    "go",
    "graphql",
    "groovy",
    "haskell",
    "hcl",
    "html",
    "idris",
    "java",
    "javascript",
    "json",
    "julia",
    "kotlin",
    "latex",
    "less",
    "lisp",
    "livescript",
    "llvm ir",
    "lua",
    "makefile",
    "markdown",
    "markup",
    "matlab",
    "mathematica",
    "mermaid",
    "nix",
    "notion formula",
    "objective-c",
    "ocaml",
    "pascal",
    "perl",
    "php",
    "plain text",
    "powershell",
    "prolog",
    "protobuf",
    "purescript",
    "python",
    "r",
    "racket",
    "reason",
    "ruby",
    "rust",
    "sass",
    "scala",
    "scheme",
    "scss",
    "shell",
    "smalltalk",
    "solidity",
    "sql",
    "swift",
    "toml",
    "typescript",
    "vb.net",
    "verilog",
    "vhdl",
    "visual basic",
    "webassembly",
    "xml",
    "yaml",
    "java/c/c++/c#"
  ]
}

lastEditedByDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_by",
      "description": "Always `last_edited_by`"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "last_edited_by"
  ],
  "title": "Last Edited By"
}

lastEditedByPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_by",
      "description": "Always `last_edited_by`"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "last_edited_by"
  ],
  "title": "Last Edited By"
}

lastEditedByPropertyItemObjectResponse

{
  "title": "Last Edited By",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_by"
    },
    "last_edited_by": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/partialUserObjectResponse"
        },
        {
          "$ref": "#/components/schemas/userObjectResponse"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "last_edited_by",
    "object",
    "id"
  ]
}

lastEditedBySimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_by",
      "description": "Always `last_edited_by`"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/userValueResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "last_edited_by"
  ],
  "title": "Last Edited By"
}

lastEditedTimeDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_time",
      "description": "Always `last_edited_time`"
    },
    "last_edited_time": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "last_edited_time"
  ],
  "title": "Last Edited Time"
}

lastEditedTimePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_time",
      "description": "Always `last_edited_time`"
    },
    "last_edited_time": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "last_edited_time"
  ],
  "title": "Last Edited Time"
}

lastEditedTimePropertyItemObjectResponse

{
  "title": "Last Edited Time",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_time"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "last_edited_time",
    "object",
    "id"
  ]
}

lastEditedTimeSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_edited_time",
      "description": "Always `last_edited_time`"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "last_edited_time"
  ],
  "title": "Last Edited Time"
}

lastVisitedTimePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "last_visited_time",
      "description": "Always `last_visited_time`"
    },
    "last_visited_time": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "last_visited_time"
  ],
  "title": "Last Visited Time"
}

linkMentionResponse

{
  "type": "object",
  "properties": {
    "href": {
      "type": "string",
      "description": "The href of the link mention."
    },
    "title": {
      "type": "string",
      "description": "The title of the link."
    },
    "description": {
      "type": "string",
      "description": "The description of the link."
    },
    "link_author": {
      "type": "string",
      "description": "The author of the link."
    },
    "link_provider": {
      "type": "string",
      "description": "The provider of the link."
    },
    "thumbnail_url": {
      "type": "string",
      "description": "The thumbnail URL of the link."
    },
    "icon_url": {
      "type": "string",
      "description": "The icon URL of the link."
    },
    "iframe_url": {
      "type": "string",
      "description": "The iframe URL of the link."
    },
    "height": {
      "type": "integer",
      "description": "The height of the link preview iframe."
    },
    "padding": {
      "type": "integer",
      "description": "The padding of the link preview iframe."
    },
    "padding_top": {
      "type": "integer",
      "description": "The top padding of the link preview iframe."
    }
  },
  "additionalProperties": false,
  "required": [
    "href"
  ]
}

linkPreviewBlockObjectResponse

{
  "title": "Link Preview",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "link_preview"
    },
    "link_preview": {
      "$ref": "#/components/schemas/mediaContentWithUrlResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "link_preview",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

linkPreviewMentionResponse

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The URL of the link preview mention."
    }
  },
  "additionalProperties": false,
  "required": [
    "url"
  ]
}

linkToPageBlockObjectResponse

{
  "title": "Link To Page",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "link_to_page"
    },
    "link_to_page": {
      "anyOf": [
        {
          "title": "Page Id",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "page_id"
            },
            "page_id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "type",
            "page_id"
          ]
        },
        {
          "title": "Database Id",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "database_id"
            },
            "database_id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "type",
            "database_id"
          ]
        },
        {
          "title": "Comment Id",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "comment_id"
            },
            "comment_id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "type",
            "comment_id"
          ]
        }
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "link_to_page",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

listViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "list",
      "description": "The view type. Must be \"list\"."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration. Pass null to clear."
    }
  },
  "required": [
    "type"
  ]
}

listViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "list",
      "description": "The view configuration type."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display in list items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

locationPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "location",
      "description": "Always `location`"
    },
    "location": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "location"
  ],
  "title": "Location"
}

mapViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "map",
      "description": "The view type. Must be \"map\"."
    },
    "height": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large",
            "extra_large"
          ],
          "description": "One of: `small`, `medium`, `large`, `extra_large`"
        },
        {
          "type": "null"
        }
      ],
      "description": "Map display height. Pass null to clear."
    },
    "map_by": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Property ID of the location property used to position items on the map. Pass null to clear."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration on map pin cards. Pass null to clear."
    }
  },
  "required": [
    "type"
  ]
}

mapViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "map",
      "description": "The view configuration type."
    },
    "height": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "large",
        "extra_large"
      ],
      "description": "Map display height."
    },
    "map_by": {
      "type": "string",
      "description": "Property ID of the location property used to position items on the map."
    },
    "map_by_property_name": {
      "type": "string",
      "description": "Map-by property name (convenience field)."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display on map pin cards."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

mediaContentWithFileAndCaptionRequest

{
  "anyOf": [
    {
      "title": "External",
      "type": "object",
      "properties": {
        "external": {
          "$ref": "#/components/schemas/externalFileRequest"
        },
        "type": {
          "type": "string",
          "const": "external"
        },
        "caption": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemRequest"
          },
          "maxItems": 100
        }
      },
      "additionalProperties": false,
      "required": [
        "external"
      ]
    },
    {
      "title": "File Upload",
      "type": "object",
      "properties": {
        "file_upload": {
          "$ref": "#/components/schemas/fileUploadIdRequest"
        },
        "type": {
          "type": "string",
          "const": "file_upload"
        },
        "caption": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemRequest"
          },
          "maxItems": 100
        }
      },
      "additionalProperties": false,
      "required": [
        "file_upload"
      ]
    }
  ]
}

mediaContentWithFileAndCaptionResponse

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/externalMediaContentWithFileAndCaptionResponse"
    },
    {
      "$ref": "#/components/schemas/fileMediaContentWithFileAndCaptionResponse"
    }
  ]
}

mediaContentWithFileNameAndCaptionRequest

{
  "anyOf": [
    {
      "title": "External",
      "type": "object",
      "properties": {
        "external": {
          "$ref": "#/components/schemas/externalFileRequest"
        },
        "type": {
          "type": "string",
          "const": "external"
        },
        "caption": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemRequest"
          },
          "maxItems": 100
        },
        "name": {
          "$ref": "#/components/schemas/stringRequest"
        }
      },
      "additionalProperties": false,
      "required": [
        "external"
      ]
    },
    {
      "title": "File Upload",
      "type": "object",
      "properties": {
        "file_upload": {
          "$ref": "#/components/schemas/fileUploadIdRequest"
        },
        "type": {
          "type": "string",
          "const": "file_upload"
        },
        "caption": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemRequest"
          },
          "maxItems": 100
        },
        "name": {
          "$ref": "#/components/schemas/stringRequest"
        }
      },
      "additionalProperties": false,
      "required": [
        "file_upload"
      ]
    }
  ]
}

mediaContentWithFileNameAndCaptionResponse

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/externalMediaContentWithFileNameAndCaptionResponse"
    },
    {
      "$ref": "#/components/schemas/fileMediaContentWithFileNameAndCaptionResponse"
    }
  ]
}

mediaContentWithUrlAndCaptionRequest

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "url"
  ]
}

mediaContentWithUrlAndCaptionResponse

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    }
  },
  "required": [
    "url",
    "caption"
  ]
}

mediaContentWithUrlResponse

{
  "type": "object",
  "properties": {
    "url": {
      "$ref": "#/components/schemas/textRequest"
    }
  },
  "required": [
    "url"
  ]
}

meetingNotesBlockObjectResponse

{
  "title": "Meeting Notes",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "meeting_notes"
    },
    "meeting_notes": {
      "$ref": "#/components/schemas/transcriptionBlockResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "meeting_notes",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

mentionRichTextItemRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "mention",
      "description": "Always `mention`"
    },
    "mention": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "user",
              "description": "Always `user`"
            },
            "user": {
              "$ref": "#/components/schemas/partialUserObjectRequest",
              "description": "Details of the user mention."
            }
          },
          "required": [
            "user"
          ],
          "title": "User"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "date",
              "description": "Always `date`"
            },
            "date": {
              "$ref": "#/components/schemas/dateRequest",
              "description": "Details of the date mention."
            }
          },
          "required": [
            "date"
          ],
          "title": "Date"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "page",
              "description": "Always `page`"
            },
            "page": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/idRequest",
                  "description": "The ID of the page in the mention."
                }
              },
              "required": [
                "id"
              ],
              "description": "Details of the page mention."
            }
          },
          "required": [
            "page"
          ],
          "title": "Page"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "database",
              "description": "Always `database`"
            },
            "database": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/idRequest",
                  "description": "The ID of the database in the mention."
                }
              },
              "required": [
                "id"
              ],
              "description": "Details of the database mention."
            }
          },
          "required": [
            "database"
          ],
          "title": "Database"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "template_mention",
              "description": "Always `template_mention`"
            },
            "template_mention": {
              "$ref": "#/components/schemas/templateMentionRequest",
              "description": "Details of the template mention."
            }
          },
          "required": [
            "template_mention"
          ],
          "title": "Template Mention"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "custom_emoji",
              "description": "Always `custom_emoji`"
            },
            "custom_emoji": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/idRequest",
                  "description": "The ID of the custom emoji."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the custom emoji."
                },
                "url": {
                  "type": "string",
                  "description": "The URL of the custom emoji."
                }
              },
              "required": [
                "id"
              ],
              "description": "Details of the custom emoji mention."
            }
          },
          "required": [
            "custom_emoji"
          ],
          "title": "Custom Emoji"
        }
      ],
      "description": "Mention objects represent an inline mention of a database, date, link preview mention, page, template mention, or user. A mention is created in the Notion UI when a user types `@` followed by the name of the reference."
    }
  },
  "required": [
    "mention"
  ],
  "title": "Mention"
}

mentionRichTextItemResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "mention",
      "description": "Always `mention`"
    },
    "mention": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "user",
              "description": "Always `user`"
            },
            "user": {
              "$ref": "#/components/schemas/userValueResponse",
              "description": "Details of the user mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "user"
          ],
          "title": "User"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "date",
              "description": "Always `date`"
            },
            "date": {
              "$ref": "#/components/schemas/dateResponse",
              "description": "Details of the date mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "date"
          ],
          "title": "Date"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "link_preview",
              "description": "Always `link_preview`"
            },
            "link_preview": {
              "$ref": "#/components/schemas/linkPreviewMentionResponse",
              "description": "Details of the link preview mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "link_preview"
          ],
          "title": "Link Preview"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "link_mention",
              "description": "Always `link_mention`"
            },
            "link_mention": {
              "$ref": "#/components/schemas/linkMentionResponse",
              "description": "Details of the link mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "link_mention"
          ],
          "title": "Link Mention"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "page",
              "description": "Always `page`"
            },
            "page": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/idResponse",
                  "description": "The ID of the page in the mention."
                }
              },
              "additionalProperties": false,
              "required": [
                "id"
              ],
              "description": "Details of the page mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "page"
          ],
          "title": "Page"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "database",
              "description": "Always `database`"
            },
            "database": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/idResponse",
                  "description": "The ID of the database in the mention."
                }
              },
              "additionalProperties": false,
              "required": [
                "id"
              ],
              "description": "Details of the database mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "database"
          ],
          "title": "Database"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "template_mention",
              "description": "Always `template_mention`"
            },
            "template_mention": {
              "$ref": "#/components/schemas/templateMentionResponse",
              "description": "Details of the template mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "template_mention"
          ],
          "title": "Template Mention"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "custom_emoji",
              "description": "Always `custom_emoji`"
            },
            "custom_emoji": {
              "$ref": "#/components/schemas/customEmojiResponse",
              "description": "Details of the custom emoji mention."
            }
          },
          "additionalProperties": false,
          "required": [
            "type",
            "custom_emoji"
          ],
          "title": "Custom Emoji"
        }
      ],
      "description": "Mention objects represent an inline mention of a database, date, link preview mention, page, template mention, or user. A mention is created in the Notion UI when a user types `@` followed by the name of the reference."
    }
  },
  "required": [
    "type",
    "mention"
  ],
  "title": "Mention"
}

multiSelectDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "multi_select",
      "description": "Always `multi_select`"
    },
    "multi_select": {
      "type": "object",
      "properties": {
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/selectPropertyResponse"
          },
          "maxItems": 100
        }
      },
      "additionalProperties": false,
      "required": [
        "options"
      ]
    }
  },
  "required": [
    "type",
    "multi_select"
  ],
  "title": "Multi Select"
}

multiSelectPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "multi_select",
      "description": "Always `multi_select`"
    },
    "multi_select": {
      "type": "object",
      "properties": {
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "color": {
                "$ref": "#/components/schemas/selectColor"
              },
              "description": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "maxItems": 100
        }
      }
    }
  },
  "required": [
    "multi_select"
  ],
  "title": "Multi Select"
}

multiSelectPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "contains": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "contains"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_contain": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "does_not_contain"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

multiSelectPropertyItemObjectResponse

{
  "title": "Multi Select",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "multi_select"
    },
    "multi_select": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/partialSelectResponse"
      },
      "maxItems": 100
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "multi_select",
    "object",
    "id"
  ]
}

multiSelectSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "multi_select",
      "description": "Always `multi_select`"
    },
    "multi_select": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/partialSelectPropertyValueResponse"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "multi_select"
  ],
  "title": "Multi Select"
}

nonTerminalAsyncTaskStatus

{
  "type": "string",
  "enum": [
    "queued",
    "running",
    "retrying"
  ]
}

noticonColor

{
  "type": "string",
  "enum": [
    "gray",
    "lightgray",
    "brown",
    "yellow",
    "orange",
    "green",
    "blue",
    "purple",
    "pink",
    "red"
  ],
  "description": "One of: `gray`, `lightgray`, `brown`, `yellow`, `orange`, `green`, `blue`, `purple`, `pink`, `red`"
}

noticonIconResponse

{
  "type": "object",
  "properties": {
    "name": {
      "$ref": "#/components/schemas/noticonName",
      "description": "The name of the Notion icon (e.g. pizza, meeting, home). See the Notion icon picker for valid names."
    },
    "color": {
      "$ref": "#/components/schemas/noticonColor",
      "description": "The color variant of the icon. Valid values: gray, lightgray, brown, yellow, orange, green, blue, purple, pink, red."
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "color"
  ]
}

noticonName

{
  "type": "string",
  "examples": [
    "pizza",
    "meeting",
    "home",
    "star",
    "robot"
  ]
}

numberDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Always `number`"
    },
    "number": {
      "type": "object",
      "properties": {
        "format": {
          "$ref": "#/components/schemas/numberFormat",
          "description": "The number format for the property."
        }
      },
      "additionalProperties": false,
      "required": [
        "format"
      ]
    }
  },
  "required": [
    "type",
    "number"
  ],
  "title": "Number"
}

numberFormat

{
  "type": "string",
  "example": "number"
}

numberFormulaPropertyResponse

{
  "title": "Number",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number"
    },
    "number": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "type",
    "number"
  ]
}

numberFormulaPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Always `number`"
    },
    "number": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "number"
  ],
  "title": "Number"
}

numberGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    },
    "range_start": {
      "type": "integer",
      "description": "Start of the range for number grouping buckets."
    },
    "range_end": {
      "type": "integer",
      "description": "End of the range for number grouping buckets."
    },
    "range_size": {
      "type": "integer",
      "minimum": 1,
      "description": "Size of each bucket in number grouping."
    }
  },
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

numberGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (ascending or descending only)."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    },
    "range_start": {
      "type": "integer",
      "description": "Start of the range for number grouping buckets."
    },
    "range_end": {
      "type": "integer",
      "description": "End of the range for number grouping buckets."
    },
    "range_size": {
      "type": "integer",
      "minimum": 1,
      "description": "Size of each bucket in number grouping."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

numberPartialRollupValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Always `number`"
    },
    "number": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "type",
    "number"
  ],
  "title": "Number"
}

numberPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Always `number`"
    },
    "number": {
      "type": "object",
      "properties": {
        "format": {
          "$ref": "#/components/schemas/numberFormat"
        }
      }
    }
  },
  "required": [
    "number"
  ],
  "title": "Number"
}

numberPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "equals": {
              "type": "number"
            }
          },
          "required": [
            "equals"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_equal": {
              "type": "number"
            }
          },
          "required": [
            "does_not_equal"
          ]
        },
        {
          "type": "object",
          "properties": {
            "greater_than": {
              "type": "number"
            }
          },
          "required": [
            "greater_than"
          ]
        },
        {
          "type": "object",
          "properties": {
            "less_than": {
              "type": "number"
            }
          },
          "required": [
            "less_than"
          ]
        },
        {
          "type": "object",
          "properties": {
            "greater_than_or_equal_to": {
              "type": "number"
            }
          },
          "required": [
            "greater_than_or_equal_to"
          ]
        },
        {
          "type": "object",
          "properties": {
            "less_than_or_equal_to": {
              "type": "number"
            }
          },
          "required": [
            "less_than_or_equal_to"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

numberPropertyItemObjectResponse

{
  "title": "Number",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number"
    },
    "number": {
      "type": [
        "number",
        "null"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "number",
    "object",
    "id"
  ]
}

numberSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "number",
      "description": "Always `number`"
    },
    "number": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "number"
  ],
  "title": "Number"
}

numberedListFormat

{
  "type": "string",
  "enum": [
    "numbers",
    "letters",
    "roman"
  ]
}

numberedListItemBlockObjectResponse

{
  "title": "Numbered List Item",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "numbered_list_item"
    },
    "numbered_list_item": {
      "$ref": "#/components/schemas/contentWithRichTextAndColorAndListResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "numbered_list_item",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

pageContentUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.content_updated",
          "description": "Always `page.content_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity whose content was updated."
            },
            "updated_blocks": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/webhookUpdatedBlock"
              },
              "maxItems": 100,
              "description": "The blocks that were updated in this event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "updated_blocks"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageCoverRequest

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/fileUploadPageCoverRequest"
    },
    {
      "$ref": "#/components/schemas/externalPageCoverRequest"
    }
  ]
}

pageCoverResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/filePageCoverResponse"
    },
    {
      "$ref": "#/components/schemas/externalPageCoverResponse"
    }
  ]
}

pageCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.created",
          "description": "Always `page.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.deleted",
          "description": "Always `page.deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageIconRequest

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/fileUploadPageIconRequest"
    },
    {
      "$ref": "#/components/schemas/emojiPageIconRequest"
    },
    {
      "$ref": "#/components/schemas/externalPageIconRequest"
    },
    {
      "$ref": "#/components/schemas/customEmojiPageIconRequest"
    },
    {
      "$ref": "#/components/schemas/iconPageIconRequest"
    }
  ]
}

pageIconResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/emojiPageIconResponse"
    },
    {
      "$ref": "#/components/schemas/filePageIconResponse"
    },
    {
      "$ref": "#/components/schemas/externalPageIconResponse"
    },
    {
      "$ref": "#/components/schemas/customEmojiPageIconResponse"
    },
    {
      "$ref": "#/components/schemas/iconPageIconResponse"
    }
  ]
}

pageIdCommentParentResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "page_id",
      "description": "Always `page_id`"
    },
    "page_id": {
      "$ref": "#/components/schemas/idResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "page_id"
  ],
  "title": "Page Id"
}

pageIdParentForBlockBasedObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "page_id",
      "description": "The parent type."
    },
    "page_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent page."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "page_id"
  ]
}

pageLockedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.locked",
          "description": "Always `page.locked`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageMarkdownResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "page_markdown",
      "description": "The type of object, always 'page_markdown'."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the page or block."
    },
    "markdown": {
      "type": "string",
      "description": "The page content rendered as enhanced Markdown."
    },
    "truncated": {
      "type": "boolean",
      "description": "Whether the content was truncated due to exceeding the record count limit."
    },
    "unknown_block_ids": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/idResponse"
      },
      "maxItems": 100,
      "description": "Block IDs that could not be loaded (appeared as <unknown> tags in the markdown). Pass these IDs back to this endpoint to fetch their content separately."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "markdown",
    "truncated",
    "unknown_block_ids"
  ]
}

pageMovedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.moved",
          "description": "Always `page.moved`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "page",
      "description": "The page object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the page."
    },
    "created_time": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when this page was created."
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when this page was last edited."
    },
    "in_trash": {
      "type": "boolean",
      "description": "Whether the page is in trash."
    },
    "is_archived": {
      "type": "boolean",
      "description": "Whether the page has been archived."
    },
    "is_locked": {
      "type": "boolean",
      "description": "Whether the page is locked from editing in the Notion app UI."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Notion page."
    },
    "public_url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The public URL of the Notion page, if it has been published to the web."
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse",
      "description": "Information about the page's parent."
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/pagePropertyValueWithIdResponse"
      },
      "description": "Property values of this page."
    },
    "icon": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageIconResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Page icon."
    },
    "cover": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/pageCoverResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Page cover image."
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse",
      "description": "User who created the page."
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse",
      "description": "User who last edited the page."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "created_time",
    "last_edited_time",
    "in_trash",
    "is_archived",
    "is_locked",
    "url",
    "public_url",
    "parent",
    "properties",
    "icon",
    "cover",
    "created_by",
    "last_edited_by"
  ]
}

pagePositionSchema

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "after_block"
        },
        "after_block": {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "id"
          ]
        }
      },
      "required": [
        "type",
        "after_block"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page_start"
        }
      },
      "required": [
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page_end"
        }
      },
      "required": [
        "type"
      ]
    }
  ]
}

pagePropertiesUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.properties_updated",
          "description": "Always `page.properties_updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the page whose properties were updated."
            },
            "updated_properties": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100,
              "description": "The IDs of the properties that were updated."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "updated_properties"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pagePropertyValueWithIdResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/idObjectResponse"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/simpleOrArrayPropertyValueResponse"
        },
        {
          "$ref": "#/components/schemas/partialRollupPropertyResponse"
        }
      ]
    }
  ]
}

pageReferenceResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "description": "The object type."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The object ID."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id"
  ]
}

pageTranscriptionBlockTranscriptDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.transcription_block.transcript_deleted",
          "description": "Always `page.transcription_block.transcript_deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "target": {
              "$ref": "#/components/schemas/webhookExternalBlock",
              "description": "The block that contained the deleted transcript."
            },
            "transcript_id": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The ID of the deleted transcript, or `null` if not available."
            }
          },
          "required": [
            "target",
            "transcript_id"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageUndeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.undeleted",
          "description": "Always `page.undeleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

pageUnlockedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "page.unlocked",
          "description": "Always `page.unlocked`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookPageEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

paragraphBlockObjectResponse

{
  "title": "Paragraph",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "paragraph"
    },
    "paragraph": {
      "$ref": "#/components/schemas/contentWithRichTextColorAndIconResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "paragraph",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

paragraphWithSingleLevelOfChildrenRequest

{
  "type": "object",
  "properties": {
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "color": {
      "$ref": "#/components/schemas/apiColor"
    },
    "icon": {
      "$ref": "#/components/schemas/pageIconRequest"
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/blockObjectRequestWithoutChildren"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "rich_text"
  ]
}

parentForBlockBasedObjectResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/databaseParentResponse"
    },
    {
      "$ref": "#/components/schemas/dataSourceParentResponse"
    },
    {
      "$ref": "#/components/schemas/pageIdParentForBlockBasedObjectResponse"
    },
    {
      "$ref": "#/components/schemas/blockIdParentForBlockBasedObjectResponse"
    },
    {
      "$ref": "#/components/schemas/agentIdParentForBlockBasedObjectResponse"
    },
    {
      "$ref": "#/components/schemas/workspaceParentForBlockBasedObjectResponse"
    }
  ]
}

parentOfDataSourceRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "database_id",
      "description": "Always `database_id`"
    },
    "database_id": {
      "$ref": "#/components/schemas/idRequest",
      "description": "The ID of the parent database (with or without dashes), for example, 195de9221179449fab8075a27c979105"
    }
  },
  "required": [
    "database_id"
  ],
  "title": "Database Id"
}

parentOfDataSourceResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/databaseParentResponse"
    },
    {
      "$ref": "#/components/schemas/dataSourceParentResponse"
    }
  ],
  "description": "The parent of the data source. This is typically a database (`database_id`), but for externally synced data sources, can be another data source (`data_source_id`)."
}

parentOfDatabaseResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/pageIdParentForBlockBasedObjectResponse"
    },
    {
      "$ref": "#/components/schemas/workspaceParentForBlockBasedObjectResponse"
    },
    {
      "$ref": "#/components/schemas/databaseParentResponse"
    },
    {
      "$ref": "#/components/schemas/blockIdParentForBlockBasedObjectResponse"
    }
  ]
}

partialBlockObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "object",
    "id"
  ]
}

partialCommentObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "comment",
      "description": "The comment object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the comment."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id"
  ]
}

partialDataSourceObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "data_source",
      "description": "The data source object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the data source."
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/databasePropertyConfigResponse"
      },
      "description": "The properties schema of the data source."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "properties"
  ]
}

partialDataSourceViewObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "view",
      "description": "The object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the view."
    },
    "parent": {
      "$ref": "#/components/schemas/databaseParentResponse",
      "description": "The parent database of the view."
    },
    "type": {
      "type": "string",
      "enum": [
        "table",
        "board",
        "list",
        "calendar",
        "timeline",
        "gallery",
        "form",
        "chart",
        "map",
        "dashboard"
      ],
      "description": "The view type."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "parent",
    "type"
  ]
}

partialDatabaseObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "database",
      "description": "The database object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the database."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id"
  ]
}

partialPageObjectResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "page",
      "description": "The page object type name."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the page."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id"
  ]
}

partialRollupPropertyResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rollup",
      "description": "Always `rollup`"
    },
    "rollup": {
      "$ref": "#/components/schemas/partialRollupValueResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "rollup"
  ]
}

partialRollupValueResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/partialRollupValueResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/numberPartialRollupValueResponse"
        },
        {
          "$ref": "#/components/schemas/datePartialRollupValueResponse"
        },
        {
          "$ref": "#/components/schemas/arrayPartialRollupValueResponse"
        },
        {
          "$ref": "#/components/schemas/unsupportedPartialRollupValueResponse"
        }
      ]
    }
  ]
}

partialRollupValueResponseCommon

{
  "type": "object",
  "properties": {
    "function": {
      "$ref": "#/components/schemas/rollupFunction",
      "description": "The function used for the rollup, e.g. count, count_values, percent_not_empty, max."
    }
  },
  "additionalProperties": false,
  "required": [
    "function"
  ]
}

partialSelectPropertyValueResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "color": {
      "type": "string",
      "enum": [
        "default",
        "gray",
        "brown",
        "orange",
        "yellow",
        "green",
        "blue",
        "purple",
        "pink",
        "red"
      ],
      "description": "One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "color"
  ]
}

partialSelectResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "color": {
      "$ref": "#/components/schemas/selectColor"
    }
  },
  "required": [
    "id",
    "name",
    "color"
  ]
}

partialUserObjectRequest

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idRequest",
      "description": "The ID of the user."
    },
    "object": {
      "type": "string",
      "const": "user",
      "description": "The user object type name."
    }
  },
  "required": [
    "id"
  ]
}

partialUserObjectResponse

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse"
    },
    "object": {
      "type": "string",
      "const": "user",
      "description": "Always `user`"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "object"
  ]
}

pdfBlockObjectResponse

{
  "title": "Pdf",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "pdf"
    },
    "pdf": {
      "$ref": "#/components/schemas/mediaContentWithFileAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "pdf",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

peopleArrayBasedPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "people",
      "description": "Always `people`"
    },
    "people": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/userValueResponse"
          },
          {
            "$ref": "#/components/schemas/groupObjectResponse"
          }
        ]
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "people"
  ],
  "title": "People"
}

peopleDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "people",
      "description": "Always `people`"
    },
    "people": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "people"
  ],
  "title": "People"
}

peoplePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "people",
      "description": "Always `people`"
    },
    "people": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "people"
  ],
  "title": "People"
}

peoplePropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "contains": {
              "$ref": "#/components/schemas/personIdOrMe"
            }
          },
          "required": [
            "contains"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_contain": {
              "$ref": "#/components/schemas/personIdOrMe"
            }
          },
          "required": [
            "does_not_contain"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

peoplePropertyItemObjectResponse

{
  "title": "People",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "people"
    },
    "people": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/partialUserObjectResponse"
        },
        {
          "$ref": "#/components/schemas/userObjectResponse"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "people",
    "object",
    "id"
  ]
}

personGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "person",
        "created_by",
        "last_edited_by"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

personGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "person",
        "created_by",
        "last_edited_by"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups (only manual supported)."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

personIdOrMe

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/idRequest"
    },
    {
      "type": "string",
      "const": "me"
    }
  ]
}

personUserObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "person",
      "description": "Indicates this user is a person."
    },
    "person": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "The email of the person."
        },
        "email_verified": {
          "type": "boolean",
          "description": "Whether the person's email is verified."
        }
      },
      "additionalProperties": false,
      "description": "Details about the person, when the `type` of the user is `person`."
    }
  },
  "required": [
    "type",
    "person"
  ],
  "title": "Person"
}

phoneNumberDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "phone_number",
      "description": "Always `phone_number`"
    },
    "phone_number": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "phone_number"
  ],
  "title": "Phone Number"
}

phoneNumberPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "phone_number",
      "description": "Always `phone_number`"
    },
    "phone_number": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "phone_number"
  ],
  "title": "Phone Number"
}

phoneNumberPropertyItemObjectResponse

{
  "title": "Phone Number",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "phone_number"
    },
    "phone_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "phone_number",
    "object",
    "id"
  ]
}

phoneNumberSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "phone_number",
      "description": "Always `phone_number`"
    },
    "phone_number": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "phone_number"
  ],
  "title": "Phone Number"
}

placePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "place",
      "description": "Always `place`"
    },
    "place": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "place"
  ],
  "title": "Place"
}

placePropertyItemObjectResponse

{
  "title": "Place",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "place"
    },
    "place": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "aws_place_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "google_place_id": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "place",
    "object",
    "id"
  ]
}

placePropertyValueResponse

{
  "type": "object",
  "properties": {
    "lat": {
      "type": "number"
    },
    "lon": {
      "type": "number"
    },
    "name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "aws_place_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "google_place_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "lat",
    "lon"
  ]
}

placeSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "place",
      "description": "Always `place`"
    },
    "place": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/placePropertyValueResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "place"
  ],
  "title": "Place"
}

propertyConfigurationRequest

{
  "allOf": [
    {
      "$ref": "#/components/schemas/propertyConfigurationRequestCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/numberPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/formulaPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/selectPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/multiSelectPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/statusPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/relationPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/rollupPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/uniqueIdPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/titlePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/richTextPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/urlPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/peoplePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/filesPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/emailPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/phoneNumberPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/datePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/checkboxPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/createdByPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/createdTimePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/lastEditedByPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/lastEditedTimePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/buttonPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/locationPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/verificationPropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/lastVisitedTimePropertyConfigurationRequest"
        },
        {
          "$ref": "#/components/schemas/placePropertyConfigurationRequest"
        }
      ]
    }
  ]
}

propertyConfigurationRequestCommon

{
  "type": "object",
  "properties": {
    "description": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/propertyDescriptionRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "The description of the property."
    }
  }
}

propertyDescriptionRequest

{
  "type": "string",
  "minLength": 1,
  "maxLength": 280
}

propertyFilter

{
  "anyOf": [
    {
      "title": "Title",
      "type": "object",
      "properties": {
        "title": {
          "$ref": "#/components/schemas/textPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "title"
        }
      },
      "additionalProperties": false,
      "required": [
        "title",
        "property"
      ]
    },
    {
      "title": "Rich Text",
      "type": "object",
      "properties": {
        "rich_text": {
          "$ref": "#/components/schemas/textPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "rich_text"
        }
      },
      "additionalProperties": false,
      "required": [
        "rich_text",
        "property"
      ]
    },
    {
      "title": "Number",
      "type": "object",
      "properties": {
        "number": {
          "$ref": "#/components/schemas/numberPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "number"
        }
      },
      "additionalProperties": false,
      "required": [
        "number",
        "property"
      ]
    },
    {
      "title": "Checkbox",
      "type": "object",
      "properties": {
        "checkbox": {
          "$ref": "#/components/schemas/checkboxPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "checkbox"
        }
      },
      "additionalProperties": false,
      "required": [
        "checkbox",
        "property"
      ]
    },
    {
      "title": "Select",
      "type": "object",
      "properties": {
        "select": {
          "$ref": "#/components/schemas/selectPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "select"
        }
      },
      "additionalProperties": false,
      "required": [
        "select",
        "property"
      ]
    },
    {
      "title": "Multi Select",
      "type": "object",
      "properties": {
        "multi_select": {
          "$ref": "#/components/schemas/multiSelectPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "multi_select"
        }
      },
      "additionalProperties": false,
      "required": [
        "multi_select",
        "property"
      ]
    },
    {
      "title": "Status",
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/components/schemas/statusPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "status"
        }
      },
      "additionalProperties": false,
      "required": [
        "status",
        "property"
      ]
    },
    {
      "title": "Date",
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/components/schemas/datePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "date"
        }
      },
      "additionalProperties": false,
      "required": [
        "date",
        "property"
      ]
    },
    {
      "title": "People",
      "type": "object",
      "properties": {
        "people": {
          "$ref": "#/components/schemas/peoplePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "people"
        }
      },
      "additionalProperties": false,
      "required": [
        "people",
        "property"
      ]
    },
    {
      "title": "Files",
      "type": "object",
      "properties": {
        "files": {
          "$ref": "#/components/schemas/existencePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "files"
        }
      },
      "additionalProperties": false,
      "required": [
        "files",
        "property"
      ]
    },
    {
      "title": "Url",
      "type": "object",
      "properties": {
        "url": {
          "$ref": "#/components/schemas/textPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "url"
        }
      },
      "additionalProperties": false,
      "required": [
        "url",
        "property"
      ]
    },
    {
      "title": "Email",
      "type": "object",
      "properties": {
        "email": {
          "$ref": "#/components/schemas/textPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "email"
        }
      },
      "additionalProperties": false,
      "required": [
        "email",
        "property"
      ]
    },
    {
      "title": "Phone Number",
      "type": "object",
      "properties": {
        "phone_number": {
          "$ref": "#/components/schemas/textPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "phone_number"
        }
      },
      "additionalProperties": false,
      "required": [
        "phone_number",
        "property"
      ]
    },
    {
      "title": "Relation",
      "type": "object",
      "properties": {
        "relation": {
          "$ref": "#/components/schemas/relationPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "relation"
        }
      },
      "additionalProperties": false,
      "required": [
        "relation",
        "property"
      ]
    },
    {
      "title": "Created By",
      "type": "object",
      "properties": {
        "created_by": {
          "$ref": "#/components/schemas/peoplePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "created_by"
        }
      },
      "additionalProperties": false,
      "required": [
        "created_by",
        "property"
      ]
    },
    {
      "title": "Created Time",
      "type": "object",
      "properties": {
        "created_time": {
          "$ref": "#/components/schemas/datePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "created_time"
        }
      },
      "additionalProperties": false,
      "required": [
        "created_time",
        "property"
      ]
    },
    {
      "title": "Last Edited By",
      "type": "object",
      "properties": {
        "last_edited_by": {
          "$ref": "#/components/schemas/peoplePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "last_edited_by"
        }
      },
      "additionalProperties": false,
      "required": [
        "last_edited_by",
        "property"
      ]
    },
    {
      "title": "Last Edited Time",
      "type": "object",
      "properties": {
        "last_edited_time": {
          "$ref": "#/components/schemas/datePropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "last_edited_time"
        }
      },
      "additionalProperties": false,
      "required": [
        "last_edited_time",
        "property"
      ]
    },
    {
      "title": "Formula",
      "type": "object",
      "properties": {
        "formula": {
          "$ref": "#/components/schemas/formulaPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "formula"
        }
      },
      "additionalProperties": false,
      "required": [
        "formula",
        "property"
      ]
    },
    {
      "title": "Unique Id",
      "type": "object",
      "properties": {
        "unique_id": {
          "$ref": "#/components/schemas/numberPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "unique_id"
        }
      },
      "additionalProperties": false,
      "required": [
        "unique_id",
        "property"
      ]
    },
    {
      "title": "Rollup",
      "type": "object",
      "properties": {
        "rollup": {
          "$ref": "#/components/schemas/rollupPropertyFilter"
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "rollup"
        }
      },
      "additionalProperties": false,
      "required": [
        "rollup",
        "property"
      ]
    },
    {
      "title": "Verification",
      "type": "object",
      "properties": {
        "verification": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/verificationPropertyStatusFilter"
            },
            {
              "$ref": "#/components/schemas/verificationPropertyDoesNotEqualFilter"
            }
          ]
        },
        "property": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "verification"
        }
      },
      "additionalProperties": false,
      "required": [
        "verification",
        "property"
      ]
    }
  ]
}

propertyItemListResponse

{
  "$ref": "#/components/schemas/propertyItemPropertyItemListResponse"
}

propertyItemObjectResponse

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/numberPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/urlPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/selectPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/multiSelectPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/statusPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/datePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/emailPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/phoneNumberPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/checkboxPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/filesPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/createdByPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/createdTimePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/lastEditedByPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/lastEditedTimePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/formulaPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/buttonPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/uniqueIdPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/verificationPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/placePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/titlePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/richTextPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/peoplePropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/relationPropertyItemObjectResponse"
    },
    {
      "$ref": "#/components/schemas/rollupPropertyItemObjectResponse"
    }
  ]
}

propertyItemPropertyItemListResponse

{
  "title": "Property Item",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "property_item"
    },
    "property_item": {
      "anyOf": [
        {
          "title": "Title",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "title"
            },
            "title": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "next_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "title",
            "next_url",
            "id"
          ]
        },
        {
          "title": "Rich Text",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "rich_text"
            },
            "rich_text": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "next_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "rich_text",
            "next_url",
            "id"
          ]
        },
        {
          "title": "People",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "people"
            },
            "people": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "next_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "people",
            "next_url",
            "id"
          ]
        },
        {
          "title": "Relation",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "relation"
            },
            "relation": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "next_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "relation",
            "next_url",
            "id"
          ]
        },
        {
          "title": "Rollup",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "rollup"
            },
            "rollup": {
              "anyOf": [
                {
                  "title": "Number",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "number"
                    },
                    "number": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "function": {
                      "$ref": "#/components/schemas/rollupFunction"
                    }
                  },
                  "required": [
                    "type",
                    "number",
                    "function"
                  ]
                },
                {
                  "title": "Date",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "date"
                    },
                    "date": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/dateResponse"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "function": {
                      "$ref": "#/components/schemas/rollupFunction"
                    }
                  },
                  "required": [
                    "type",
                    "date",
                    "function"
                  ]
                },
                {
                  "title": "Array",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "array"
                    },
                    "array": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/emptyObject"
                      },
                      "maxItems": 100
                    },
                    "function": {
                      "$ref": "#/components/schemas/rollupFunction"
                    }
                  },
                  "required": [
                    "type",
                    "array",
                    "function"
                  ]
                },
                {
                  "title": "Unsupported",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "unsupported"
                    },
                    "unsupported": {
                      "$ref": "#/components/schemas/emptyObject"
                    },
                    "function": {
                      "$ref": "#/components/schemas/rollupFunction"
                    }
                  },
                  "required": [
                    "type",
                    "unsupported",
                    "function"
                  ]
                },
                {
                  "title": "Incomplete",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "incomplete"
                    },
                    "incomplete": {
                      "$ref": "#/components/schemas/emptyObject"
                    },
                    "function": {
                      "$ref": "#/components/schemas/rollupFunction"
                    }
                  },
                  "required": [
                    "type",
                    "incomplete",
                    "function"
                  ]
                }
              ]
            },
            "next_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "rollup",
            "next_url",
            "id"
          ]
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "list"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "has_more": {
      "type": "boolean"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/propertyItemObjectResponse"
      }
    }
  },
  "required": [
    "type",
    "property_item",
    "object",
    "next_cursor",
    "has_more",
    "results"
  ]
}

propertyOrTimestampFilter

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/propertyFilter"
    },
    {
      "$ref": "#/components/schemas/timestampFilter"
    }
  ]
}

propertyOrTimestampFilterArray

{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/propertyOrTimestampFilter"
  },
  "maxItems": 100
}

propertySortResponse

{
  "type": "object",
  "properties": {
    "property": {
      "type": "string",
      "description": "The name or ID of the property to sort by."
    },
    "direction": {
      "type": "string",
      "enum": [
        "ascending",
        "descending"
      ],
      "description": "Sort direction."
    }
  },
  "additionalProperties": false,
  "required": [
    "property",
    "direction"
  ]
}

publicApiAsyncTaskStatusResultJsonValue

{
  "oneOf": [
    {
      "type": "string"
    },
    {
      "type": "number"
    },
    {
      "type": "boolean"
    },
    {
      "type": "null"
    },
    {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/publicApiAsyncTaskStatusResultJsonValue"
      }
    },
    {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/publicApiAsyncTaskStatusResultJsonValue"
      }
    }
  ]
}

publicApiCommonErrorResponse

{
  "type": "object",
  "properties": {
    "object": {
      "const": "error"
    },
    "message": {
      "type": "string"
    },
    "additional_data": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "required": [
    "object",
    "message"
  ]
}

quickFilterConditionRequest

{
  "type": "object",
  "description": "A property filter condition. Same shape as a property filter but without the \"property\" field (the hashmap key identifies the property). For example: { \"select\": { \"equals\": \"High\" } }."
}

quickFilterConditionResponse

{
  "type": "object",
  "description": "A property filter condition. Same shape as a property filter but without the \"property\" field. For example: { \"select\": { \"equals\": \"High\" } }."
}

quoteBlockObjectResponse

{
  "title": "Quote",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "quote"
    },
    "quote": {
      "$ref": "#/components/schemas/contentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "quote",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

relationArrayBasedPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation",
      "description": "Always `relation`"
    },
    "relation": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/relationItemPropertyValueResponse"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "relation"
  ],
  "title": "Relation"
}

relationDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation",
      "description": "Always `relation`"
    },
    "relation": {
      "$ref": "#/components/schemas/databasePropertyRelationConfigResponse"
    }
  },
  "required": [
    "type",
    "relation"
  ],
  "title": "Relation"
}

relationGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

relationGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

relationItemPropertyValueResponse

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idRequest"
    }
  },
  "required": [
    "id"
  ]
}

relationPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation",
      "description": "Always `relation`"
    },
    "relation": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "data_source_id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "data_source_id"
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "single_property",
                  "description": "Always `single_property`"
                },
                "single_property": {
                  "$ref": "#/components/schemas/emptyObject"
                }
              },
              "required": [
                "single_property"
              ],
              "title": "Single Property"
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "dual_property",
                  "description": "Always `dual_property`"
                },
                "dual_property": {
                  "type": "object",
                  "properties": {
                    "synced_property_id": {
                      "type": "string"
                    },
                    "synced_property_name": {
                      "type": "string"
                    }
                  }
                }
              },
              "required": [
                "dual_property"
              ],
              "title": "Dual Property"
            }
          ]
        }
      ]
    }
  },
  "required": [
    "relation"
  ],
  "title": "Relation"
}

relationPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "contains": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "contains"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_contain": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "does_not_contain"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

relationPropertyItemObjectResponse

{
  "title": "Relation",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "relation"
    },
    "relation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        }
      },
      "required": [
        "id"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "relation",
    "object",
    "id"
  ]
}

relativeDateValue

{
  "type": "string",
  "enum": [
    "today",
    "tomorrow",
    "yesterday",
    "one_week_ago",
    "one_week_from_now",
    "one_month_ago",
    "one_month_from_now"
  ]
}

requestStatusResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "complete",
        "incomplete"
      ],
      "description": "Whether the result set is complete or incomplete. `incomplete` means the response does not include all rows that match the query parameters (e.g. due to a server-side pagination depth limit)."
    },
    "incomplete_reason": {
      "type": "string",
      "const": "query_result_limit_reached",
      "description": "Why the result set is incomplete. Only present when `type` is `incomplete`."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

richTextArrayBasedPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rich_text",
      "description": "Always `rich_text`"
    },
    "rich_text": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "rich_text"
  ],
  "title": "Rich Text"
}

richTextDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rich_text",
      "description": "Always `rich_text`"
    },
    "rich_text": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "rich_text"
  ],
  "title": "Rich Text"
}

richTextItemRequest

{
  "allOf": [
    {
      "$ref": "#/components/schemas/richTextItemRequestCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/textRichTextItemRequest"
        },
        {
          "$ref": "#/components/schemas/mentionRichTextItemRequest"
        },
        {
          "$ref": "#/components/schemas/equationRichTextItemRequest"
        }
      ]
    }
  ]
}

richTextItemRequestCommon

{
  "type": "object",
  "properties": {
    "annotations": {
      "$ref": "#/components/schemas/annotationRequest",
      "description": "All rich text objects contain an annotations object that sets the styling for the rich text."
    }
  }
}

richTextItemResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/richTextItemResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/textRichTextItemResponse"
        },
        {
          "$ref": "#/components/schemas/mentionRichTextItemResponse"
        },
        {
          "$ref": "#/components/schemas/equationRichTextItemResponse"
        }
      ]
    }
  ]
}

richTextItemResponseCommon

{
  "type": "object",
  "properties": {
    "plain_text": {
      "type": "string",
      "description": "The plain text content of the rich text object, without any styling."
    },
    "href": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "A URL that the rich text object links to or mentions."
    },
    "annotations": {
      "$ref": "#/components/schemas/annotationResponse",
      "description": "All rich text objects contain an annotations object that sets the styling for the rich text."
    }
  },
  "additionalProperties": false,
  "required": [
    "plain_text",
    "href",
    "annotations"
  ]
}

richTextPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rich_text",
      "description": "Always `rich_text`"
    },
    "rich_text": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "rich_text"
  ],
  "title": "Rich Text"
}

richTextPropertyItemObjectResponse

{
  "title": "Rich Text",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rich_text"
    },
    "rich_text": {
      "$ref": "#/components/schemas/richTextItemResponse"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "rich_text",
    "object",
    "id"
  ]
}

rollupDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rollup",
      "description": "Always `rollup`"
    },
    "rollup": {
      "type": "object",
      "properties": {
        "function": {
          "$ref": "#/components/schemas/rollupFunction",
          "description": "The function to use for the rollup, e.g. count, count_values, percent_not_empty, max."
        },
        "rollup_property_name": {
          "type": "string"
        },
        "relation_property_name": {
          "type": "string"
        },
        "rollup_property_id": {
          "type": "string"
        },
        "relation_property_id": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "function",
        "rollup_property_name",
        "relation_property_name",
        "rollup_property_id",
        "relation_property_id"
      ]
    }
  },
  "required": [
    "type",
    "rollup"
  ],
  "title": "Rollup"
}

rollupFunction

{
  "type": "string",
  "enum": [
    "count",
    "count_values",
    "empty",
    "not_empty",
    "unique",
    "show_unique",
    "percent_empty",
    "percent_not_empty",
    "sum",
    "average",
    "median",
    "min",
    "max",
    "range",
    "earliest_date",
    "latest_date",
    "date_range",
    "checked",
    "unchecked",
    "percent_checked",
    "percent_unchecked",
    "count_per_group",
    "percent_per_group",
    "show_original"
  ]
}

rollupPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rollup",
      "description": "Always `rollup`"
    },
    "rollup": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "function": {
              "$ref": "#/components/schemas/rollupFunction",
              "description": "The function to use for the rollup, e.g. count, count_values, percent_not_empty, max."
            }
          },
          "required": [
            "function"
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "relation_property_name": {
                  "type": "string"
                },
                "rollup_property_name": {
                  "type": "string"
                }
              },
              "required": [
                "relation_property_name",
                "rollup_property_name"
              ]
            },
            {
              "type": "object",
              "properties": {
                "relation_property_id": {
                  "type": "string"
                },
                "rollup_property_name": {
                  "type": "string"
                }
              },
              "required": [
                "relation_property_id",
                "rollup_property_name"
              ]
            },
            {
              "type": "object",
              "properties": {
                "relation_property_name": {
                  "type": "string"
                },
                "rollup_property_id": {
                  "type": "string"
                }
              },
              "required": [
                "relation_property_name",
                "rollup_property_id"
              ]
            },
            {
              "type": "object",
              "properties": {
                "relation_property_id": {
                  "type": "string"
                },
                "rollup_property_id": {
                  "type": "string"
                }
              },
              "required": [
                "relation_property_id",
                "rollup_property_id"
              ]
            }
          ]
        }
      ]
    }
  },
  "required": [
    "rollup"
  ],
  "title": "Rollup"
}

rollupPropertyFilter

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "any": {
          "$ref": "#/components/schemas/rollupSubfilterPropertyFilter"
        }
      },
      "required": [
        "any"
      ]
    },
    {
      "type": "object",
      "properties": {
        "none": {
          "$ref": "#/components/schemas/rollupSubfilterPropertyFilter"
        }
      },
      "required": [
        "none"
      ]
    },
    {
      "type": "object",
      "properties": {
        "every": {
          "$ref": "#/components/schemas/rollupSubfilterPropertyFilter"
        }
      },
      "required": [
        "every"
      ]
    },
    {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/components/schemas/datePropertyFilter"
        }
      },
      "required": [
        "date"
      ]
    },
    {
      "type": "object",
      "properties": {
        "number": {
          "$ref": "#/components/schemas/numberPropertyFilter"
        }
      },
      "required": [
        "number"
      ]
    }
  ]
}

rollupPropertyItemObjectResponse

{
  "title": "Rollup",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "rollup"
    },
    "rollup": {
      "anyOf": [
        {
          "title": "Number",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "number"
            },
            "number": {
              "type": [
                "number",
                "null"
              ]
            },
            "function": {
              "$ref": "#/components/schemas/rollupFunction"
            }
          },
          "required": [
            "type",
            "number",
            "function"
          ]
        },
        {
          "title": "Date",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "date"
            },
            "date": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/dateResponse"
                },
                {
                  "type": "null"
                }
              ]
            },
            "function": {
              "$ref": "#/components/schemas/rollupFunction"
            }
          },
          "required": [
            "type",
            "date",
            "function"
          ]
        },
        {
          "title": "Array",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "array"
            },
            "array": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/emptyObject"
              },
              "maxItems": 100
            },
            "function": {
              "$ref": "#/components/schemas/rollupFunction"
            }
          },
          "required": [
            "type",
            "array",
            "function"
          ]
        },
        {
          "title": "Unsupported",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unsupported"
            },
            "unsupported": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "function": {
              "$ref": "#/components/schemas/rollupFunction"
            }
          },
          "required": [
            "type",
            "unsupported",
            "function"
          ]
        },
        {
          "title": "Incomplete",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "incomplete"
            },
            "incomplete": {
              "$ref": "#/components/schemas/emptyObject"
            },
            "function": {
              "$ref": "#/components/schemas/rollupFunction"
            }
          },
          "required": [
            "type",
            "incomplete",
            "function"
          ]
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "rollup",
    "object",
    "id"
  ]
}

rollupSubfilterPropertyFilter

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "rich_text": {
          "$ref": "#/components/schemas/textPropertyFilter"
        }
      },
      "required": [
        "rich_text"
      ]
    },
    {
      "type": "object",
      "properties": {
        "number": {
          "$ref": "#/components/schemas/numberPropertyFilter"
        }
      },
      "required": [
        "number"
      ]
    },
    {
      "type": "object",
      "properties": {
        "checkbox": {
          "$ref": "#/components/schemas/checkboxPropertyFilter"
        }
      },
      "required": [
        "checkbox"
      ]
    },
    {
      "type": "object",
      "properties": {
        "select": {
          "$ref": "#/components/schemas/selectPropertyFilter"
        }
      },
      "required": [
        "select"
      ]
    },
    {
      "type": "object",
      "properties": {
        "multi_select": {
          "$ref": "#/components/schemas/multiSelectPropertyFilter"
        }
      },
      "required": [
        "multi_select"
      ]
    },
    {
      "type": "object",
      "properties": {
        "relation": {
          "$ref": "#/components/schemas/relationPropertyFilter"
        }
      },
      "required": [
        "relation"
      ]
    },
    {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/components/schemas/datePropertyFilter"
        }
      },
      "required": [
        "date"
      ]
    },
    {
      "type": "object",
      "properties": {
        "people": {
          "$ref": "#/components/schemas/peoplePropertyFilter"
        }
      },
      "required": [
        "people"
      ]
    },
    {
      "type": "object",
      "properties": {
        "files": {
          "$ref": "#/components/schemas/existencePropertyFilter"
        }
      },
      "required": [
        "files"
      ]
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/components/schemas/statusPropertyFilter"
        }
      },
      "required": [
        "status"
      ]
    }
  ]
}

selectColor

{
  "type": "string",
  "enum": [
    "default",
    "gray",
    "brown",
    "orange",
    "yellow",
    "green",
    "blue",
    "purple",
    "pink",
    "red"
  ],
  "description": "One of: `default`, `gray`, `brown`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `red`"
}

selectDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "select",
      "description": "Always `select`"
    },
    "select": {
      "type": "object",
      "properties": {
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/selectPropertyResponse"
          },
          "maxItems": 100
        }
      },
      "additionalProperties": false,
      "required": [
        "options"
      ]
    }
  },
  "required": [
    "type",
    "select"
  ],
  "title": "Select"
}

selectGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "select",
        "multi_select"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

selectGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "select",
        "multi_select"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "sort"
  ]
}

selectPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "select",
      "description": "Always `select`"
    },
    "select": {
      "type": "object",
      "properties": {
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "color": {
                "$ref": "#/components/schemas/selectColor"
              },
              "description": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "maxItems": 100
        }
      }
    }
  },
  "required": [
    "select"
  ],
  "title": "Select"
}

selectPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "equals": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "equals"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_equal": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "does_not_equal"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

selectPropertyItemObjectResponse

{
  "title": "Select",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "select"
    },
    "select": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/partialSelectResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "select",
    "object",
    "id"
  ]
}

selectPropertyResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "color": {
      "$ref": "#/components/schemas/selectColor"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "color",
    "description"
  ]
}

selectSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "select",
      "description": "Always `select`"
    },
    "select": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/partialSelectPropertyValueResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "select"
  ],
  "title": "Select"
}

simpleOrArrayPropertyValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/simplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/arrayBasedPropertyValueResponse"
    }
  ]
}

simplePropertyValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/numberSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/urlSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/selectSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/multiSelectSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/statusSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/dateSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/emailSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/phoneNumberSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/checkboxSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/filesSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/createdBySimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/createdTimeSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/lastEditedBySimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/lastEditedTimeSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/formulaSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/buttonSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/uniqueIdSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/verificationSimplePropertyValueResponse"
    },
    {
      "$ref": "#/components/schemas/placeSimplePropertyValueResponse"
    }
  ]
}

singlePropertyDatabasePropertyRelationConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "single_property",
      "description": "Always `single_property`"
    },
    "single_property": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "single_property"
  ],
  "title": "Single Property"
}

sortDirectionRequest

{
  "type": "string",
  "enum": [
    "ascending",
    "descending"
  ],
  "description": "One of: `ascending`, `descending`"
}

statusDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status",
      "description": "Always `status`"
    },
    "status": {
      "type": "object",
      "properties": {
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/statusPropertyResponse"
          },
          "maxItems": 100,
          "description": "The options for the status property."
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the status group."
              },
              "name": {
                "type": "string",
                "description": "The name of the status group."
              },
              "color": {
                "$ref": "#/components/schemas/selectColor",
                "description": "The color of the status group."
              },
              "option_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 100,
                "description": "The IDs of the status options in this group."
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "color",
              "option_ids"
            ]
          },
          "maxItems": 100,
          "description": "The groups for the status property."
        }
      },
      "additionalProperties": false,
      "required": [
        "options",
        "groups"
      ]
    }
  },
  "required": [
    "type",
    "status"
  ],
  "title": "Status"
}

statusGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "group",
        "option"
      ],
      "description": "How to group status values. \"group\" groups by status group (To Do/In Progress/Done), \"option\" groups by individual option."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

statusGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status",
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "group",
        "option"
      ],
      "description": "How to group status values. \"group\" groups by status group (To Do/In Progress/Done), \"option\" groups by individual option."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

statusOptionGroup

{
  "type": "string",
  "enum": [
    "To-do",
    "In progress",
    "Complete"
  ],
  "description": "One of: `To-do`, `In progress`, `Complete`"
}

statusOptionRequest

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "color": {
      "$ref": "#/components/schemas/selectColor"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "group": {
      "$ref": "#/components/schemas/statusOptionGroup"
    }
  },
  "required": [
    "name"
  ]
}

statusOptionRequestArray

{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/statusOptionRequest"
  },
  "maxItems": 100
}

statusOptionUpdateRequest

{
  "allOf": [
    {
      "$ref": "#/components/schemas/statusOptionUpdateRequestCommon"
    },
    {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ]
        }
      ]
    }
  ]
}

statusOptionUpdateRequestArray

{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/statusOptionUpdateRequest"
  },
  "maxItems": 100
}

statusOptionUpdateRequestCommon

{
  "type": "object",
  "properties": {
    "color": {
      "$ref": "#/components/schemas/selectColor"
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "group": {
      "$ref": "#/components/schemas/statusOptionGroup"
    }
  }
}

statusPropertyConfigRequest

{
  "type": "object",
  "properties": {
    "options": {
      "$ref": "#/components/schemas/statusOptionRequestArray",
      "description": "The initial status options. If not provided, defaults are created."
    }
  }
}

statusPropertyConfigUpdateRequest

{
  "type": "object",
  "properties": {
    "options": {
      "$ref": "#/components/schemas/statusOptionUpdateRequestArray",
      "description": "Status options to add or update. Use group to assign an option to To-do, In progress, or Complete. Existing options keep their current group when group is omitted; new options use To-do when present, or the first existing group otherwise."
    }
  }
}

statusPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status",
      "description": "Always `status`"
    },
    "status": {
      "$ref": "#/components/schemas/statusPropertyConfigRequest"
    }
  },
  "required": [
    "status"
  ],
  "title": "Status"
}

statusPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "equals": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "equals"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_equal": {
              "$ref": "#/components/schemas/stringOrStringArray"
            }
          },
          "required": [
            "does_not_equal"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

statusPropertyItemObjectResponse

{
  "title": "Status",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status"
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/partialSelectResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "status",
    "object",
    "id"
  ]
}

statusPropertyResponse

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the status option."
    },
    "name": {
      "type": "string",
      "description": "The name of the status option."
    },
    "color": {
      "$ref": "#/components/schemas/selectColor",
      "description": "The color of the status option."
    },
    "description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The description of the status option."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "color",
    "description"
  ]
}

statusSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "status",
      "description": "Always `status`"
    },
    "status": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/partialSelectPropertyValueResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "status"
  ],
  "title": "Status"
}

stringFormulaPropertyResponse

{
  "title": "String",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "string"
    },
    "string": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "type",
    "string"
  ]
}

stringFormulaPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "string",
      "description": "Always `string`"
    },
    "string": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "string"
  ],
  "title": "String"
}

stringOrStringArray

{
  "anyOf": [
    {
      "type": "string"
    },
    {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  ]
}

stringRequest

{
  "type": "string",
  "maxLength": 100,
  "minLength": 1
}

subtaskConfigRequest

{
  "type": "object",
  "properties": {
    "property_id": {
      "type": "string",
      "description": "Relation property ID used for parent-child nesting."
    },
    "display_mode": {
      "type": "string",
      "enum": [
        "show",
        "hidden",
        "flattened",
        "disabled"
      ],
      "description": "How sub-items are displayed. \"show\" renders hierarchically with toggles, \"hidden\" shows parents with a count, \"flattened\" shows sub-items with a parent indicator, \"disabled\" turns off sub-item rendering."
    },
    "filter_scope": {
      "type": "string",
      "enum": [
        "parents",
        "parents_and_subitems",
        "subitems"
      ],
      "description": "Which items are included when filtering. \"parents\" includes parent items only, \"parents_and_subitems\" includes both, \"subitems\" includes sub-items only."
    },
    "toggle_column_id": {
      "type": "string",
      "description": "Property ID of the column showing the sub-item expand/collapse toggle."
    }
  }
}

subtaskConfigResponse

{
  "type": "object",
  "properties": {
    "property_id": {
      "type": "string",
      "description": "Relation property ID used for parent-child nesting."
    },
    "display_mode": {
      "type": "string",
      "enum": [
        "show",
        "hidden",
        "flattened",
        "disabled"
      ],
      "description": "How sub-items are displayed. \"show\" renders hierarchically with toggles, \"hidden\" shows parents with a count, \"flattened\" shows sub-items with a parent indicator, \"disabled\" turns off sub-item rendering."
    },
    "filter_scope": {
      "type": "string",
      "enum": [
        "parents",
        "parents_and_subitems",
        "subitems"
      ],
      "description": "Which items are included when filtering. \"parents\" includes parent items only, \"parents_and_subitems\" includes both, \"subitems\" includes sub-items only."
    },
    "toggle_column_id": {
      "type": "string",
      "description": "Property ID of the column showing the sub-item expand/collapse toggle."
    }
  },
  "additionalProperties": false
}

syncedBlockBlockObjectResponse

{
  "title": "Synced Block",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "synced_block"
    },
    "synced_block": {
      "type": "object",
      "properties": {
        "synced_from": {
          "title": "Block Id",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "type": {
              "type": "string",
              "const": "block_id"
            },
            "block_id": {
              "$ref": "#/components/schemas/idRequest"
            }
          },
          "required": [
            "type",
            "block_id"
          ]
        }
      },
      "required": [
        "synced_from"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "synced_block",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

tabBlockObjectResponse

{
  "title": "Tab",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "tab"
    },
    "tab": {
      "$ref": "#/components/schemas/emptyObject"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "tab",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

tabItemRequestWithSingleLevelOfChildren

{
  "title": "Paragraph",
  "type": "object",
  "properties": {
    "paragraph": {
      "$ref": "#/components/schemas/paragraphWithSingleLevelOfChildrenRequest"
    },
    "type": {
      "type": "string",
      "const": "paragraph"
    },
    "object": {
      "type": "string",
      "const": "block"
    }
  },
  "additionalProperties": false,
  "required": [
    "paragraph"
  ]
}

tabItemRequestWithoutChildren

{
  "title": "Paragraph",
  "type": "object",
  "properties": {
    "paragraph": {
      "$ref": "#/components/schemas/contentWithRichTextColorAndIconRequest"
    },
    "type": {
      "type": "string",
      "const": "paragraph"
    },
    "object": {
      "type": "string",
      "const": "block"
    }
  },
  "additionalProperties": false,
  "required": [
    "paragraph"
  ]
}

tabRequestWithNestedTabItemChildren

{
  "type": "object",
  "properties": {
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/tabItemRequestWithSingleLevelOfChildren"
      },
      "maxItems": 100,
      "minItems": 1
    }
  },
  "additionalProperties": false,
  "required": [
    "children"
  ]
}

tabRequestWithTabItemChildren

{
  "type": "object",
  "properties": {
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/tabItemRequestWithoutChildren"
      },
      "maxItems": 100,
      "minItems": 1
    }
  },
  "additionalProperties": false,
  "required": [
    "children"
  ]
}

tableBlockObjectResponse

{
  "title": "Table",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "table"
    },
    "table": {
      "$ref": "#/components/schemas/contentWithTableResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "table",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

tableOfContentsBlockObjectResponse

{
  "title": "Table Of Contents",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "table_of_contents"
    },
    "table_of_contents": {
      "type": "object",
      "properties": {
        "color": {
          "$ref": "#/components/schemas/apiColor"
        }
      },
      "required": [
        "color"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "table_of_contents",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

tableRequestWithTableRowChildren

{
  "type": "object",
  "properties": {
    "table_width": {
      "type": "integer",
      "minimum": 1
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/tableRowRequest"
      },
      "maxItems": 100,
      "minItems": 1
    },
    "has_column_header": {
      "type": "boolean"
    },
    "has_row_header": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "table_width",
    "children"
  ]
}

tableRowBlockObjectResponse

{
  "title": "Table Row",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "table_row"
    },
    "table_row": {
      "$ref": "#/components/schemas/contentWithTableRowResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "table_row",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

tableRowRequest

{
  "title": "Table Row",
  "type": "object",
  "properties": {
    "table_row": {
      "$ref": "#/components/schemas/contentWithTableRowRequest"
    },
    "type": {
      "type": "string",
      "const": "table_row"
    },
    "object": {
      "type": "string",
      "const": "block"
    }
  },
  "additionalProperties": false,
  "required": [
    "table_row"
  ]
}

tableViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "table",
      "description": "The view type. Must be \"table\"."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration. Pass null to clear."
    },
    "group_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/groupByConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Group-by configuration for the table. Pass null to remove grouping."
    },
    "subtasks": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/subtaskConfigRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Subtask (sub-item) configuration. Pass null to reset subtask config to defaults (which may show subtasks). Use `{ \"display_mode\": \"disabled\" }` to explicitly disable subtasks."
    },
    "wrap_cells": {
      "type": "boolean",
      "description": "Whether to wrap cell content in the table."
    },
    "frozen_column_index": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of columns frozen from the left side of the table."
    },
    "show_vertical_lines": {
      "type": "boolean",
      "description": "Whether to show vertical grid lines between columns."
    }
  },
  "required": [
    "type"
  ]
}

tableViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "table",
      "description": "The view configuration type."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Columns/properties visible in the table view."
    },
    "group_by": {
      "$ref": "#/components/schemas/groupByConfigResponse",
      "description": "Vertical (row) grouping configuration."
    },
    "subtasks": {
      "$ref": "#/components/schemas/subtaskConfigResponse",
      "description": "Sub-item (subtask) display configuration."
    },
    "wrap_cells": {
      "type": "boolean",
      "description": "Whether to wrap cell content by default."
    },
    "frozen_column_index": {
      "type": "integer",
      "minimum": 0,
      "description": "Index of the last frozen column. Columns up to and including this index are frozen."
    },
    "show_vertical_lines": {
      "type": "boolean",
      "description": "Whether to show vertical lines between columns."
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}

templateBlockObjectResponse

{
  "title": "Template",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "template"
    },
    "template": {
      "type": "object",
      "properties": {
        "rich_text": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemResponse"
          },
          "maxItems": 100
        }
      },
      "required": [
        "rich_text"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "template",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

templateMentionDateTemplateMentionRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "template_mention_date",
      "description": "Always `template_mention_date`"
    },
    "template_mention_date": {
      "type": "string",
      "enum": [
        "today",
        "now"
      ],
      "description": "The date of the template mention."
    }
  },
  "additionalProperties": false,
  "required": [
    "template_mention_date"
  ],
  "title": "Template Mention Date"
}

templateMentionDateTemplateMentionResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "template_mention_date",
      "description": "Always `template_mention_date`"
    },
    "template_mention_date": {
      "type": "string",
      "enum": [
        "today",
        "now"
      ],
      "description": "The date of the template mention."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "template_mention_date"
  ],
  "title": "Template Mention Date"
}

templateMentionRequest

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/templateMentionDateTemplateMentionRequest"
    },
    {
      "$ref": "#/components/schemas/templateMentionUserTemplateMentionRequest"
    }
  ]
}

templateMentionResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/templateMentionDateTemplateMentionResponse"
    },
    {
      "$ref": "#/components/schemas/templateMentionUserTemplateMentionResponse"
    }
  ]
}

templateMentionUserTemplateMentionRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "template_mention_user",
      "description": "Always `template_mention_user`"
    },
    "template_mention_user": {
      "type": "string",
      "const": "me",
      "description": "The user of the template mention."
    }
  },
  "additionalProperties": false,
  "required": [
    "template_mention_user"
  ],
  "title": "Template Mention User"
}

templateMentionUserTemplateMentionResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "template_mention_user",
      "description": "Always `template_mention_user`"
    },
    "template_mention_user": {
      "type": "string",
      "const": "me",
      "description": "The user of the template mention."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "template_mention_user"
  ],
  "title": "Template Mention User"
}

templateTimezone

{
  "description": "IANA timezone to use when resolving template variables like @now and @today (e.g. 'America/New_York'). Defaults to the authorizing user's timezone for public integrations, or UTC for internal integrations.",
  "examples": [
    "America/New_York",
    "Europe/London",
    "Asia/Tokyo"
  ],
  "type": "string"
}

textGroupByConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "text",
        "title",
        "url",
        "email",
        "phone_number"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "exact",
        "alphabet_prefix"
      ],
      "description": "How to group text values. \"exact\" = exact match, \"alphabet_prefix\" = first letter."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortRequest",
      "description": "Sort order for groups."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

textGroupByConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "text",
        "title",
        "url",
        "email",
        "phone_number"
      ],
      "description": "The property type for grouping."
    },
    "property_id": {
      "type": "string",
      "description": "Property ID to group by."
    },
    "group_by": {
      "type": "string",
      "enum": [
        "exact",
        "alphabet_prefix"
      ],
      "description": "How to group text values. \"exact\" = exact match, \"alphabet_prefix\" = first letter."
    },
    "sort": {
      "$ref": "#/components/schemas/groupSortResponse",
      "description": "Sort order for groups."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field)."
    },
    "hide_empty_groups": {
      "type": "boolean",
      "description": "Whether to hide groups that have no items."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "property_id",
    "group_by",
    "sort"
  ]
}

textPropertyFilter

{
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "equals": {
              "type": "string"
            }
          },
          "required": [
            "equals"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_equal": {
              "type": "string"
            }
          },
          "required": [
            "does_not_equal"
          ]
        },
        {
          "type": "object",
          "properties": {
            "contains": {
              "type": "string"
            }
          },
          "required": [
            "contains"
          ]
        },
        {
          "type": "object",
          "properties": {
            "does_not_contain": {
              "type": "string"
            }
          },
          "required": [
            "does_not_contain"
          ]
        },
        {
          "type": "object",
          "properties": {
            "starts_with": {
              "type": "string"
            }
          },
          "required": [
            "starts_with"
          ]
        },
        {
          "type": "object",
          "properties": {
            "ends_with": {
              "type": "string"
            }
          },
          "required": [
            "ends_with"
          ]
        }
      ]
    },
    {
      "$ref": "#/components/schemas/existencePropertyFilter"
    }
  ]
}

textRequest

{
  "type": "string",
  "maxLength": 2000,
  "minLength": 1
}

textRichTextItemRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "text",
      "description": "Always `text`"
    },
    "text": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "maxLength": 2000,
          "description": "The actual text content of the text."
        },
        "link": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "examples": [
                    "https://www.notion.com"
                  ],
                  "description": "The URL of the link."
                }
              },
              "required": [
                "url"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "An object with information about any inline link in this text, if included."
        }
      },
      "additionalProperties": false,
      "required": [
        "content"
      ],
      "description": "If a rich text object's type value is `text`, then the corresponding text field contains an object including the text content and any inline link."
    }
  },
  "required": [
    "text"
  ],
  "title": "Text"
}

textRichTextItemResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "text",
      "description": "Always `text`"
    },
    "text": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string",
          "maxLength": 2000,
          "description": "The actual text content of the text."
        },
        "link": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "examples": [
                    "https://www.notion.com"
                  ],
                  "description": "The URL of the link."
                }
              },
              "additionalProperties": false,
              "required": [
                "url"
              ]
            },
            {
              "type": "null"
            }
          ],
          "description": "An object with information about any inline link in this text, if included."
        }
      },
      "additionalProperties": false,
      "required": [
        "content",
        "link"
      ],
      "description": "If a rich text object's type value is `text`, then the corresponding text field contains an object including the text content and any inline link."
    }
  },
  "required": [
    "type",
    "text"
  ],
  "title": "Text"
}

timeZoneRequest

{
  "type": "string",
  "example": "Africa/Abidjan"
}

timelineArrowsByRequest

{
  "type": "object",
  "properties": {
    "property_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Relation property ID used for dependency arrows, or null to disable arrows."
    }
  }
}

timelineArrowsByResponse

{
  "type": "object",
  "properties": {
    "property_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Relation property ID used for dependency arrows."
    }
  },
  "additionalProperties": false
}

timelinePreferenceRequest

{
  "type": "object",
  "properties": {
    "zoom_level": {
      "type": "string",
      "enum": [
        "hours",
        "day",
        "week",
        "bi_week",
        "month",
        "quarter",
        "year",
        "5_years"
      ],
      "description": "Zoom level for the timeline."
    },
    "center_timestamp": {
      "type": "integer",
      "description": "Timestamp (ms) to center the timeline view on."
    }
  },
  "required": [
    "zoom_level"
  ]
}

timelinePreferenceResponse

{
  "type": "object",
  "properties": {
    "zoom_level": {
      "type": "string",
      "enum": [
        "hours",
        "day",
        "week",
        "bi_week",
        "month",
        "quarter",
        "year",
        "5_years"
      ],
      "description": "Zoom level for the timeline."
    },
    "center_timestamp": {
      "type": "integer",
      "minimum": 0,
      "description": "Center timestamp for the timeline view (Unix timestamp in ms)."
    }
  },
  "additionalProperties": false,
  "required": [
    "zoom_level"
  ]
}

timelineViewConfigRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "timeline",
      "description": "The view type. Must be \"timeline\"."
    },
    "date_property_id": {
      "type": "string",
      "description": "Property ID of the date property used for the start of timeline items."
    },
    "end_date_property_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Property ID of the date property used for the end of timeline items. Pass null to clear."
    },
    "properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property visibility and display configuration on timeline items. Pass null to clear."
    },
    "show_table": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to show the table panel alongside the timeline. Pass null to clear."
    },
    "table_properties": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/viewPropertyConfigRequest"
          },
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "description": "Property configuration for the table panel (when show_table is true). Pass null to clear."
    },
    "preference": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/timelinePreferenceRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Timeline display preferences (zoom level and center position). Pass null to clear."
    },
    "arrows_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/timelineArrowsByRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Configuration for dependency arrows between timeline items. Pass null to clear."
    },
    "color_by": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whether to color timeline items by a property. Pass null to clear."
    }
  },
  "required": [
    "type",
    "date_property_id"
  ]
}

timelineViewConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "timeline",
      "description": "The view configuration type."
    },
    "date_property_id": {
      "type": "string",
      "description": "Start date property - required."
    },
    "date_property_name": {
      "type": "string",
      "description": "Start date property name (convenience field)."
    },
    "end_date_property_id": {
      "type": "string",
      "description": "End date property (optional, for items that span a range)."
    },
    "end_date_property_name": {
      "type": "string",
      "description": "End date property name (convenience field)."
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display on timeline items."
    },
    "show_table": {
      "type": "boolean",
      "description": "Whether to show the table panel alongside the timeline."
    },
    "table_properties": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/viewPropertyConfigResponse"
      },
      "maxItems": 100,
      "description": "Properties to display in the table panel (when show_table is true)."
    },
    "preference": {
      "$ref": "#/components/schemas/timelinePreferenceResponse",
      "description": "Timeline zoom/preference state."
    },
    "arrows_by": {
      "$ref": "#/components/schemas/timelineArrowsByResponse",
      "description": "Dependency arrows configuration."
    },
    "color_by": {
      "type": "boolean",
      "description": "Whether to color-code items by property."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "date_property_id"
  ]
}

timestampCreatedTimeFilter

{
  "title": "Created Time",
  "type": "object",
  "properties": {
    "created_time": {
      "$ref": "#/components/schemas/datePropertyFilter"
    },
    "timestamp": {
      "type": "string",
      "const": "created_time"
    },
    "type": {
      "type": "string",
      "const": "created_time"
    }
  },
  "additionalProperties": false,
  "required": [
    "created_time",
    "timestamp"
  ]
}

timestampFilter

{
  "anyOf": [
    {
      "$ref": "#/components/schemas/timestampCreatedTimeFilter"
    },
    {
      "$ref": "#/components/schemas/timestampLastEditedTimeFilter"
    }
  ]
}

timestampLastEditedTimeFilter

{
  "title": "Last Edited Time",
  "type": "object",
  "properties": {
    "last_edited_time": {
      "$ref": "#/components/schemas/datePropertyFilter"
    },
    "timestamp": {
      "type": "string",
      "const": "last_edited_time"
    },
    "type": {
      "type": "string",
      "const": "last_edited_time"
    }
  },
  "additionalProperties": false,
  "required": [
    "last_edited_time",
    "timestamp"
  ]
}

timestampSortResponse

{
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "enum": [
        "created_time",
        "last_edited_time"
      ],
      "description": "The timestamp to sort by."
    },
    "direction": {
      "type": "string",
      "enum": [
        "ascending",
        "descending"
      ],
      "description": "Sort direction."
    }
  },
  "additionalProperties": false,
  "required": [
    "timestamp",
    "direction"
  ]
}

titleArrayBasedPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "title",
      "description": "Always `title`"
    },
    "title": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "title"
  ],
  "title": "Title"
}

titleDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "title",
      "description": "Always `title`"
    },
    "title": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "title"
  ],
  "title": "Title"
}

titleObjectResponse

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    }
  },
  "required": [
    "title"
  ]
}

titlePropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "title",
      "description": "Always `title`"
    },
    "title": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "title"
  ],
  "title": "Title"
}

titlePropertyItemObjectResponse

{
  "title": "Title",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "title"
    },
    "title": {
      "$ref": "#/components/schemas/richTextItemResponse"
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "title",
    "object",
    "id"
  ]
}

toDoBlockObjectResponse

{
  "title": "To Do",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "to_do"
    },
    "to_do": {
      "type": "object",
      "properties": {
        "rich_text": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/richTextItemResponse"
          },
          "maxItems": 100
        },
        "color": {
          "$ref": "#/components/schemas/apiColor"
        },
        "checked": {
          "type": "boolean"
        }
      },
      "required": [
        "rich_text",
        "color",
        "checked"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "to_do",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

toggleBlockObjectResponse

{
  "title": "Toggle",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "toggle"
    },
    "toggle": {
      "$ref": "#/components/schemas/contentWithRichTextAndColorResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "toggle",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

transcriptionBlockResponse

{
  "type": "object",
  "properties": {
    "title": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemResponse"
      },
      "maxItems": 100
    },
    "status": {
      "$ref": "#/components/schemas/apiTranscriptionStatus"
    },
    "children": {
      "$ref": "#/components/schemas/transcriptionChildrenResponse"
    },
    "calendar_event": {
      "$ref": "#/components/schemas/transcriptionCalendarEventResponse"
    },
    "recording": {
      "$ref": "#/components/schemas/transcriptionRecordingResponse"
    }
  }
}

transcriptionCalendarEventResponse

{
  "type": "object",
  "properties": {
    "start_time": {
      "type": "string",
      "format": "date-time"
    },
    "end_time": {
      "type": "string",
      "format": "date-time"
    },
    "attendees": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/idRequest"
      },
      "maxItems": 100
    }
  },
  "required": [
    "start_time",
    "end_time"
  ]
}

transcriptionChildrenResponse

{
  "type": "object",
  "properties": {
    "summary_block_id": {
      "$ref": "#/components/schemas/idRequest"
    },
    "notes_block_id": {
      "$ref": "#/components/schemas/idRequest"
    },
    "transcript_block_id": {
      "$ref": "#/components/schemas/idRequest"
    }
  }
}

transcriptionRecordingResponse

{
  "type": "object",
  "properties": {
    "start_time": {
      "type": "string",
      "format": "date-time"
    },
    "end_time": {
      "type": "string",
      "format": "date-time"
    }
  }
}

uniqueIdDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unique_id",
      "description": "Always `unique_id`"
    },
    "unique_id": {
      "type": "object",
      "properties": {
        "prefix": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The prefix for the unique ID."
        }
      },
      "additionalProperties": false,
      "required": [
        "prefix"
      ]
    }
  },
  "required": [
    "type",
    "unique_id"
  ],
  "title": "Unique Id"
}

uniqueIdPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unique_id",
      "description": "Always `unique_id`"
    },
    "unique_id": {
      "type": "object",
      "properties": {
        "prefix": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  },
  "required": [
    "unique_id"
  ],
  "title": "Unique Id"
}

uniqueIdPropertyItemObjectResponse

{
  "title": "Unique Id",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unique_id"
    },
    "unique_id": {
      "type": "object",
      "properties": {
        "prefix": {
          "type": [
            "string",
            "null"
          ]
        },
        "number": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "prefix",
        "number"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "unique_id",
    "object",
    "id"
  ]
}

uniqueIdPropertyValueResponse

{
  "type": "object",
  "properties": {
    "prefix": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "number": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "prefix",
    "number"
  ]
}

uniqueIdSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unique_id",
      "description": "Always `unique_id`"
    },
    "unique_id": {
      "$ref": "#/components/schemas/uniqueIdPropertyValueResponse"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "unique_id"
  ],
  "title": "Unique Id"
}

unsupportedBlockObjectResponse

{
  "title": "Unsupported",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unsupported"
    },
    "unsupported": {
      "type": "object",
      "properties": {
        "block_type": {
          "description": "The underlying block type that is not currently supported by the Public API. Example values include: form, button, drive.",
          "type": "string"
        }
      },
      "required": [
        "block_type"
      ]
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "unsupported",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

unsupportedFormulaPropertyResponse

{
  "title": "Unsupported",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unsupported"
    },
    "unsupported": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "unsupported"
  ]
}

unsupportedFormulaPropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unsupported",
      "description": "Always `unsupported`"
    },
    "unsupported": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "unsupported"
  ],
  "title": "Unsupported"
}

unsupportedPartialRollupValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "unsupported",
      "description": "Always `unsupported`"
    },
    "unsupported": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "unsupported"
  ],
  "title": "Unsupported"
}

updateEmbedFileUploadRequest

{
  "type": "object",
  "properties": {
    "file_upload": {
      "$ref": "#/components/schemas/fileUploadIdRequest"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false,
  "required": [
    "file_upload"
  ]
}

updateMediaContentWithFileAndCaptionRequest

{
  "type": "object",
  "properties": {
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "external": {
      "$ref": "#/components/schemas/externalFileRequest"
    },
    "file_upload": {
      "$ref": "#/components/schemas/fileUploadIdRequest"
    }
  },
  "additionalProperties": false
}

updateMediaContentWithFileNameAndCaptionRequest

{
  "type": "object",
  "properties": {
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    },
    "external": {
      "$ref": "#/components/schemas/externalFileRequest"
    },
    "file_upload": {
      "$ref": "#/components/schemas/fileUploadIdRequest"
    },
    "name": {
      "$ref": "#/components/schemas/stringRequest"
    }
  },
  "additionalProperties": false
}

updateMediaContentWithUrlAndCaptionRequest

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "caption": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/richTextItemRequest"
      },
      "maxItems": 100
    }
  },
  "additionalProperties": false
}

updateViewRequest

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "New name for the view."
    },
    "filter": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/viewFilterRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Filter to apply to the view. Uses the same format as the data source query filter. Pass null to clear the filter."
    },
    "sorts": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/viewPropertySortsRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Property sorts to apply to the view. Only property-based sorts are supported. Pass null to clear the sorts."
    },
    "quick_filters": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/quickFilterConditionRequest"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        {
          "type": "null"
        }
      ],
      "description": "Quick filters for the view's filter bar. Keys are property names or IDs. Set a key to a filter condition to add/update that quick filter. Set a key to null to remove it. Pass null for the entire field to clear all quick filters. Unmentioned quick filters are preserved."
    },
    "configuration": {
      "$ref": "#/components/schemas/viewConfigRequest",
      "description": "View presentation configuration. The type field must match the view type. Individual nullable fields within the configuration can be set to null to clear them."
    }
  }
}

urlDatabasePropertyConfigResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "url",
      "description": "Always `url`"
    },
    "url": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "type",
    "url"
  ],
  "title": "Url"
}

urlPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "url",
      "description": "Always `url`"
    },
    "url": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "url"
  ],
  "title": "Url"
}

urlPropertyItemObjectResponse

{
  "title": "Url",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "url"
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "url",
    "object",
    "id"
  ]
}

urlSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "url",
      "description": "Always `url`"
    },
    "url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "url"
  ],
  "title": "Url"
}

userObjectResponse

{
  "allOf": [
    {
      "$ref": "#/components/schemas/userObjectResponseCommon"
    },
    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/personUserObjectResponse"
        },
        {
          "$ref": "#/components/schemas/botUserObjectResponse"
        }
      ]
    }
  ]
}

userObjectResponseCommon

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the user."
    },
    "object": {
      "type": "string",
      "const": "user",
      "description": "The user object type name."
    },
    "name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The name of the user."
    },
    "avatar_url": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The avatar URL of the user."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "object",
    "name",
    "avatar_url"
  ]
}

userValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    {
      "$ref": "#/components/schemas/userObjectResponse"
    }
  ]
}

verificationPropertyConfigurationRequest

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "verification",
      "description": "Always `verification`"
    },
    "verification": {
      "$ref": "#/components/schemas/emptyObject"
    }
  },
  "required": [
    "verification"
  ],
  "title": "Verification"
}

verificationPropertyDoesNotEqualFilter

{
  "type": "object",
  "properties": {
    "does_not_equal": {
      "type": "string",
      "enum": [
        "verified",
        "expired",
        "none"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "does_not_equal"
  ]
}

verificationPropertyItemObjectResponse

{
  "title": "Verification",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "verification"
    },
    "verification": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/verificationPropertyValueResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "object": {
      "type": "string",
      "const": "property_item"
    },
    "id": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "verification",
    "object",
    "id"
  ]
}

verificationPropertyResponse

{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "verified",
        "expired"
      ],
      "description": "One of: `verified`, `expired`"
    },
    "date": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/dateResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_by": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/userValueResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "state",
    "date",
    "verified_by"
  ],
  "title": "Verified"
}

verificationPropertyStatusFilter

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "verified",
        "expired",
        "none"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "status"
  ]
}

verificationPropertyUnverifiedResponse

{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "const": "unverified",
      "description": "Always `unverified`"
    },
    "date": {
      "type": "null"
    },
    "verified_by": {
      "type": "null"
    }
  },
  "additionalProperties": false,
  "required": [
    "state",
    "date",
    "verified_by"
  ],
  "title": "Unverified"
}

verificationPropertyValueResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/verificationPropertyUnverifiedResponse"
    },
    {
      "$ref": "#/components/schemas/verificationPropertyResponse"
    }
  ]
}

verificationSimplePropertyValueResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "verification",
      "description": "Always `verification`"
    },
    "verification": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/verificationPropertyValueResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "verification"
  ],
  "title": "Verification"
}

videoBlockObjectResponse

{
  "title": "Video",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "video"
    },
    "video": {
      "$ref": "#/components/schemas/mediaContentWithFileAndCaptionResponse"
    },
    "parent": {
      "$ref": "#/components/schemas/parentForBlockBasedObjectResponse"
    },
    "object": {
      "type": "string",
      "const": "block"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_time": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "last_edited_time": {
      "type": "string",
      "format": "date-time"
    },
    "last_edited_by": {
      "$ref": "#/components/schemas/partialUserObjectResponse"
    },
    "has_children": {
      "type": "boolean"
    },
    "in_trash": {
      "type": "boolean"
    }
  },
  "required": [
    "type",
    "video",
    "parent",
    "object",
    "id",
    "created_time",
    "created_by",
    "last_edited_time",
    "last_edited_by",
    "has_children",
    "in_trash"
  ]
}

viewConfigRequest

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/tableViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/boardViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/calendarViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/timelineViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/galleryViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/listViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/mapViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/formViewConfigRequest"
    },
    {
      "$ref": "#/components/schemas/chartViewConfigRequest"
    }
  ],
  "description": "View configuration, discriminated by the type field."
}

viewConfigResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/tableViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/boardViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/calendarViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/timelineViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/galleryViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/listViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/mapViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/formViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/chartViewConfigResponse"
    },
    {
      "$ref": "#/components/schemas/dashboardViewConfigResponse"
    }
  ],
  "description": "View configuration, typed by view type (table, board, calendar, etc.)."
}

viewCreatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "view.created",
          "description": "Always `view.created`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookViewEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the created view."
            },
            "view_type": {
              "type": "string",
              "description": "The type of the created view (e.g. `table`, `board`, `list`, `calendar`, `gallery`, `timeline`)."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "view_type"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

viewDeletedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "view.deleted",
          "description": "Always `view.deleted`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookViewEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the entity that triggered the event."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

viewFilterRequest

{
  "type": "object",
  "description": "Filter for the view. Uses the same format as the data source query filter (property filters, timestamp filters, or compound and/or filters). Simple property filters appear in the view's filter bar in the Notion UI. Select, status, and multi_select filter operators accept a single string or an array of strings to filter by multiple values (e.g. { \"does_not_equal\": [\"Done\", \"Archive\"] })."
}

viewFilterResponse

{
  "oneOf": [
    {
      "type": "object",
      "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
      "required": [
        "property"
      ],
      "properties": {
        "property": {
          "type": "string",
          "description": "The name or ID of the property to filter on."
        }
      },
      "additionalProperties": true
    },
    {
      "type": "object",
      "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
      "required": [
        "timestamp"
      ],
      "properties": {
        "timestamp": {
          "type": "string",
          "enum": [
            "created_time",
            "last_edited_time"
          ],
          "description": "The timestamp to filter on."
        }
      },
      "additionalProperties": true
    },
    {
      "type": "object",
      "description": "A compound filter that combines multiple filters with AND or OR logic. Supports up to 2 levels of nesting.",
      "properties": {
        "or": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                "required": [
                  "property"
                ],
                "properties": {
                  "property": {
                    "type": "string",
                    "description": "The name or ID of the property to filter on."
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "object",
                "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                "required": [
                  "timestamp"
                ],
                "properties": {
                  "timestamp": {
                    "type": "string",
                    "enum": [
                      "created_time",
                      "last_edited_time"
                    ],
                    "description": "The timestamp to filter on."
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "object",
                "description": "A compound filter at the deepest nesting level. Can only contain property or timestamp filters (no further nesting).",
                "properties": {
                  "or": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                          "required": [
                            "property"
                          ],
                          "properties": {
                            "property": {
                              "type": "string",
                              "description": "The name or ID of the property to filter on."
                            }
                          },
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                          "required": [
                            "timestamp"
                          ],
                          "properties": {
                            "timestamp": {
                              "type": "string",
                              "enum": [
                                "created_time",
                                "last_edited_time"
                              ],
                              "description": "The timestamp to filter on."
                            }
                          },
                          "additionalProperties": true
                        }
                      ],
                      "description": "A property filter or timestamp filter."
                    },
                    "description": "Filters combined with OR logic."
                  },
                  "and": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                          "required": [
                            "property"
                          ],
                          "properties": {
                            "property": {
                              "type": "string",
                              "description": "The name or ID of the property to filter on."
                            }
                          },
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                          "required": [
                            "timestamp"
                          ],
                          "properties": {
                            "timestamp": {
                              "type": "string",
                              "enum": [
                                "created_time",
                                "last_edited_time"
                              ],
                              "description": "The timestamp to filter on."
                            }
                          },
                          "additionalProperties": true
                        }
                      ],
                      "description": "A property filter or timestamp filter."
                    },
                    "description": "Filters combined with AND logic."
                  }
                }
              }
            ],
            "description": "A filter that can be a property filter, timestamp filter, or nested compound filter."
          },
          "description": "Filters combined with OR logic."
        },
        "and": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                "required": [
                  "property"
                ],
                "properties": {
                  "property": {
                    "type": "string",
                    "description": "The name or ID of the property to filter on."
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "object",
                "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                "required": [
                  "timestamp"
                ],
                "properties": {
                  "timestamp": {
                    "type": "string",
                    "enum": [
                      "created_time",
                      "last_edited_time"
                    ],
                    "description": "The timestamp to filter on."
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "object",
                "description": "A compound filter at the deepest nesting level. Can only contain property or timestamp filters (no further nesting).",
                "properties": {
                  "or": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                          "required": [
                            "property"
                          ],
                          "properties": {
                            "property": {
                              "type": "string",
                              "description": "The name or ID of the property to filter on."
                            }
                          },
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                          "required": [
                            "timestamp"
                          ],
                          "properties": {
                            "timestamp": {
                              "type": "string",
                              "enum": [
                                "created_time",
                                "last_edited_time"
                              ],
                              "description": "The timestamp to filter on."
                            }
                          },
                          "additionalProperties": true
                        }
                      ],
                      "description": "A property filter or timestamp filter."
                    },
                    "description": "Filters combined with OR logic."
                  },
                  "and": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "description": "A filter condition on a specific property. The property field specifies which property to filter, and an additional field specifies the filter type and condition (e.g., title, rich_text, number, checkbox, select, multi_select, date, people, files, relation, formula, rollup, etc.).",
                          "required": [
                            "property"
                          ],
                          "properties": {
                            "property": {
                              "type": "string",
                              "description": "The name or ID of the property to filter on."
                            }
                          },
                          "additionalProperties": true
                        },
                        {
                          "type": "object",
                          "description": "A filter condition on a timestamp (created_time or last_edited_time). The timestamp field specifies which timestamp, and a matching field contains the date filter condition.",
                          "required": [
                            "timestamp"
                          ],
                          "properties": {
                            "timestamp": {
                              "type": "string",
                              "enum": [
                                "created_time",
                                "last_edited_time"
                              ],
                              "description": "The timestamp to filter on."
                            }
                          },
                          "additionalProperties": true
                        }
                      ],
                      "description": "A property filter or timestamp filter."
                    },
                    "description": "Filters combined with AND logic."
                  }
                }
              }
            ],
            "description": "A filter that can be a property filter, timestamp filter, or nested compound filter."
          },
          "description": "Filters combined with AND logic."
        }
      }
    }
  ],
  "description": "Filter for the view. Can be a property filter (filter by property value), timestamp filter (filter by created_time or last_edited_time), or compound filter (combine filters with and/or logic). Compound filters support up to 2 levels of nesting."
}

viewPositionRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "start",
          "description": "Position type. \"start\" places the view as the first tab."
        }
      },
      "required": [
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "end",
          "description": "Position type. \"end\" places the view as the last tab."
        }
      },
      "required": [
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "after_view",
          "description": "Position type. \"after_view\" places the new view immediately after the specified view."
        },
        "view_id": {
          "$ref": "#/components/schemas/idRequest",
          "description": "The ID of an existing view in the database. The new view will be placed after this view."
        }
      },
      "required": [
        "type",
        "view_id"
      ]
    }
  ],
  "description": "Position of the new view in the database's view tab bar."
}

viewPropertyConfigRequest

{
  "type": "object",
  "properties": {
    "property_id": {
      "type": "string",
      "description": "Property ID (stable identifier)."
    },
    "visible": {
      "type": "boolean",
      "description": "Whether this property is visible in the view."
    },
    "width": {
      "type": "integer",
      "minimum": 1,
      "description": "Width of the property column in pixels (table view only)."
    },
    "wrap": {
      "type": "boolean",
      "description": "Whether to wrap content in this property cell/card."
    },
    "status_show_as": {
      "type": "string",
      "enum": [
        "select",
        "checkbox"
      ],
      "description": "How to display status properties (select dropdown or checkbox)."
    },
    "card_property_width_mode": {
      "type": "string",
      "enum": [
        "full_line",
        "inline"
      ],
      "description": "Property width mode in compact card layouts (board/gallery)."
    },
    "date_format": {
      "type": "string",
      "enum": [
        "full",
        "short",
        "month_day_year",
        "day_month_year",
        "year_month_day",
        "relative"
      ],
      "description": "Date display format (date properties only)."
    },
    "time_format": {
      "type": "string",
      "enum": [
        "12_hour",
        "24_hour",
        "hidden"
      ],
      "description": "Time display format (date properties only)."
    }
  },
  "required": [
    "property_id"
  ]
}

viewPropertyConfigResponse

{
  "type": "object",
  "properties": {
    "property_id": {
      "type": "string",
      "description": "Property ID (stable identifier)."
    },
    "property_name": {
      "type": "string",
      "description": "Property name (convenience field, not stable across renames)."
    },
    "visible": {
      "type": "boolean",
      "description": "Whether this property is visible in the view."
    },
    "width": {
      "type": "integer",
      "minimum": 0,
      "description": "Width of the property column in pixels (table view only)."
    },
    "wrap": {
      "type": "boolean",
      "description": "Whether to wrap content in this property cell/card."
    },
    "status_show_as": {
      "type": "string",
      "enum": [
        "select",
        "checkbox"
      ],
      "description": "How to display status properties (as select dropdown or checkbox)."
    },
    "card_property_width_mode": {
      "type": "string",
      "enum": [
        "full_line",
        "inline"
      ],
      "description": "Property width mode in compact card layouts (board/gallery)."
    },
    "date_format": {
      "type": "string",
      "enum": [
        "full",
        "short",
        "month_day_year",
        "day_month_year",
        "year_month_day",
        "relative"
      ],
      "description": "Date display format (date properties only). \"full\" = localized full date, \"short\" = month and day, \"month_day_year\" = MM/DD/YYYY, \"day_month_year\" = DD/MM/YYYY, \"year_month_day\" = YYYY/MM/DD, \"relative\" = relative dates."
    },
    "time_format": {
      "type": "string",
      "enum": [
        "12_hour",
        "24_hour",
        "hidden"
      ],
      "description": "Time display format (date properties only). \"12_hour\" = 12-hour clock with AM/PM, \"24_hour\" = 24-hour clock, \"hidden\" = hide time."
    }
  },
  "additionalProperties": false,
  "required": [
    "property_id"
  ]
}

viewPropertySortRequest

{
  "type": "object",
  "properties": {
    "property": {
      "type": "string",
      "description": "Property name or ID to sort by."
    },
    "direction": {
      "$ref": "#/components/schemas/sortDirectionRequest",
      "description": "Sort direction."
    }
  },
  "required": [
    "property",
    "direction"
  ]
}

viewPropertySortsRequest

{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/viewPropertySortRequest"
  },
  "maxItems": 100
}

viewQueryResponse

{
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "view_query",
      "description": "The object type."
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The query ID."
    },
    "view_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The view this query was executed against."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the cached query results expire."
    },
    "total_count": {
      "type": "number",
      "description": "Total number of results in the query."
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pageReferenceResponse"
      },
      "maxItems": 100,
      "description": "The page results for this page."
    },
    "next_cursor": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/idResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Cursor for the next page of results."
    },
    "has_more": {
      "type": "boolean",
      "description": "Whether there are more results."
    },
    "request_status": {
      "$ref": "#/components/schemas/requestStatusResponse",
      "description": "Set to `{ type: 'incomplete', incomplete_reason: 'query_result_limit_reached' }` when the view's underlying data source has more rows matching this query than the server-side pagination depth limit allows."
    }
  },
  "additionalProperties": false,
  "required": [
    "object",
    "id",
    "view_id",
    "expires_at",
    "total_count",
    "results",
    "next_cursor",
    "has_more"
  ]
}

viewSortRequest

{
  "type": "object",
  "description": "Sort for the view. Can be a property sort (with property and direction) or timestamp sort (with timestamp and direction)."
}

viewSortResponse

{
  "oneOf": [
    {
      "$ref": "#/components/schemas/propertySortResponse"
    },
    {
      "$ref": "#/components/schemas/timestampSortResponse"
    }
  ],
  "description": "Sort for the view. Can sort by property or timestamp."
}

viewSortsRequest

{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/viewSortRequest"
  },
  "maxItems": 100
}

viewTypeRequest

{
  "type": "string",
  "enum": [
    "table",
    "board",
    "list",
    "calendar",
    "timeline",
    "gallery",
    "form",
    "chart",
    "map",
    "dashboard"
  ],
  "description": "One of: `table`, `board`, `list`, `calendar`, `timeline`, `gallery`, `form`, `chart`, `map`, `dashboard`"
}

viewUpdatedWebhookPayload

{
  "allOf": [
    {
      "$ref": "#/components/schemas/baseWebhookPayload"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "view.updated",
          "description": "Always `view.updated`"
        },
        "entity": {
          "$ref": "#/components/schemas/webhookViewEntity",
          "description": "The object that triggered the event."
        },
        "data": {
          "type": "object",
          "properties": {
            "parent": {
              "$ref": "#/components/schemas/webhookParentBlock",
              "description": "The parent of the updated view."
            },
            "updated_fields": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "name",
                  "filter",
                  "sorts",
                  "configuration"
                ],
                "description": "One of: `name`, `filter`, `sorts`, `configuration`"
              },
              "maxItems": 100,
              "description": "The fields of the view that were updated."
            }
          },
          "additionalProperties": false,
          "required": [
            "parent",
            "updated_fields"
          ],
          "description": "Additional event-specific data."
        }
      },
      "required": [
        "type",
        "entity",
        "data"
      ]
    }
  ]
}

webhookCommentEntity

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "comment",
      "description": "Always `comment`"
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the comment that triggered the event."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "id"
  ]
}

webhookDatabaseEventEntity

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the database or data source that triggered the event."
    },
    "type": {
      "type": "string",
      "enum": [
        "block",
        "database",
        "data_source"
      ],
      "description": "The type of entity. For linked databases, this is `block`."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ]
}

webhookExternalBlock

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent."
    },
    "type": {
      "type": "string",
      "enum": [
        "page",
        "database",
        "block"
      ],
      "description": "The type of the parent."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ]
}

webhookFileUploadEntity

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "file_upload",
      "description": "Always `file_upload`"
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the file upload that triggered the event."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "id"
  ]
}

webhookPageEntity

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "page",
      "description": "Always `page`"
    },
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the page that triggered the event."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "id"
  ]
}

webhookParentBlock

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the parent."
    },
    "type": {
      "type": "string",
      "enum": [
        "space",
        "block",
        "page",
        "database",
        "team",
        "agent"
      ],
      "description": "The type of the parent."
    },
    "data_source_id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The data source ID of the parent, if applicable."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ]
}

webhookUpdatedBlock

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the updated block."
    },
    "type": {
      "type": "string",
      "enum": [
        "page",
        "database",
        "block"
      ],
      "description": "The type of the updated block."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ]
}

webhookViewEntity

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/idResponse",
      "description": "The ID of the view that triggered the event."
    },
    "type": {
      "type": "string",
      "const": "view",
      "description": "Always `view`"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ]
}

widgetPlacementRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "new_row",
          "description": "Placement type. \"new_row\" creates a new row containing the widget."
        },
        "row_index": {
          "type": "integer",
          "minimum": 0,
          "description": "The 0-based row position to insert the new row at. If omitted, the new row is appended at the end."
        }
      },
      "required": [
        "type"
      ]
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "existing_row",
          "description": "Placement type. \"existing_row\" adds the widget to an existing row (side-by-side with other widgets)."
        },
        "row_index": {
          "type": "integer",
          "minimum": 0,
          "description": "The 0-based index of the existing row to add the widget to."
        }
      },
      "required": [
        "type",
        "row_index"
      ]
    }
  ],
  "description": "Where to place the new widget in the dashboard. \"new_row\" creates a new row, \"existing_row\" adds to an existing row side-by-side with other widgets."
}

workspaceParentForBlockBasedObjectResponse

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "workspace",
      "description": "The parent type."
    },
    "workspace": {
      "type": "boolean",
      "const": true,
      "description": "Always true for workspace parent."
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "workspace"
  ]
}

parameters

notionVersion

{
  "name": "Notion-Version",
  "in": "header",
  "required": true,
  "schema": {
    "enum": [
      "2026-03-11"
    ]
  },
  "description": "The [API version](/reference/versioning) to use for this request. The latest version is `2026-03-11`."
}

Document metadata and extensions

{
  "openapi": "3.1.0",
  "info": {
    "title": "Notion API",
    "version": "1.0.0",
    "termsOfService": "https://notion.notion.site/Terms-and-Privacy-28ffdd083dc3473e9c2da6ec011b58ac",
    "x-purplesuite-contract": {
      "system": "pages",
      "paint": "notion",
      "profileId": "notion-v1-2026-03-11",
      "revision": "2026-03-11",
      "documentScope": "full",
      "publishedOperations": 58,
      "vendorOperations": 61,
      "webhookDeliveries": 31,
      "note": "A PurpleSuite emulation of the Notion API. This document publishes the 58 operations that authenticate with `bearerAuth`; the other transport is a sibling profile, and together they publish every operation the vendor exposes at Notion-Version 2026-03-11. Two operations are narrowed to their executable request subset (create-file, update-session) and one fails closed (create-meeting-note). The 31 webhooks are outbound deliveries with no receiver. COVERAGE_LEDGER.md classifies all 92 items.",
      "boundaries": [
        "create-meeting-note: unavailable — every branch requires transcribing audio or video.",
        "create-file mode=external_url: rejected — requires an outbound fetch of a caller-supplied URL.",
        "update-session message/continue_from: rejected — require Notion-hosted model inference."
      ]
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Databases",
      "description": "Database endpoints"
    },
    {
      "name": "Data sources",
      "description": "Data source endpoints"
    },
    {
      "name": "Pages",
      "description": "Page endpoints"
    },
    {
      "name": "Async tasks",
      "description": "Async task endpoints"
    },
    {
      "name": "Blocks",
      "description": "Block endpoints"
    },
    {
      "name": "Comments",
      "description": "Comment endpoints"
    },
    {
      "name": "File uploads",
      "description": "File upload endpoints"
    },
    {
      "name": "OAuth",
      "description": "OAuth endpoints (basic authentication)"
    },
    {
      "name": "Users",
      "description": "User endpoints"
    },
    {
      "name": "Search",
      "description": "Search endpoints"
    },
    {
      "name": "Views",
      "description": "View endpoints"
    },
    {
      "name": "Agents",
      "description": "Agent endpoints"
    },
    {
      "name": "Sessions",
      "description": "Session endpoints"
    },
    {
      "name": "Custom emojis",
      "description": "Custom emoji endpoints"
    },
    {
      "name": "Meeting notes",
      "description": "Meeting notes endpoints"
    }
  ],
  "webhooks": {
    "commentCreated": {
      "post": {
        "summary": "Comment created",
        "description": "Webhook event for comment created in a workspace",
        "operationId": "webhook-comment-created",
        "tags": [
          "Comment webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/commentCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "commentDeleted": {
      "post": {
        "summary": "Comment deleted",
        "description": "Webhook event for comment deleted in a workspace",
        "operationId": "webhook-comment-deleted",
        "tags": [
          "Comment webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/commentDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "commentUpdated": {
      "post": {
        "summary": "Comment updated",
        "description": "Webhook event for comment updated in a workspace",
        "operationId": "webhook-comment-updated",
        "tags": [
          "Comment webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/commentUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceContentUpdated": {
      "post": {
        "summary": "Data source content updated",
        "description": "Webhook event for data source content updated in a workspace",
        "operationId": "webhook-data-source-content-updated",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceContentUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceCreated": {
      "post": {
        "summary": "Data source created",
        "description": "Webhook event for data source created in a workspace",
        "operationId": "webhook-data-source-created",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceDeleted": {
      "post": {
        "summary": "Data source deleted",
        "description": "Webhook event for data source deleted in a workspace",
        "operationId": "webhook-data-source-deleted",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceMoved": {
      "post": {
        "summary": "Data source moved",
        "description": "Webhook event for data source moved in a workspace",
        "operationId": "webhook-data-source-moved",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceMovedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceSchemaUpdated": {
      "post": {
        "summary": "Data source schema updated",
        "description": "Webhook event for data source schema updated in a workspace",
        "operationId": "webhook-data-source-schema-updated",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceSchemaUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "dataSourceUndeleted": {
      "post": {
        "summary": "Data source undeleted",
        "description": "Webhook event for data source undeleted in a workspace",
        "operationId": "webhook-data-source-undeleted",
        "tags": [
          "Data source webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dataSourceUndeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseContentUpdated": {
      "post": {
        "summary": "Database content updated",
        "description": "Webhook event for database content updated in a workspace",
        "operationId": "webhook-database-content-updated",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseContentUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseCreated": {
      "post": {
        "summary": "Database created",
        "description": "Webhook event for database created in a workspace",
        "operationId": "webhook-database-created",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseDeleted": {
      "post": {
        "summary": "Database deleted",
        "description": "Webhook event for database deleted in a workspace",
        "operationId": "webhook-database-deleted",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseMoved": {
      "post": {
        "summary": "Database moved",
        "description": "Webhook event for database moved in a workspace",
        "operationId": "webhook-database-moved",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseMovedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseSchemaUpdated": {
      "post": {
        "summary": "Database schema updated",
        "description": "Webhook event for database schema updated in a workspace",
        "operationId": "webhook-database-schema-updated",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseSchemaUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "databaseUndeleted": {
      "post": {
        "summary": "Database undeleted",
        "description": "Webhook event for database undeleted in a workspace",
        "operationId": "webhook-database-undeleted",
        "tags": [
          "Database webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/databaseUndeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "fileUploadCompleted": {
      "post": {
        "summary": "File upload completed",
        "description": "Webhook event for file upload completed in a workspace",
        "operationId": "webhook-file-upload-completed",
        "tags": [
          "File upload webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fileUploadCompletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "fileUploadCreated": {
      "post": {
        "summary": "File upload created",
        "description": "Webhook event for file upload created in a workspace",
        "operationId": "webhook-file-upload-created",
        "tags": [
          "File upload webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fileUploadCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "fileUploadExpired": {
      "post": {
        "summary": "File upload expired",
        "description": "Webhook event for file upload expired in a workspace",
        "operationId": "webhook-file-upload-expired",
        "tags": [
          "File upload webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fileUploadExpiredWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "fileUploadUploadFailed": {
      "post": {
        "summary": "File upload failed",
        "description": "Webhook event for file upload upload failed in a workspace",
        "operationId": "webhook-file-upload-upload-failed",
        "tags": [
          "File upload webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fileUploadUploadFailedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageContentUpdated": {
      "post": {
        "summary": "Page content updated",
        "description": "Webhook event for page content updated in a workspace",
        "operationId": "webhook-page-content-updated",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageContentUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageCreated": {
      "post": {
        "summary": "Page created",
        "description": "Webhook event for page created in a workspace",
        "operationId": "webhook-page-created",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageDeleted": {
      "post": {
        "summary": "Page deleted",
        "description": "Webhook event for page deleted in a workspace",
        "operationId": "webhook-page-deleted",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageLocked": {
      "post": {
        "summary": "Page locked",
        "description": "Webhook event for page locked in a workspace",
        "operationId": "webhook-page-locked",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageLockedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageMoved": {
      "post": {
        "summary": "Page moved",
        "description": "Webhook event for page moved in a workspace",
        "operationId": "webhook-page-moved",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageMovedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pagePropertiesUpdated": {
      "post": {
        "summary": "Page properties updated",
        "description": "Webhook event for page properties updated in a workspace",
        "operationId": "webhook-page-properties-updated",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pagePropertiesUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageTranscriptionBlockTranscriptDeleted": {
      "post": {
        "summary": "Page transcript deleted",
        "description": "Webhook event for transcript deletion in a page's transcription block",
        "operationId": "webhook-page-transcription-block-transcript-deleted",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageTranscriptionBlockTranscriptDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageUndeleted": {
      "post": {
        "summary": "Page undeleted",
        "description": "Webhook event for page undeleted in a workspace",
        "operationId": "webhook-page-undeleted",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageUndeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "pageUnlocked": {
      "post": {
        "summary": "Page unlocked",
        "description": "Webhook event for page unlocked in a workspace",
        "operationId": "webhook-page-unlocked",
        "tags": [
          "Page webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pageUnlockedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "viewCreated": {
      "post": {
        "summary": "View created",
        "description": "Webhook event for a database view created in a workspace",
        "operationId": "webhook-view-created",
        "tags": [
          "View webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/viewCreatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "viewDeleted": {
      "post": {
        "summary": "View deleted",
        "description": "Webhook event for a database view deleted in a workspace",
        "operationId": "webhook-view-deleted",
        "tags": [
          "View webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/viewDeletedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    },
    "viewUpdated": {
      "post": {
        "summary": "View updated",
        "description": "Webhook event for a database view updated in a workspace",
        "operationId": "webhook-view-updated",
        "tags": [
          "View webhooks"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/viewUpdatedWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return an HTTP 200 status code to indicate that the data was received successfully."
          }
        }
      }
    }
  }
}
Interactive API explorer (requires JavaScript)