curl --request POST \
--url http://localhost:3000/v2/pages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"assignee": [
{
"user_id": "<string>",
"agent_id": "<string>"
}
],
"targets": [
{}
],
"pipelines": {},
"properties": {},
"relations": {},
"files": [
{
"type": "file_upload",
"name": "document.pdf",
"file_upload": {
"id": "<string>"
}
}
],
"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>"
},
"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>"
}
],
"runSessionId": "<string>"
}
'import requests
url = "http://localhost:3000/v2/pages"
payload = {
"title": "<string>",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"assignee": [
{
"user_id": "<string>",
"agent_id": "<string>"
}
],
"targets": [{}],
"pipelines": {},
"properties": {},
"relations": {},
"files": [
{
"type": "file_upload",
"name": "document.pdf",
"file_upload": { "id": "<string>" }
}
],
"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>"
},
"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>"
}
],
"runSessionId": "<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({
title: '<string>',
icon: {file: {}, external: {}, file_upload: {}},
assignee: [{user_id: '<string>', agent_id: '<string>'}],
targets: [{}],
pipelines: {},
properties: {},
relations: {},
files: [{type: 'file_upload', name: 'document.pdf', file_upload: {id: '<string>'}}],
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>'
},
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>'
}
],
runSessionId: '<string>'
})
};
fetch('http://localhost:3000/v2/pages', 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/pages",
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([
'title' => '<string>',
'icon' => [
'file' => [
],
'external' => [
],
'file_upload' => [
]
],
'assignee' => [
[
'user_id' => '<string>',
'agent_id' => '<string>'
]
],
'targets' => [
[
]
],
'pipelines' => [
],
'properties' => [
],
'relations' => [
],
'files' => [
[
'type' => 'file_upload',
'name' => 'document.pdf',
'file_upload' => [
'id' => '<string>'
]
]
],
'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>'
],
'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>'
]
],
'runSessionId' => '<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/pages"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\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/pages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/pages")
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 \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\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",
"kind": "report",
"title": "<string>",
"agent": {
"type": "none"
},
"assignee": [
{
"type": "user_id",
"user_id": "<string>"
}
],
"targets": [
{
"type": "company",
"company": {
"id": "cmp_abc123",
"document": "12345678000190",
"tradeName": "Acme Corp",
"legalName": "Acme Ltda",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
}
}
}
],
"permissions": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"ask": [
"<string>"
]
},
"files": [
{
"type": "file_upload",
"name": "<string>",
"file_upload": {
"id": "<string>"
}
}
],
"pipelines": {},
"properties": {},
"relations": {},
"summary": "<string>",
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
},
"agentFileId": "<string>",
"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>"
},
"parent": {
"type": "page_id",
"page_id": "<string>"
},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"cacheReadInputTokens": 123,
"cacheCreationInputTokens": 123,
"cacheCreationEphemeral1hInputTokens": 123,
"cacheCreationEphemeral5mInputTokens": 123,
"totalInputTokens": 123,
"durationSeconds": 123,
"activeSeconds": 123,
"claudeUsage": {},
"claudeStats": {}
},
"runSessionId": {
"object": "session",
"id": "<string>",
"status": "provisioning",
"userId": "<string>",
"agentVersion": 123
},
"url": "<string>"
}Create a new page
Creates a new page. When an agent is applied, materializes its steps on the page.
curl --request POST \
--url http://localhost:3000/v2/pages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"assignee": [
{
"user_id": "<string>",
"agent_id": "<string>"
}
],
"targets": [
{}
],
"pipelines": {},
"properties": {},
"relations": {},
"files": [
{
"type": "file_upload",
"name": "document.pdf",
"file_upload": {
"id": "<string>"
}
}
],
"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>"
},
"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>"
}
],
"runSessionId": "<string>"
}
'import requests
url = "http://localhost:3000/v2/pages"
payload = {
"title": "<string>",
"icon": {
"file": {},
"external": {},
"file_upload": {}
},
"assignee": [
{
"user_id": "<string>",
"agent_id": "<string>"
}
],
"targets": [{}],
"pipelines": {},
"properties": {},
"relations": {},
"files": [
{
"type": "file_upload",
"name": "document.pdf",
"file_upload": { "id": "<string>" }
}
],
"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>"
},
"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>"
}
],
"runSessionId": "<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({
title: '<string>',
icon: {file: {}, external: {}, file_upload: {}},
assignee: [{user_id: '<string>', agent_id: '<string>'}],
targets: [{}],
pipelines: {},
properties: {},
relations: {},
files: [{type: 'file_upload', name: 'document.pdf', file_upload: {id: '<string>'}}],
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>'
},
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>'
}
],
runSessionId: '<string>'
})
};
fetch('http://localhost:3000/v2/pages', 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/pages",
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([
'title' => '<string>',
'icon' => [
'file' => [
],
'external' => [
],
'file_upload' => [
]
],
'assignee' => [
[
'user_id' => '<string>',
'agent_id' => '<string>'
]
],
'targets' => [
[
]
],
'pipelines' => [
],
'properties' => [
],
'relations' => [
],
'files' => [
[
'type' => 'file_upload',
'name' => 'document.pdf',
'file_upload' => [
'id' => '<string>'
]
]
],
'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>'
],
'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>'
]
],
'runSessionId' => '<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/pages"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\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/pages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/pages")
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 \"title\": \"<string>\",\n \"icon\": {\n \"file\": {},\n \"external\": {},\n \"file_upload\": {}\n },\n \"assignee\": [\n {\n \"user_id\": \"<string>\",\n \"agent_id\": \"<string>\"\n }\n ],\n \"targets\": [\n {}\n ],\n \"pipelines\": {},\n \"properties\": {},\n \"relations\": {},\n \"files\": [\n {\n \"type\": \"file_upload\",\n \"name\": \"document.pdf\",\n \"file_upload\": {\n \"id\": \"<string>\"\n }\n }\n ],\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 \"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 \"runSessionId\": \"<string>\"\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",
"kind": "report",
"title": "<string>",
"agent": {
"type": "none"
},
"assignee": [
{
"type": "user_id",
"user_id": "<string>"
}
],
"targets": [
{
"type": "company",
"company": {
"id": "cmp_abc123",
"document": "12345678000190",
"tradeName": "Acme Corp",
"legalName": "Acme Ltda",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
}
}
}
],
"permissions": {
"allow": [
"<string>"
],
"deny": [
"<string>"
],
"ask": [
"<string>"
]
},
"files": [
{
"type": "file_upload",
"name": "<string>",
"file_upload": {
"id": "<string>"
}
}
],
"pipelines": {},
"properties": {},
"relations": {},
"summary": "<string>",
"createdBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"updatedBy": {
"object": "user",
"id": "u_abc123",
"apiKeyId": "bsk_abc123"
},
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
},
"agentFileId": "<string>",
"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>"
},
"parent": {
"type": "page_id",
"page_id": "<string>"
},
"usage": {
"input": 123,
"output": 123,
"total": 123,
"cacheReadInputTokens": 123,
"cacheCreationInputTokens": 123,
"cacheCreationEphemeral1hInputTokens": 123,
"cacheCreationEphemeral5mInputTokens": 123,
"totalInputTokens": 123,
"durationSeconds": 123,
"activeSeconds": 123,
"claudeUsage": {},
"claudeStats": {}
},
"runSessionId": {
"object": "session",
"id": "<string>",
"status": "provisioning",
"userId": "<string>",
"agentVersion": 123
},
"url": "<string>"
}Authorizations
OAuth2 Authorization Code flow
Body
Page icon
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Agent to run. Required for "report" kind; omit for manual CRM kinds (e.g. "deal").
Show child attributes
Show child attributes
Page assignees. Supports users and agents.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Initial board placements keyed by pipeline id ({ stage, position }).
Show child attributes
Show child attributes
Initial custom properties (scalar values) keyed by property name.
Initial relations keyed by relation name (a { object, value } ref or array of refs).
Object kind (default "report"). Each kind defines a property schema.
report, deal Show child attributes
Show child attributes
Show child attributes
Show child attributes
Page-level content. Uses the same schema as block.content and renders before child blocks.
- 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
Show child attributes
Show child attributes
Existing owned session id linked to the page run session reference
Response
Page created 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"
Object kind (report | deal).
report, deal Page title
Agent reference
- Option 1
- Option 2
Show child attributes
Show child attributes
Page assignees. Supports users and agents.
- Option 1
- Option 2
Show child attributes
Show child attributes
Page targets
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Board placements keyed by pipeline id ({ stage, position }). Empty when not on any board.
Show child attributes
Show child attributes
Custom properties (scalar values) keyed by property name. Filter/group via properties.<name>.
Relation values keyed by relation name (target key or array). Filter via relations.<name>.
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"
}
Page icon
Show child attributes
Show child attributes
Source PPTX file ID for the full deck used by this page agent
Page-level content. Uses the same schema as block.content and renders before child blocks.
- 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
Parent relationship (Notion-compatible).
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Token usage summary for the page
Show child attributes
Show child attributes
Associated page run session reference. Expand runSessionId fields to include run metadata.
Show child attributes
Show child attributes
Absolute app URL for the page. Included only when requested with expand=url.