I am trying to create a new row inside of a Notion Database, by using the Notion API. This works perfectly fine with the title and the differed properties (Date and Select). However I couldn’t figure out how to set the relation property.
Here the request I used:
{
"parent": { "database_id": "7042416ba4854e4fb88a9807cb7a43a6" },
"properties": {
"Name": {
"title": [
{
"text": {
"content": "Titel"
}
}
]
},
"Fällig": {
"date": {
"start": "Datum"
}
},
"Art": {
"select": {
"name": "Art"
}
},
"Kurs": {
"type": "relation",
"relation": [{
"database_id": "293f5f5526844766aed973e2c13b421a",
"synced_property_name": "Kurs",
}]
}
}
}
And here the error:
{"id":"293f5f55-2684-4766-aed9-73e2c13b421a","created_time":"2023-09-16T12:47:00.000Z","description":[],"request_id":"c288b635-4cb0-4ad5-b7f4-f5cbf42ffecc","is_inline":false,"last_edited_by":{"id":"cd42b981-1ccd-4593-89a0-390d692544b6","object":"user"},"parent":{"type":"page_id","page_id":"c6ae7347-d6fd-4e8f-979e-5602bf9463a2"},"created_by":{"id":"cd42b981-1ccd-4593-89a0-390d692544b6","object":"user"},"url":"https://www.notion.so/293f5f5526844766aed973e2c13b421a","public_url":null,"title":[{"annotations":{"code":false,"bold":false,"underline":false,"italic":false,"strikethrough":false,"color":"default"},"plain_text":"Kurse","type":"text","href":null,"text":{"content":"Kurse","link":null}}],"last_edited_time":"2024-09-03T14:46:00.000Z","object":"database","icon":{"type":"external","external":{"url":"https://www.notion.so/icons/categories_gray.svg"}},"cover":null,"properties":{"Name":{"id":"title","title":{},"name":"Name","type":"title"}},"archived":false,"in_trash":false}
Thank you in advance!