Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

281
Vistas
Creating a child database in a new page in Notion API

I'm able to create a new page using the Notion API, and as part of that page I want to create & include a database table. I'm able to create the page successfully, but when trying to create the database using the child_database block, I am getting a status 400 error. Sample code below. Any help appreciated.

let payload = {
    'parent': {'database_id': database_id_variable},
    'properties': {
        'Name': {
            'title': [
                {'text': {'content': 'My Grocery List Page'}}
            ]
        }
    },
    'children': [
        {
            'object': 'block',
            'type': 'child_database',
            'child_database': {
                'title': 'Grocery List',
                    'properties': {
                        'Grocery item': {
                            'type': 'title',
                            'title': [{ 'type': 'text', 'text': { 'content': 'Tomatoes' } }]
                        },
                    }
            }
        },
    ]
}

let response = await fetch('https://api.notion.com/v1/pages', {
    method: 'POST',
    body: JSON.stringify(payload),
    headers: {
        'Authorization' : 'Bearer secret_XXX',
        'Content-Type': 'application/json',
        'Notion-Version': '2021-08-16',
    },
});
console.log(await response.json());
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

While not a child database, I was able to resolve my issue by creating a simple table instead since Notion just announced the API would now support simple tables:

https://developers.notion.com/reference/block#table-blocks

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda