Skip to content

Quickly add task to Notion #237

Closed Answered by dzg
dzg asked this question in Q&A
Aug 20, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

For anyone who wants to Quickly add a to-do item to a Notion page, here is the API call:

curl -X PATCH "https://api.notion.com/v1/blocks/$PAGE_ID/children" \
-H 'Authorization: Bearer '"$NOTION_API_KEY"'' \
-H "Content-Type: application/json" \
-H "Notion-Version: 2021-08-16" \
--data '{
   "children": [
      {
         "object": "block",
         "type": "to_do",
         "to_do": {
            "text": [
               {
                  "type": "text",
                  "text": {
                     "content": "$TEXT"
                  }
               }
            ]
         }
      }
   ]
}'

And this is the export from HTTP-Shortcuts

{
  "categories": [
    {
      "id": "d269f4e6…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dzg
Comment options

Comment options

You must be logged in to vote
1 reply
@Waboodoo
Comment options

Answer selected by Waboodoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants