curl --request PATCH \
--url http://localhost:3000/v2/blocks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": true,
"italic": true,
"strikethrough": true,
"underline": true,
"code": true,
"color": "<string>"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": {},
"order": {},
"instructions": {},
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": {},
"resources": [
{
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/v2/blocks/{id}"
payload = {
"content": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": True,
"italic": True,
"strikethrough": True,
"underline": True,
"code": True,
"color": "<string>"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": {},
"order": {},
"instructions": {},
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": {},
"resources": [
{
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: {
rich_text: [
{
type: 'text',
annotations: {
bold: true,
italic: true,
strikethrough: true,
underline: true,
code: true,
color: '<string>'
},
plain_text: '<string>',
href: '<string>'
}
],
color: '<string>'
},
agentFileId: '<string>',
previewFileId: '<string>',
title: {},
order: {},
instructions: {},
evaluations: [
{
type: 'outcome',
outcome: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
maxIterations: 10.5
}
],
prompt_id: {},
resources: [{outcome_id: '<string>', session_id: '<string>', file_upload_id: '<string>'}]
})
};
fetch('http://localhost:3000/v2/blocks/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
'rich_text' => [
[
'type' => 'text',
'annotations' => [
'bold' => true,
'italic' => true,
'strikethrough' => true,
'underline' => true,
'code' => true,
'color' => '<string>'
],
'plain_text' => '<string>',
'href' => '<string>'
]
],
'color' => '<string>'
],
'agentFileId' => '<string>',
'previewFileId' => '<string>',
'title' => [
],
'order' => [
],
'instructions' => [
],
'evaluations' => [
[
'type' => 'outcome',
'outcome' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'maxIterations' => 10.5
]
],
'prompt_id' => [
],
'resources' => [
[
'outcome_id' => '<string>',
'session_id' => '<string>',
'file_upload_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}"
payload := strings.NewReader("{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/blocks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/blocks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
]
}Update a block
curl --request PATCH \
--url http://localhost:3000/v2/blocks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": true,
"italic": true,
"strikethrough": true,
"underline": true,
"code": true,
"color": "<string>"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": {},
"order": {},
"instructions": {},
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": {},
"resources": [
{
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
'import requests
url = "http://localhost:3000/v2/blocks/{id}"
payload = {
"content": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": True,
"italic": True,
"strikethrough": True,
"underline": True,
"code": True,
"color": "<string>"
},
"plain_text": "<string>",
"href": "<string>"
}
],
"color": "<string>"
},
"agentFileId": "<string>",
"previewFileId": "<string>",
"title": {},
"order": {},
"instructions": {},
"evaluations": [
{
"type": "outcome",
"outcome": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"maxIterations": 10.5
}
],
"prompt_id": {},
"resources": [
{
"outcome_id": "<string>",
"session_id": "<string>",
"file_upload_id": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: {
rich_text: [
{
type: 'text',
annotations: {
bold: true,
italic: true,
strikethrough: true,
underline: true,
code: true,
color: '<string>'
},
plain_text: '<string>',
href: '<string>'
}
],
color: '<string>'
},
agentFileId: '<string>',
previewFileId: '<string>',
title: {},
order: {},
instructions: {},
evaluations: [
{
type: 'outcome',
outcome: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
maxIterations: 10.5
}
],
prompt_id: {},
resources: [{outcome_id: '<string>', session_id: '<string>', file_upload_id: '<string>'}]
})
};
fetch('http://localhost:3000/v2/blocks/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
'rich_text' => [
[
'type' => 'text',
'annotations' => [
'bold' => true,
'italic' => true,
'strikethrough' => true,
'underline' => true,
'code' => true,
'color' => '<string>'
],
'plain_text' => '<string>',
'href' => '<string>'
]
],
'color' => '<string>'
],
'agentFileId' => '<string>',
'previewFileId' => '<string>',
'title' => [
],
'order' => [
],
'instructions' => [
],
'evaluations' => [
[
'type' => 'outcome',
'outcome' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'maxIterations' => 10.5
]
],
'prompt_id' => [
],
'resources' => [
[
'outcome_id' => '<string>',
'session_id' => '<string>',
'file_upload_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}"
payload := strings.NewReader("{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("http://localhost:3000/v2/blocks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/blocks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"annotations\": {\n \"bold\": true,\n \"italic\": true,\n \"strikethrough\": true,\n \"underline\": true,\n \"code\": true,\n \"color\": \"<string>\"\n },\n \"plain_text\": \"<string>\",\n \"href\": \"<string>\"\n }\n ],\n \"color\": \"<string>\"\n },\n \"agentFileId\": \"<string>\",\n \"previewFileId\": \"<string>\",\n \"title\": {},\n \"order\": {},\n \"instructions\": {},\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\": {},\n \"resources\": [\n {\n \"outcome_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"file_upload_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
]
}Authorizations
OAuth2 Authorization Code flow
Path Parameters
Block ID
Query Parameters
Comma-separated optional response fields. Supported values: instructions, outputExample, expectedOutput, prompt_id. Fields not requested are omitted.
Body
Type-specific block content. Structure depends on the block type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
- Option 42
- Option 43
- Option 44
Show child attributes
Show child attributes
Source PPTX file ID for this individual slide block
Generated slide PPTX file ID used for preview generation
OpenAI structured output schema metadata persisted at block root
Show child attributes
Show child attributes
Block title (for agent sections)
Block order within parent
Instructions for what the block should contain
Show child attributes
Show child attributes
Prompt slug for planner instructions
External resources attached to this block
Show child attributes
Show child attributes
Response
Block updated successfully
Object type
"page"
Unique identifier
"p_abc123"
Creation timestamp
"2024-01-15T10:30:00.000Z"
Last update timestamp
"2024-01-15T14:45:00.000Z"
Parent location of the block
Show child attributes
Show child attributes
Block status
pending, running, evaluating, writing, error, done, insufficient_data, canceled Block type
audio, bookmark, breadcrumb, bulleted_list_item, callout, chart_area, chart_bar, chart_line, chart_pie, child_database, child_page, code, markdown, column, column_list, data_view, divider, embed, equation, file, flex, graph_visualization, heading_1, heading_2, heading_3, heatmap, image, inline_database_block, link_preview, map, mention, numbered_list_item, paragraph, pdf, quote, synced_block, tab, table, table_of_contents, table_row, tabs, agent, to_do, toggle, video, slide "paragraph"
Principal who created this object
Show child attributes
Show child attributes
{
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
}
Principal who last updated this object
Show child attributes
Show child attributes
{
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
}
Type-specific block content. Structure depends on the block type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
- Option 42
- Option 43
- Option 44
Show child attributes
Show child attributes
Example output for markdown blocks
OpenAI structured output schema for slide agents
Show child attributes
Show child attributes
Expected output for markdown blocks
Source PPTX file ID for this individual slide block
Preview PPTX file ID for this slide block
Show child attributes
Show child attributes
External resources attached to this block
Show child attributes
Show child attributes