{
  "$id": "https://intentschema.org/profiles/com.notion/productivity.notes.note.create.v1.json",
  "id": "org.intentschema.productivity.notes.note.create.v1@com.notion.v1",
  "pins": "https://intentschema.org/intents/productivity/notes/note/create/v1.json",
  "title": "Notion note create profile",
  "description": "Profile for creating a Notion page (the canonical Notion `note`). Pins target.system to `notion` and declares Notion-specific fields: parent (page or database), icon, cover, and database properties.",
  "constraints": {
    "properties": {
      "target": {
        "properties": {
          "system": {
            "const": "notion"
          }
        },
        "required": [
          "system"
        ]
      },
      "notion": {
        "type": "object",
        "properties": {
          "parent": {
            "type": "object",
            "description": "Parent reference: a page or a database.",
            "oneOf": [
              {
                "required": [
                  "page_id"
                ],
                "properties": {
                  "page_id": {
                    "type": "string"
                  }
                }
              },
              {
                "required": [
                  "database_id"
                ],
                "properties": {
                  "database_id": {
                    "type": "string"
                  }
                }
              },
              {
                "required": [
                  "workspace"
                ],
                "properties": {
                  "workspace": {
                    "const": true
                  }
                }
              }
            ]
          },
          "icon": {
            "type": "object",
            "description": "Notion icon object (emoji, file, or external)."
          },
          "cover": {
            "type": "object",
            "description": "Notion cover object."
          },
          "properties": {
            "type": "object",
            "description": "Database properties when the parent is a database."
          },
          "blocks": {
            "type": "array",
            "description": "Optional initial child blocks (Notion block objects), when finer-grained than `object.body`."
          }
        }
      }
    }
  },
  "api": {
    "method": "POST",
    "path": "/v1/pages",
    "scopes": [],
    "docs": "https://developers.notion.com/reference/post-page",
    "params": {
      "object.title": "properties.title[].text.content (or parent-derived)",
      "object.body": "children[] (block objects; or parsed from Markdown)",
      "object.tags": "properties.<tag-property>.multi_select[].name",
      "object.folder": "(not directly supported; use parent.page_id or parent.database_id)",
      "notion.parent.page_id": "parent.page_id",
      "notion.parent.database_id": "parent.database_id",
      "notion.icon": "icon",
      "notion.cover": "cover",
      "notion.properties": "properties (database row properties)",
      "notion.blocks": "children[] (Notion block objects)"
    },
    "base_url": "https://api.notion.com"
  }
}
