{"openapi":"3.1.0","info":{"title":"Vtorum Buildin-compatible Developer API","version":"v2","description":"Buildin Developer API V2 wire-compatible surface implemented by Vtorum."},"servers":[{"url":"https://notes.vtorum.net/v2"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Vtorum system-user token"}},"schemas":{"Error":{"type":"object","required":["object","status","code","message","request_id"],"properties":{"object":{"const":"error"},"status":{"type":"integer"},"code":{"type":"string","enum":["validation_error","unsupported_filter","unsupported_sort","unsupported_block_type","unauthorized","forbidden","not_found","conflict","idempotency_conflict","rate_limited","internal_error"]},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}}},"OpenApiMeta":{"type":"object","required":["etag","generatedAt","pathCount","version"],"properties":{"etag":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"pathCount":{"type":"integer"},"version":{"const":"v2"}}},"UserRef":{"type":"object","required":["object","id"],"properties":{"object":{"const":"user"},"id":{"type":"string"}}},"User":{"type":"object","required":["object","id","type","name","avatar_url","person"],"properties":{"object":{"const":"user"},"id":{"type":"string"},"type":{"const":"person"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"person":{"type":"object","required":["email"],"properties":{"email":{"type":["string","null"]}}}}},"BotUser":{"type":"object","required":["object","id","name","workspace_id","workspace_name","capabilities","type","integration_id"],"properties":{"object":{"enum":["bot_user","user"]},"id":{"type":"string"},"name":{"type":"string"},"workspace_id":{"type":"string"},"workspace_name":{"type":"string"},"account_type":{"enum":["person","system"]},"authorization":{"type":"object","additionalProperties":true},"owner":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"capabilities":{"type":"object","additionalProperties":{"type":"boolean"}},"type":{"enum":["integration","person"]},"integration_id":{"type":["string","null"]}}},"RichText":{"type":"object","required":["type","plain_text"],"additionalProperties":true,"properties":{"type":{"type":"string"},"plain_text":{"type":"string"},"href":{"type":["string","null"]}}},"FileObject":{"type":"object","required":["type","name"],"properties":{"type":{"enum":["file","external"]},"name":{"type":"string"},"size":{"type":["integer","null"],"minimum":0},"file":{"type":"object","properties":{"url":{"type":"string"},"expiry_time":{"type":["string","null"],"format":"date-time"}}},"external":{"type":"object","properties":{"url":{"type":"string"}}}}},"ParentInput":{"type":"object","oneOf":[{"required":["page_id"],"properties":{"page_id":{"type":"string"}}},{"required":["database_id"],"properties":{"database_id":{"type":"string"}}}]},"PageProperty":{"type":"object","required":["id","type"],"additionalProperties":true,"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"Page":{"type":"object","required":["object","id","page_type","created_time","last_edited_time","parent","in_trash","properties","url"],"additionalProperties":true,"properties":{"object":{"const":"page"},"id":{"type":"string"},"page_type":{"enum":["page","folder","mind_map"]},"created_time":{"type":"string","format":"date-time"},"last_edited_time":{"type":"string","format":"date-time"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"last_edited_by":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"parent":{"type":"object","additionalProperties":true},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"},"icon":{},"cover":{},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PageProperty"}},"url":{"type":"string"}}},"Database":{"type":"object","required":["object","id","created_time","last_edited_time","title","description","parent","properties","in_trash","is_inline","url"],"additionalProperties":true,"properties":{"object":{"const":"database"},"id":{"type":"string"},"created_time":{"type":"string","format":"date-time"},"last_edited_time":{"type":"string","format":"date-time"},"title":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"description":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"parent":{"type":"object","additionalProperties":true},"properties":{"type":"object","additionalProperties":true},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"},"is_inline":{"type":"boolean"},"unique_keys":{"type":"array","maxItems":20,"description":"Record uniqueness keys; replaces the current list, [] removes all. Each key: {name, properties: [name | schema key | id] (1–6), where?: query filter}. The combination of values must not repeat; records with an empty key field and records in trash are not checked; text is compared case-insensitively. Saving a key over existing duplicates fails with 409 unique_duplicates. A single property is made unique with config.unique = true. Writes that repeat a key fail with 409 unique_violation (details.record_id — the existing record).","items":{"type":"object","required":["name","properties"],"properties":{"name":{"type":"string"},"properties":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":6},"where":{"type":["object","null"],"additionalProperties":true}}}},"url":{"type":"string"},"icon":{},"cover":{}}},"Block":{"type":"object","required":["object","id","parent","created_time","last_edited_time","has_children","in_trash","type"],"additionalProperties":true,"properties":{"object":{"const":"block"},"id":{"type":"string"},"parent":{"type":"object","additionalProperties":true},"created_time":{"type":"string","format":"date-time"},"last_edited_time":{"type":"string","format":"date-time"},"has_children":{"type":"boolean"},"in_trash":{"type":"boolean"},"type":{"type":"string","description":"Any block type — see the full list in BlockInput. Every editor type can be created and patched; reads may also return unsupported (an unrecognized imported block) and child_page / child_database / child_folder placements."}}},"BlockInput":{"type":"object","required":["type"],"additionalProperties":true,"description":"Block types. WRITABLE (create/patch): paragraph, heading_1..heading_4, bulleted_list_item, numbered_list_item, to_do, quote, code, callout, divider, bookmark, embed, embedded_database_view, image, video, pdf, file, table (+table_row children), toggle, equation, link_to_page, ai_request, mermaid, drawing_board, mindmap, html_embed, synced_block, template, table_of_contents, breadcrumb, signature, crypto. There is NO audio type: put audio into a file block — the editor renders an audio player by content type. child_page, child_database, child_folder are structural placements: appending one places an EXISTING child node on the page; PATCH only moves them. unsupported is read-only (an imported block Vtorum did not recognize). Media payload (image, video, pdf, file, html_embed): {type:\"file\", asset_id} or {type:\"file\", file:{url}} from upload-url, plus caption (plain string or rich-text array); html_embed takes an uploaded text/html asset plus optional height_px, width_px, full_height. mermaid payload: {source} — the diagram text (stored as editor_text, the same as a code block; reads return editor_text); optional source_height_px / preview_height_px (96..2400) set the height of the code and diagram windows. drawing_board payload: {width, height, background, elements} — elements are shapes {id, type: rectangle|rounded_rectangle|ellipse|diamond|text, x, y, width, height, text, stroke, fill, strokeWidth, fontSize, textAlign, textVerticalAlign, layer}, paths {id, type: path, points: [{x, y}, …≥2], stroke, strokeWidth} and connectors {id, type: connector, from: {x, y, elementId?, side?}, to: {…}, text, shape: straight|elbow}; colors are hex (#1f2937). PATCH replaces elements as a whole. mindmap payload: {nodes: [{id, title, parent_id, page_id?, collapsed?}]} — exactly one root with parent_id null, every parent_id must exist, no cycles; root_id is computed; page_id must be a page you can read; placement_id is filled by the editor. Empty nodes (or {title}) creates a single root. signature: create an empty block — the server signs the page with the token user key; its fields cannot be set or patched (moving and trashing are allowed). crypto: client-side encrypted vault, visible only to its creator. synced_block, template: rich_text like a paragraph. table_of_contents, breadcrumb: no payload, rendered from the page. embedded_database_view payload: {database_id, view_id} — both ids must point to an existing database and one of its views; the block renders that view inline. Optional visible_view_ids (views of the same database, in tab order; view_id must be among them) turns the block into tabs, show_view_switcher: false hides the tab bar. Without visible_view_ids the block shows view_id alone. Size: width_px or width_percent (inside a column) and height_px; with a height the records scroll inside the block. table payload holds the grid options, its rows are table_row children with a cells array. Columns: there are no column/column_list wrapper blocks. To place blocks side by side, give CONSECUTIVE top-level blocks the same column_group_id (any uuid) inside their type payload (e.g. inside \"image\"), with column_index 0,1,2… per column and an optional column_ratio percentage (equal shares by default). Blocks sharing a column_index stack vertically in that column. The same keys come back on reads.","properties":{"type":{"enum":["paragraph","heading_1","heading_2","heading_3","heading_4","bulleted_list_item","numbered_list_item","to_do","quote","code","callout","divider","bookmark","embed","embedded_database_view","image","file","video","pdf","table","table_row","toggle","equation","link_to_page","ai_request","mermaid","drawing_board","mindmap","html_embed","synced_block","template","table_of_contents","breadcrumb","signature","crypto"]},"children":{"type":"array","items":{"type":"object","additionalProperties":true}},"ai_request":{"$ref":"#/components/schemas/AiRequestInput"}}},"AiRequestInput":{"type":"object","additionalProperties":false,"description":"AI request composer block. Create it with a prompt and optional attachments, then execute it via POST /blocks/{block_id}/ai-request/run.","properties":{"request_type":{"enum":["text","image","audio","speech"],"default":"text"},"prompt":{"type":"string","maxLength":100000},"raw_prompt":{"type":"boolean","default":false,"description":"Image requests only: send the prompt to the image model verbatim, skipping the conversational prompt-rewrite step. Use when the prompt is already a finished visual prompt and series consistency matters."},"image_format":{"enum":["1:1","3:2","2:3","16:9","9:16","3:1"],"description":"Image requests only: frame format sent to the image model as an explicit size/aspect-ratio parameter. Omit to use the workspace AI settings."},"attachments":{"type":"array","maxItems":20,"description":"Asset ids uploaded via /files/upload-url (owned by the token user).","items":{"oneOf":[{"type":"string","format":"uuid"},{"type":"object","required":["asset_id"],"properties":{"asset_id":{"type":"string","format":"uuid"}}}]}},"speech_voice":{"type":"string","maxLength":200},"speech_speed":{"type":"number","minimum":0.25,"maximum":4}}},"AiJob":{"type":"object","required":["object","id","status"],"additionalProperties":true,"properties":{"object":{"const":"ai_job"},"id":{"type":"string","format":"uuid"},"page_id":{"type":"string","format":"uuid"},"source_block_id":{"type":["string","null"],"format":"uuid"},"status":{"enum":["queued","running","completed","failed","cancelled"]},"progress":{"type":"object","additionalProperties":true},"error":{"type":["string","null"]},"result":{"type":"object","additionalProperties":true,"description":"Execution result. For image requests includes asset_id, block_ids, generated prompt, seed (when the provider reports one) and a ready-to-use file object."}}},"PropertyItem":{"type":"object","required":["object","id","type"],"additionalProperties":true,"properties":{"object":{"const":"property_item"},"id":{"type":"string"},"type":{"type":"string"}}},"ObjectList":{"type":"object","required":["object","results","next_cursor","has_more"],"properties":{"object":{"const":"list"},"results":{"type":"array","items":{}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"PageList":{"allOf":[{"$ref":"#/components/schemas/ObjectList"},{"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Page"}}}}]},"BlockList":{"allOf":[{"$ref":"#/components/schemas/ObjectList"},{"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Block"}}}}]},"Markdown":{"type":"object","required":["object","page_id","markdown","updated_time"],"properties":{"object":{"const":"markdown"},"page_id":{"type":"string"},"markdown":{"type":"string"},"updated_time":{"type":"string","format":"date-time"}}},"Publication":{"type":"object","required":["object","published"],"properties":{"object":{"const":"publication"},"published":{"type":"boolean"},"url":{"type":["string","null"]},"slug":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"allow_indexing":{"type":"boolean"},"publish_tree":{"type":"boolean"},"allow_comments":{"type":"boolean"},"show_navigation":{"type":"boolean"},"show_sidebar":{"type":"boolean"},"show_contents":{"type":"boolean"},"show_contents_left":{"type":"boolean"},"navigation_sort":{"type":"string","enum":["parent","alphabet"]},"show_workspace_name":{"type":"boolean"},"allow_pdf_export":{"type":"boolean"},"allow_files_download":{"type":"boolean"},"show_database_search":{"type":"boolean"},"show_record_properties":{"type":"boolean"},"allow_claim":{"type":"boolean"},"inflect_mentions":{"type":"boolean","description":"Всегда true (с 5.44.0): названия страниц в упоминаниях склоняются в публикации, её Markdown и PDF; отказ задаётся у самого упоминания — mention.page.inflection.skip. Падеж определяется по контексту, хранимый текст не меняется."},"inflect_default_gender":{"enum":["male","female"],"description":"Пол для имён, которые не удалось определить по самому имени. По умолчанию male."},"password_protected":{"type":"boolean","description":"Доступ по паролю (5.44.0): читатель видит публикацию только после ввода пароля."},"password":{"type":["string","null"],"description":"Пароль публикации (случайный, выдаётся сервером при включении) или null. Виден только тем, кто вправе менять публикацию."}}},"PublicationInput":{"type":"object","required":["published"],"additionalProperties":false,"properties":{"published":{"type":"boolean"},"slug":{"type":"string","maxLength":120},"publish_tree":{"type":"boolean"},"allow_comments":{"type":"boolean"},"show_navigation":{"type":"boolean"},"show_sidebar":{"type":"boolean"},"show_contents":{"type":"boolean"},"show_contents_left":{"type":"boolean"},"navigation_sort":{"type":"string","enum":["parent","alphabet"]},"show_workspace_name":{"type":"boolean"},"allow_pdf_export":{"type":"boolean"},"allow_files_download":{"type":"boolean"},"show_database_search":{"type":"boolean"},"show_record_properties":{"type":"boolean"},"allow_claim":{"type":"boolean"},"inflect_mentions":{"type":"boolean","description":"Устарело с 5.44.0: принимается для совместимости и ни на что не влияет — склонение отключается у самого упоминания (mention.page.inflection.skip)."},"inflect_default_gender":{"enum":["male","female"]},"password_protected":{"type":"boolean","description":"true — включить доступ по паролю (сервер выдаст случайный пароль, если его ещё нет), false — снять пароль. Без поля — как было."},"allow_indexing":{"type":"boolean"}}},"InflectionItem":{"type":"object","required":["title"],"additionalProperties":false,"properties":{"title":{"type":"string","maxLength":200},"gender":{"enum":["auto","male","female"],"default":"auto"},"before":{"type":"string","maxLength":200,"description":"Текст слева от упоминания в том же предложении."}}},"InflectionPreviewRequest":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","maxLength":200},"gender":{"enum":["auto","male","female"],"default":"auto"},"before":{"type":"string","maxLength":200},"items":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/InflectionItem"}}}},"InflectionPreview":{"type":"object","required":["object","case","rule","text","confidence"],"properties":{"object":{"const":"inflection"},"case":{"enum":["nomn","gent","datv","accs","ablt","loct"]},"rule":{"type":"string","description":"Сработавшее правило определения падежа."},"text":{"type":"string","description":"Склонённое название; без изменений — исходное."},"confidence":{"type":"number","minimum":0,"maximum":1}}},"SearchRequest":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","default":""},"filter":{"type":"object","properties":{"property":{"const":"object"},"value":{"enum":["page","database","folder","mind_map"]}}},"sort":{"type":"object","properties":{"timestamp":{"enum":["last_edited_time","created_time"]},"direction":{"enum":["ascending","descending"]}}},"start_cursor":{"type":["string","null"]},"page_size":{"type":"integer","minimum":1,"maximum":100,"default":20}}},"SemanticSearchRequest":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":1},"start_cursor":{"type":["string","null"]},"page_size":{"type":"integer","minimum":1,"maximum":100,"default":10}}},"SemanticResult":{"type":"object","required":["object","page_id","block_id","score","text"],"properties":{"object":{"const":"semantic_search_result"},"page_id":{"type":"string"},"block_id":{"type":["string","null"]},"score":{"type":"number"},"text":{"type":"string"}}},"SemanticResultList":{"allOf":[{"$ref":"#/components/schemas/ObjectList"},{"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SemanticResult"}}}}]},"DatabaseQueryRequest":{"type":"object","properties":{"filter":{"type":"object","description":"Dates: this_week, past_week, next_week, this_month, past_month, next_month, this_quarter, past_quarter, next_quarter, this_year, past_year, next_year are calendar periods in the time zone of the viewer (for a token — its system user); relative takes {unit: day|week|month|quarter|year, offset: integer}; past_7_days / past_30_days stay rolling windows; date_range takes {from, to} where a bound is {\"date\": \"YYYY-MM-DD\"} or {\"today_offset\": integer} and an empty bound leaves the period open. For people, created_by and last_edited_by the value is a user id or \"@me\" — the current user (for a token, its system user). Anything else is rejected with 400.","additionalProperties":true},"sorts":{"type":"array","items":{"type":"object","additionalProperties":true}},"start_cursor":{"type":["string","null"]},"page_size":{"type":"integer","minimum":1,"maximum":100,"default":20}}},"PipelineDefinition":{"type":"object","description":"A tree of steps starting at entry: every step except entry is referenced exactly once (next, yes or no), at most 50 steps.","required":["schema","entry","steps"],"properties":{"schema":{"const":1},"entry":{"type":"string","description":"Key of the first step"},"steps":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PipelineStep"}},"guard_own_changes":{"type":"boolean","description":"Do not start again over the same subject for 120 s after this pipeline changed it."}}},"PipelineStep":{"oneOf":[{"$ref":"#/components/schemas/PipelineActionStep"},{"$ref":"#/components/schemas/PipelineConditionStep"}]},"PipelineActionStep":{"type":"object","required":["kind","take","process","put"],"properties":{"kind":{"const":"action"},"title":{"type":"string"},"take":{"$ref":"#/components/schemas/PipelineTake"},"process":{"$ref":"#/components/schemas/PipelineProcess"},"put":{"$ref":"#/components/schemas/PipelinePut"},"next":{"type":["string","null"]}}},"PipelineConditionStep":{"type":"object","required":["kind","operand","operator"],"properties":{"kind":{"const":"condition"},"title":{"type":"string"},"operand":{"allOf":[{"$ref":"#/components/schemas/PipelineTake"}],"description":"Any take except const, record, property_values and database_table."},"operator":{"enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","includes","not_includes","empty","not_empty","checked","unchecked","greater_than","greater_or_equal","less_than","less_or_equal","before","after","on_or_before","on_or_after","today","yesterday","tomorrow","past_7_days","next_7_days","past_30_days","next_30_days","date_range"]},"value":{},"yes":{"type":["string","null"]},"no":{"type":["string","null"]}}},"PipelineTake":{"type":"object","required":["from"],"description":"page_text, title, asset_text — no extra keys; property and property_values need property_id; step needs step; const needs value; record takes the whole subject record; database_table takes all rows of database_id (any database of the workspace; defaults to the subject database). Relations come as arrays of record ids; in table rows empty values are omitted.","properties":{"from":{"enum":["page_text","title","property","asset_text","step","const","record","property_values","database_table"]},"property_id":{"type":"string"},"step":{"type":"string"},"value":{"type":"string"},"database_id":{"type":"string"}}},"PipelineProcess":{"type":"object","required":["fn"],"description":"code is a function body: input (text), data (structure of integral sources), subject, steps and console.log are available; return the result. Synchronous, no network, files or timers.","properties":{"fn":{"enum":["none","template","ai","code"]},"template":{"type":"string"},"prompt":{"type":"string"},"model":{"type":"string"},"max_tokens":{"type":"integer"},"code":{"type":"string","maxLength":20000},"timeout_ms":{"type":"integer","minimum":1,"maximum":10000,"default":2000}}},"PipelinePut":{"type":"object","required":["to"],"description":"property writes property_id of the subject record, converted to the property type (a number returned by code stays a number); email_other needs recipient_email; webhook needs url; message needs recipient_user_id; ai_function needs function_key. records_create creates records in database_id from the step result — an array of {title, properties} (properties by name, schema key or id, converted like property); up to 1000 per step, all or nothing; upsert_key (a property) updates the record with the same key value instead of creating a duplicate. The step output is {ids, created, updated}. records_lock locks (or, with locked:false, unlocks) the records whose ids the step returns — records of any database in the workspace the run owner can edit; up to 5000 per step, all or nothing; unlocking needs a workspace owner or admin as the run owner; no change events are raised; output {ids, locked, skipped}. A locked record rejects every edit and deletion with 423 node_locked, including writes by other pipelines (failed without retries).","properties":{"to":{"enum":["variable","property","block_append","title","email_self","email_other","webhook","message","ai_function","records_create","records_lock"]},"locked":{"type":"boolean","description":"records_lock only: false unlocks. Default true."},"property_id":{"type":"string"},"database_id":{"type":"string","description":"records_create only."},"upsert_key":{"type":"string","description":"records_create only: name, schema key or id of the key property."},"recipient_email":{"type":"string"},"url":{"type":"string"},"recipient_user_id":{"type":"string"},"function_key":{"enum":["page_summary","banner_generation"]}}},"PipelineTemplateWrite":{"type":"object","required":["name","definition"],"properties":{"name":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":2000},"definition":{"$ref":"#/components/schemas/PipelineDefinition"},"enabled":{"type":"boolean","default":true}}},"PipelineTemplate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"definition":{"$ref":"#/components/schemas/PipelineDefinition"},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PipelineTemplateResponse":{"type":"object","properties":{"template":{"$ref":"#/components/schemas/PipelineTemplate"}}},"PipelineCatalog":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/PipelineTemplate"}},"properties":{"type":"array","items":{"type":"object","additionalProperties":true}},"databases":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"PipelineCodeTestRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string"},"input":{"type":"string"},"data":{},"steps":{"type":"object","additionalProperties":true},"timeout_ms":{"type":"integer","minimum":1,"maximum":10000}}},"PipelineCodeTestResult":{"type":"object","properties":{"ok":{"type":"boolean"},"text":{"type":"string"},"data":{},"logs":{"type":"array","items":{"type":"string"}},"error":{"type":"string"}}},"PipelineRun":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"template_id":{"type":"string"},"subject_node_id":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","cancelled"]},"current_step":{"type":["string","null"]},"attempts":{"type":"integer"},"max_attempts":{"type":"integer","description":"After this many attempts the run is marked failed"},"last_error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}}},"PipelineRunStep":{"type":"object","description":"input.text keeps the first 20 000 characters; when longer, text_length and truncated: true are set (the step itself received the whole input). output.logs holds console.log lines, also for a failed code step.","properties":{"step_key":{"type":"string"},"kind":{"enum":["action","condition"]},"status":{"enum":["succeeded","failed"]},"input":{"type":["object","null"],"additionalProperties":true},"output":{"type":["object","null"],"additionalProperties":true},"branch":{"type":["string","null"]},"error":{"type":["string","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}}},"TriggerWrite":{"type":"object","required":["objectType","objectId","eventType","actionType"],"description":"Keys may also be sent in snake_case, as GET /triggers returns them.","properties":{"objectType":{"enum":["node_tree","database","schedule"],"description":"schedule — the \"time\" object: the rule fires by the clock (daily / weekly / monthly); objectId is then the subject the action runs on (page, folder, database or record)."},"objectId":{"type":"string"},"eventType":{"enum":["created","changed","deleted","child_linked","child_unlinked","title_changed","property_changed","linked_record_changed","chat_message","commented","daily","weekly","monthly"],"description":"daily / weekly / monthly — only with objectType schedule."},"scheduleTime":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","description":"schedule only: local time HH:MM."},"scheduleWeekday":{"type":"integer","minimum":1,"maximum":7,"description":"weekly only: 1 = Monday … 7 = Sunday."},"scheduleMonthDay":{"type":"integer","minimum":1,"maximum":31,"description":"monthly only: day of month; 29–31 fall back to the last day of a shorter month."},"scheduleTimeZone":{"type":"string","description":"schedule only: IANA time zone, default — the creator's time zone."},"propertyId":{"type":["string","null"],"description":"Required for property_changed; for linked_record_changed — a relation property."},"actionType":{"enum":["email_self","email_other","webhook","webhook_bearer","create_clone","message","ai_summary","ai_banner","run_pipeline"]},"pipelineTemplateId":{"type":["string","null"]},"pipelineOldPredicate":{"description":"property_changed only"},"pipelineNewPredicate":{"description":"property_changed only"},"pipelineQuietSeconds":{"type":"integer","minimum":0,"maximum":86400},"pipelineHourlyLimit":{"type":"integer","minimum":1,"maximum":1000,"default":100},"messageRecipientUserId":{"type":["string","null"]},"recipientEmail":{"type":["string","null"]},"webhookUrl":{"type":["string","null"]},"bearerToken":{"type":["string","null"]},"cloneObjectType":{"enum":["page","record",null]},"cloneContainerId":{"type":["string","null"]},"enabled":{"type":"boolean"}}},"Trigger":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"object_type":{"type":"string"},"object_id":{"type":"string"},"event_type":{"type":"string"},"property_id":{"type":["string","null"]},"action_type":{"type":"string"},"pipeline_template_id":{"type":["string","null"]},"pipeline_quiet_seconds":{"type":"integer"},"pipeline_hourly_limit":{"type":"integer"},"enabled":{"type":"boolean"}}},"RollupPropertyConfig":{"type":"object","description":"Body of {\"rollup\": {...}}. Values are recomputed for existing records.","additionalProperties":false,"properties":{"relation_property":{"type":"string","description":"Relation of this database"},"relation_property_id":{"type":"string"},"relation_property_name":{"type":"string"},"rollup_property":{"type":"string","description":"Property of the related database"},"rollup_property_id":{"type":"string"},"rollup_property_name":{"type":"string"},"property":{"type":"string"},"property_id":{"type":"string"},"function":{"enum":["show_original","show_title","show_unique","count","count_values","sum","average","min","max"],"default":"show_original"},"decimals":{"type":"integer","minimum":0,"maximum":10},"align":{"enum":["left","center","right"]}}},"LinkedPropertyConfig":{"type":"object","description":"Body of {\"linked_property\": {...}}: shows a property of the related record as is.","additionalProperties":false,"properties":{"relation_property":{"type":"string"},"relation_property_id":{"type":"string"},"relation_property_name":{"type":"string"},"linked_property":{"type":"string"},"linked_property_id":{"type":"string"},"linked_property_name":{"type":"string"},"property":{"type":"string"},"property_id":{"type":"string"},"rollup_property_id":{"type":"string"}}},"DatabaseView":{"type":"object","required":["object","id","database_id","name","type","is_default"],"additionalProperties":true,"properties":{"object":{"const":"database_view"},"id":{"type":"string"},"database_id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["table","list","board","gallery","calendar","chart","form","edit_form"]},"is_default":{"type":"boolean"},"filter":{"type":["object","null"],"additionalProperties":true},"filter_ast":{"type":"object","additionalProperties":true},"sorts":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseViewSort"}},"grouping":{"type":["object","null"],"properties":{"property":{"type":"string"},"property_name":{"type":"string"}}},"property_layout":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseViewColumn"}},"layout":{"type":"object","additionalProperties":true},"created_time":{"type":"string","format":"date-time"},"last_edited_time":{"type":"string","format":"date-time"}}},"DatabaseViewSort":{"type":"object","required":["property","direction"],"properties":{"property":{"type":"string"},"property_name":{"type":["string","null"],"description":"Property name for reading; ignored on write."},"direction":{"enum":["ascending","descending"]}}},"DatabaseViewColumn":{"type":"object","required":["property"],"properties":{"property":{"type":"string"},"property_name":{"type":["string","null"],"description":"Property name for reading; ignored on write."},"width":{"type":"integer","minimum":40,"maximum":1200},"hidden":{"type":"boolean"}}},"DatabaseViewList":{"allOf":[{"$ref":"#/components/schemas/ObjectList"},{"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseView"}}}}]},"DatabaseViewDeleted":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"database_view"},"id":{"type":"string"},"deleted":{"const":true}}},"FileUploadRequest":{"type":"object","required":["parent","filename","content_type"],"properties":{"parent":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string"}}},"filename":{"type":"string"},"content_type":{"type":"string"},"size":{"type":"integer","minimum":0}}},"FileUploadResponse":{"type":"object","required":["upload_url","method","headers","file"],"properties":{"upload_url":{"type":"string"},"method":{"const":"PUT"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"file":{"$ref":"#/components/schemas/FileObject"}}}}},"paths":{"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"Get OpenAPI document","security":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/openapi/meta":{"get":{"operationId":"getOpenApiMeta","summary":"Get OpenAPI metadata","security":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiMeta"}}}}}}},"/search":{"post":{"operationId":"searchContent","summary":"Search content","security":[{"bearerAuth":[]}],"x-required-scopes":["search.read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/inflect-preview":{"post":{"operationId":"previewInflection","summary":"Preview mention inflection","description":"Показывает, в каком падеже и как склонится название страницы в упоминании после слов `before`. Ничего не сохраняет. Передайте одно название (title, gender, before) или до 50 названий в items; для items ответ — список.","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InflectionPreviewRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InflectionPreview"},{"$ref":"#/components/schemas/ObjectList"}]}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/semantic":{"post":{"operationId":"semanticSearch","summary":"Semantic search","security":[{"bearerAuth":[]}],"x-required-scopes":["search.read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticResultList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/me":{"get":{"operationId":"getCurrentIdentity","summary":"Get current identity","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotUser"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/user-plans":{"get":{"operationId":"listUserPlans","summary":"List user categories (plans)","description":"Public user categories with price, storage limit and features; `current` is the category of the token owner. Used to build the price list.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["object","results","current"],"properties":{"object":{"type":"string","enum":["list"]},"current":{"type":"string"},"results":{"type":"array","items":{"type":"object","required":["code","title","price_rub_month","storage_limit_bytes","collaboration","page_appearance","automation"],"properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"price_rub_month":{"type":"integer"},"storage_limit_bytes":{"type":"integer"},"collaboration":{"type":"boolean"},"page_appearance":{"type":"boolean"},"automation":{"type":"boolean"},"workspace_integrations":{"type":"boolean"}}}}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{user_id}":{"get":{"operationId":"getUser","summary":"Get user","security":[{"bearerAuth":[]}],"x-required-scopes":["users.read"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/User"},{"$ref":"#/components/schemas/BotUser"}]}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages":{"post":{"operationId":"createPage","summary":"Create page","description":"Blocks in children can be arranged side by side in columns: give consecutive top-level blocks the same column_group_id (any uuid) inside their type payload, with column_index 0,1,2… and optional column_ratio — see the BlockInput schema description.","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parent":{"$ref":"#/components/schemas/ParentInput"},"properties":{"type":"object","additionalProperties":true},"children":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/BlockInput"}},"icon":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"cover":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"}},"additionalProperties":false,"required":["properties"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{page_id}":{"get":{"operationId":"getPage","summary":"Get page","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePage","summary":"Update page","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parent":{"$ref":"#/components/schemas/ParentInput"},"properties":{"type":"object","additionalProperties":true},"children":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/BlockInput"}},"icon":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"cover":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"},"after_page_id":{"type":"string","format":"uuid"},"before_page_id":{"type":"string","format":"uuid"}},"additionalProperties":false,"description":"Pass parent to move the page to a new parent (page_id), to the workspace root (workspace: true) or into a database as a record (database_id); a record moves back into the tree with page_id / workspace and into another database with database_id. Moving requires write access to the page, to its current parent (or database) and to the destination. after_page_id / before_page_id position the page among the parent's children and cannot be combined with parent.database_id, because a record has no place in the tree. in_trash: false restores the page from trash. locked: true locks the page against edits, locked: false unlocks it; both need write access, and a request that only unlocks is the single change accepted for a locked page. To link another Vtorum page inline, put a mention span into rich_text: {\"type\":\"mention\",\"mention\":{\"type\":\"page\",\"page\":{\"id\":\"…\"}},\"plain_text\":\"Title\"}."}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePage","summary":"Delete page","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{page_id}/properties/{property_id}":{"get":{"operationId":"getPageProperty","summary":"Get page property","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"property_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"start_cursor","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PropertyItem"},{"$ref":"#/components/schemas/ObjectList"}]}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{page_id}/publication":{"get":{"operationId":"getPagePublication","summary":"Get page publication","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setPagePublication","summary":"Publish or unpublish a page","description":"Публикует объект (страницу, папку или базу) или снимает публикацию. Нужны права на изменение объекта. Не переданные настройки остаются прежними. У базы вместе с ней публикуются её записи.","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicationInput"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePagePublication","summary":"Unpublish a page","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pages/{page_id}/content/markdown":{"get":{"operationId":"getPageMarkdown","summary":"Read page Markdown","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read","blocks.read"],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Markdown"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/blocks/{block_id}":{"get":{"operationId":"getBlock","summary":"Get block","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.read"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateBlock","summary":"Update block","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.write"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Pass after_block_id / before_block_id to move the block next to a sibling on the same page, and/or parent_block_id (a block id, or null for the page root) to change nesting. Without a neighbour the block goes to the end of the target parent. Structural placement blocks (child_page, child_database, child_folder) accept only these move fields — repositioning one also reorders the navigation tree — while their content and in_trash stay read-only here. The type payload is merged into the stored one; set a payload key to null to remove it.","properties":{"parent_block_id":{"type":["string","null"],"format":"uuid"},"after_block_id":{"type":"string","format":"uuid"},"before_block_id":{"type":"string","format":"uuid"},"in_trash":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteBlock","summary":"Delete block","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.write"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/blocks/{block_id}/children":{"get":{"operationId":"getBlockChildren","summary":"Get block children","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.read"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"start_cursor","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"appendBlockChildren","summary":"Append block children","description":"Appending table_row blocks to a table block folds the rows into the table itself (the editor keeps rows inside the table block, not as child blocks) and returns the updated table block; after/before are not supported for table rows. table_row blocks are only accepted inside a table. Columns: arrange appended blocks side by side via column_group_id / column_index / column_ratio in each block payload — see the BlockInput schema description.","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.write"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["children"],"additionalProperties":false,"properties":{"children":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/BlockInput"}},"after":{"type":["string","null"]},"before":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/blocks/{block_id}/ai-request/run":{"post":{"operationId":"runAiRequestBlock","summary":"Execute AI request block","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.write"],"parameters":[{"name":"block_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ai-jobs/{job_id}":{"get":{"operationId":"getAiJob","summary":"Get AI job status and result","security":[{"bearerAuth":[]}],"x-required-scopes":["blocks.read"],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiJob"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/databases":{"post":{"operationId":"createDatabase","summary":"Create database","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parent":{"$ref":"#/components/schemas/ParentInput"},"title":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"description":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"properties":{"type":"object","description":"Keys name properties (name, external key or id). number, formula and rollup take decimals and align; number takes {format, decimals (0-10 digits after the decimal comma when shown), align (left|center|right)}. rollup and linked_property take the RollupPropertyConfig / LinkedPropertyConfig shapes: related fields may be given by name or id, unknown keys are rejected with 400. Pass name to rename an existing property; type settings are replaced only when their block is sent. unique: true (or false) makes values of the property unique across records — send it on the property object, e.g. {\"ИНН\": {\"unique\": true}}; it is merged into the current settings and returned as unique on the property. Enabling it over existing duplicates fails with 409 unique_duplicates; a repeated value fails with 409 unique_violation. Supported: title, rich_text, number, select, status, date, url, email, phone_number, relation. hidden: true (or false) hides the property from table columns, view cards and field pickers, as the \"hide property\" checkbox does; it is accepted the same ways as unique, merged into the settings, returned on every property and rejected with 400 for the title property. A type block sent without unique or hidden keeps their previous values.","additionalProperties":true},"icon":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"cover":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"},"is_inline":{"type":"boolean"},"after_page_id":{"type":"string"},"before_page_id":{"type":"string"}},"additionalProperties":false,"required":["properties"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/databases/{database_id}":{"get":{"operationId":"getDatabase","summary":"Get database","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.read"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateDatabase","summary":"Update database","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parent":{"$ref":"#/components/schemas/ParentInput"},"title":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"description":{"type":"array","items":{"$ref":"#/components/schemas/RichText"}},"properties":{"type":"object","description":"Keys name properties (name, external key or id). number, formula and rollup take decimals and align; number takes {format, decimals (0-10 digits after the decimal comma when shown), align (left|center|right)}. rollup and linked_property take the RollupPropertyConfig / LinkedPropertyConfig shapes: related fields may be given by name or id, unknown keys are rejected with 400. Pass name to rename an existing property; type settings are replaced only when their block is sent. unique: true (or false) makes values of the property unique across records — send it on the property object, e.g. {\"ИНН\": {\"unique\": true}}; it is merged into the current settings and returned as unique on the property. Enabling it over existing duplicates fails with 409 unique_duplicates; a repeated value fails with 409 unique_violation. Supported: title, rich_text, number, select, status, date, url, email, phone_number, relation. hidden: true (or false) hides the property from table columns, view cards and field pickers, as the \"hide property\" checkbox does; it is accepted the same ways as unique, merged into the settings, returned on every property and rejected with 400 for the title property. A type block sent without unique or hidden keeps their previous values.","additionalProperties":true},"icon":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"cover":{"anyOf":[{"$ref":"#/components/schemas/FileObject"},{"type":"object","additionalProperties":true},{"type":"null"}]},"in_trash":{"type":"boolean"},"locked":{"type":"boolean"},"is_inline":{"type":"boolean"},"after_page_id":{"type":"string"},"before_page_id":{"type":"string"}},"additionalProperties":false,"description":"locked: true locks the database against edits, locked: false unlocks it; both need write access, and a request that only unlocks is the single change accepted for a locked database. Pass parent (page_id or workspace: true) with optional after_page_id / before_page_id to move the database in the tree; write access to the current parent and to the destination is required."}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteDatabase","summary":"Delete database","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/databases/{database_id}/query":{"post":{"operationId":"queryDatabase","summary":"Query database","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.read"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseQueryRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/databases/{database_id}/views":{"get":{"operationId":"listDatabaseViews","summary":"List database views","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.read"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseViewList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createDatabaseView","summary":"Create database view","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"enum":["table","list","board","gallery","calendar","chart","form","edit_form"]},"filter":{"type":["object","null"],"additionalProperties":true},"sorts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DatabaseViewSort"}},"grouping":{"type":["object","null"],"properties":{"property":{"type":"string"}}},"property_layout":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DatabaseViewColumn"}},"layout":{"type":["object","null"],"description":"View settings as the app stores them. A chart view (type: chart) keeps its setup here: chart_type (bar | horizontal_bar | line | area | donut), category_property_id, date_granularity (auto | day | week | month | quarter | year), series_property_id, value_property_id (a numeric property or \"__count__\"), aggregation (count, count_values, count_unique, count_empty, count_not_empty, percent_empty, percent_not_empty, sum, average, median, min, max, range), sort (category_asc | category_desc | value_asc | value_desc), limit, include_empty, show_values, show_legend, show_grid, stacked, color_scheme (brand | teal | multicolor). row_color_property (name, key or id of a select, status or multi_select property) colours table rows by the chosen option. Form fields (form.fields, edit_form.edit.fields) of a relation property accept relation_filter: a query filter over the properties of the related database that limits which records can be chosen; the server re-checks each chosen record on submit. default_from {field, property} fills a field from the record chosen in another relation field of the form (field: that relation, property: a property of its database).","additionalProperties":true},"position":{"type":"object","description":"PATCH only: exactly one of after / before (a view id) or index (0-based).","properties":{"after":{"type":"string"},"before":{"type":"string"},"index":{"type":"integer","minimum":0}}}},"additionalProperties":false,"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseView"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/database-views/{view_id}":{"get":{"operationId":"getDatabaseView","summary":"Get database view","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.read"],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseView"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateDatabaseView","summary":"Update database view settings","description":"Filters and sorts use the same wording as the database query request. Passing null for filter, sorts, grouping, property_layout or layout clears that setting.","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"enum":["table","list","board","gallery","calendar","chart","form","edit_form"]},"filter":{"type":["object","null"],"additionalProperties":true},"sorts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DatabaseViewSort"}},"grouping":{"type":["object","null"],"properties":{"property":{"type":"string"}}},"property_layout":{"type":["array","null"],"items":{"$ref":"#/components/schemas/DatabaseViewColumn"}},"layout":{"type":["object","null"],"description":"View settings as the app stores them. A chart view (type: chart) keeps its setup here: chart_type (bar | horizontal_bar | line | area | donut), category_property_id, date_granularity (auto | day | week | month | quarter | year), series_property_id, value_property_id (a numeric property or \"__count__\"), aggregation (count, count_values, count_unique, count_empty, count_not_empty, percent_empty, percent_not_empty, sum, average, median, min, max, range), sort (category_asc | category_desc | value_asc | value_desc), limit, include_empty, show_values, show_legend, show_grid, stacked, color_scheme (brand | teal | multicolor). row_color_property (name, key or id of a select, status or multi_select property) colours table rows by the chosen option. Form fields (form.fields, edit_form.edit.fields) of a relation property accept relation_filter: a query filter over the properties of the related database that limits which records can be chosen; the server re-checks each chosen record on submit. default_from {field, property} fills a field from the record chosen in another relation field of the form (field: that relation, property: a property of its database).","additionalProperties":true},"position":{"type":"object","description":"PATCH only: exactly one of after / before (a view id) or index (0-based).","properties":{"after":{"type":"string"},"before":{"type":"string"},"index":{"type":"integer","minimum":0}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseView"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteDatabaseView","summary":"Delete database view","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseViewDeleted"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/databases/{database_id}/views/order":{"put":{"operationId":"reorderDatabaseViews","summary":"Set the order of database view tabs","description":"Listed views come first in the given order, the rest follow in their current order. The first view is the default one.","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["view_ids"],"properties":{"view_ids":{"type":"array","items":{"type":"string"},"minItems":1}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseViewList"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/database-views/{view_id}/default":{"post":{"operationId":"setDefaultDatabaseView","summary":"Make the view the default one","description":"The default view is the first one in the database order, so this moves the view to the front. A person who has already opened another view keeps seeing their own last choice.","security":[{"bearerAuth":[]}],"x-required-scopes":["databases.write"],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseView"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipelines":{"get":{"operationId":"listPipelines","summary":"List pipelines with the database properties and databases to pick sources from","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.read"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCatalog"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createPipeline","summary":"Create pipeline","description":"A definition with a code step requires the token owner to be an owner or admin of the workspace.","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplateWrite"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplateResponse"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipelines/{pipeline_id}":{"get":{"operationId":"getPipeline","summary":"Get pipeline with its definition","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.read"],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplateResponse"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updatePipeline","summary":"Update pipeline","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplateWrite"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineTemplateResponse"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePipeline","summary":"Delete pipeline","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipelines/code/test":{"post":{"operationId":"testPipelineCode","summary":"Run code step on sample data","description":"Executes the code in the same sandbox as the worker. Errors come back as ok: false with the console.log lines printed before the failure.","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCodeTestRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PipelineCodeTestResult"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/nodes/{node_id}/run-pipeline":{"post":{"operationId":"runPipeline","summary":"Run pipeline on a page or record","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["templateId"],"properties":{"templateId":{"type":"string"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/PipelineRun"}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/nodes/{node_id}/pipeline-runs":{"get":{"operationId":"listPipelineRuns","summary":"Last 50 runs over a page or record","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.read"],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/PipelineRun"}}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipeline-runs/{run_id}":{"get":{"operationId":"getPipelineRun","summary":"Run with its step journal","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.read"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/PipelineRun"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/PipelineRunStep"}}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipeline-runs/{run_id}/cancel":{"post":{"operationId":"cancelPipelineRun","summary":"Cancel a queued or running run","description":"A queued run will not start, a running one stops before its next step; completed steps are not rolled back. Disabling the pipeline cancels its queued runs too.","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/PipelineRun"}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/triggers":{"get":{"operationId":"listTriggers","summary":"List triggers with objects, properties and users to pick from","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.read"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Trigger"}},"objects":{"type":"array","items":{"type":"object","additionalProperties":true}},"properties":{"type":"array","items":{"type":"object","additionalProperties":true}},"users":{"type":"array","items":{"type":"object","additionalProperties":true}},"current_user_id":{"type":"string"}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTrigger","summary":"Create trigger","description":"Body keys are accepted in camelCase or snake_case.","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerWrite"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/triggers/{trigger_id}":{"patch":{"operationId":"updateTrigger","summary":"Update trigger","description":"Changes enabled, the bound pipeline, predicates, quiet period and hourly limit. Object, event and action are fixed: create another trigger instead.","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"pipelineTemplateId":{"type":"string"},"pipelineOldPredicate":{},"pipelineNewPredicate":{},"pipelineQuietSeconds":{"type":"integer","minimum":0,"maximum":86400},"pipelineHourlyLimit":{"type":"integer","minimum":1,"maximum":1000}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"trigger":{"$ref":"#/components/schemas/Trigger"}}}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteTrigger","summary":"Delete trigger","security":[{"bearerAuth":[]}],"x-required-scopes":["automation.write"],"parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/files/upload-url":{"post":{"operationId":"createFileUploadUrl","summary":"Create file upload URL","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/files/{file_id}":{"get":{"operationId":"getFile","summary":"Download file","description":"Stable download URL used by file objects across the API (AI job results, upload-url responses, block payloads). Responds with a 302 redirect to a short-lived signed storage URL. Accessible for files the token user uploaded and for files placed on pages the user can read.","security":[{"bearerAuth":[]}],"x-required-scopes":["pages.read"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to a short-lived signed storage URL"},"400":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Buildin-compatible error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}