Skip to main content
POST
/
pages
Python
import os
from datagrid_ai import Datagrid

client = Datagrid(
    api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
)
page = client.pages.create(
    name="name",
)
print(page.id)
{
  "object": "page",
  "id": "<string>",
  "name": "<string>",
  "parent": {
    "type": "page",
    "page_id": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name of the page

Maximum string length: 255
parent
object

The parent page reference, indicating where this page is nested

Response

201 - application/json

Created page

The page object represents a page that can contain knowledge and other pages in a hierarchical structure.

object
enum<string>
required

The object type, always 'page'

Available options:
page
id
string
required

Unique identifier for the page (document resource ID)

name
string
required

The name of the page

parent
object
required

The parent page reference, indicating where this page is nested

created_at
string<date-time>
required

The ISO string for when the page was created