Create Notion database

POST https://api.notion.com/v1/databases

Create a Notion database to store recommendations.

Feel free to add columns by modifying the body of the request.

Find more about it on Notion API Reference

Request Body

{"parent"=>{"type"=>"page_id", "page_id"=>"{{NOTION_PARENT_PAGE_ID}}"}, "title"=>[{"type"=>"text", "text"=>{"content"=>"Book Recommendations", "link"=>nil}}], "properties"=>{"Genre"=>{"select"=>{"options"=>[{"name"=>"Fantasy", "color"=>"green"}, {"name"=>"Science Fiction", "color"=>"red"}, {"name"=>"Action & Adventure", "color"=>"yellow"}, {"name"=>"Thriller & Suspense"}, {"name"=>"Romance"}]}}}}

HEADERS

KeyDatatypeRequiredDescription
Notion-Versionstring