Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url http://localhost:3000/v2/blocks/{id}/children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"children": [
{
"type": "paragraph",
"order": 123,
"content": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Hello"
}
}
]
},
"children": "<array>",
"outputExample": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/v2/blocks/{id}/children"
payload = { "children": [
{
"type": "paragraph",
"order": 123,
"content": { "rich_text": [
{
"type": "text",
"text": { "content": "Hello" }
}
] },
"children": "<array>",
"outputExample": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
children: [
{
type: 'paragraph',
order: 123,
content: {rich_text: [{type: 'text', text: {content: 'Hello'}}]},
children: '<array>',
outputExample: '<string>',
agentFileId: '<string>',
previewFileId: '<string>',
title: '<string>',
instructions: '<string>',
evaluations: [
{
type: 'outcome',
outcome: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
maxIterations: 10.5
}
],
prompt_id: '<string>'
}
]
})
};
fetch('http://localhost:3000/v2/blocks/{id}/children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/blocks/{id}/children",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'children' => [
[
'type' => 'paragraph',
'order' => 123,
'content' => [
'rich_text' => [
[
'type' => 'text',
'text' => [
'content' => 'Hello'
]
]
]
],
'children' => '<array>',
'outputExample' => '<string>',
'agentFileId' => '<string>',
'previewFileId' => '<string>',
'title' => '<string>',
'instructions' => '<string>',
'evaluations' => [
[
'type' => 'outcome',
'outcome' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'maxIterations' => 10.5
]
],
'prompt_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/blocks/{id}/children"
payload := strings.NewReader("{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/blocks/{id}/children")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/blocks/{id}/children")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"results": [
{
"object": "page",
"id": "p_abc123",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T14:45:00.000Z",
"parent": {
"type": "page_id",
"page_id": "<string>",
"org": true
},
"hasChildren": true,
"status": "pending",
"type": "paragraph",
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"order": 123,
"content": {
"rich_text": [
{
"type": "text",
"text": {
"content": "<string>",
"link": {
"url": "<string>"
}
},
"annotations": {
"bold": true,
"italic": true,
"strikethrough": true,
"underline": true,
"code": true,
"color": "<string>",
"trend": "up"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"markdown": "<string>",
"children": "<array>",
"outputExample": "<string>",
"structuredOutput": {
"type": "json_schema",
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"expectedOutput": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>",
"resources": [
{
"object": "outcome_id",
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
],
"has_more": true,
"next_cursor": "<string>",
"type": "<string>"
}Creates new blocks and appends them to the specified page.
curl --request POST \
--url http://localhost:3000/v2/blocks/{id}/children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"children": [
{
"type": "paragraph",
"order": 123,
"content": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Hello"
}
}
]
},
"children": "<array>",
"outputExample": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/v2/blocks/{id}/children"
payload = { "children": [
{
"type": "paragraph",
"order": 123,
"content": { "rich_text": [
{
"type": "text",
"text": { "content": "Hello" }
}
] },
"children": "<array>",
"outputExample": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
children: [
{
type: 'paragraph',
order: 123,
content: {rich_text: [{type: 'text', text: {content: 'Hello'}}]},
children: '<array>',
outputExample: '<string>',
agentFileId: '<string>',
previewFileId: '<string>',
title: '<string>',
instructions: '<string>',
evaluations: [
{
type: 'outcome',
outcome: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
maxIterations: 10.5
}
],
prompt_id: '<string>'
}
]
})
};
fetch('http://localhost:3000/v2/blocks/{id}/children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/blocks/{id}/children",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'children' => [
[
'type' => 'paragraph',
'order' => 123,
'content' => [
'rich_text' => [
[
'type' => 'text',
'text' => [
'content' => 'Hello'
]
]
]
],
'children' => '<array>',
'outputExample' => '<string>',
'agentFileId' => '<string>',
'previewFileId' => '<string>',
'title' => '<string>',
'instructions' => '<string>',
'evaluations' => [
[
'type' => 'outcome',
'outcome' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'maxIterations' => 10.5
]
],
'prompt_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/blocks/{id}/children"
payload := strings.NewReader("{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/blocks/{id}/children")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/blocks/{id}/children")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"children\": [\n {\n \"type\": \"paragraph\",\n \"order\": 123,\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"Hello\"\n }\n }\n ]\n },\n \"children\": \"<array>\",\n \"outputExample\": \"<string>\",\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"evaluations\": [\n {\n \"type\": \"outcome\",\n \"outcome\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"maxIterations\": 10.5\n }\n ],\n \"prompt_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"results": [
{
"object": "page",
"id": "p_abc123",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T14:45:00.000Z",
"parent": {
"type": "page_id",
"page_id": "<string>",
"org": true
},
"hasChildren": true,
"status": "pending",
"type": "paragraph",
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"order": 123,
"content": {
"rich_text": [
{
"type": "text",
"text": {
"content": "<string>",
"link": {
"url": "<string>"
}
},
"annotations": {
"bold": true,
"italic": true,
"strikethrough": true,
"underline": true,
"code": true,
"color": "<string>",
"trend": "up"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"markdown": "<string>",
"children": "<array>",
"outputExample": "<string>",
"structuredOutput": {
"type": "json_schema",
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"expectedOutput": "<string>",
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": "<string>",
"instructions": "<string>",
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": "<string>",
"resources": [
{
"object": "outcome_id",
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
],
"has_more": true,
"next_cursor": "<string>",
"type": "<string>"
}OAuth2 Authorization Code flow
Page ID
Block ID after which to insert new blocks. If not provided, blocks are appended at the end.
Comma-separated optional response fields. Supported values: markdown, instructions, outputExample, expectedOutput, prompt_id. Fields not requested are omitted.
Array of child blocks to append
Show child attributes