{
  "openapi": "3.1.0",
  "info": {
    "title": "Zinkee Public API V2",
    "description": "Public API V2 documentation",
    "version": "2.0",
    "x-gitbook-description-document": {
      "object": "document",
      "data": {
        "schemaVersion": 9
      },
      "nodes": [
        {
          "object": "block",
          "type": "paragraph",
          "isVoid": false,
          "data": {},
          "nodes": [
            {
              "object": "text",
              "leaves": [
                {
                  "object": "leaf",
                  "text": "Public API V2 documentation",
                  "marks": []
                }
              ],
              "key": "qO5jZ1ce322C"
            }
          ],
          "key": "nXMqz6mxd2gF"
        }
      ],
      "key": "zkH6bNt6RNPv"
    },
    "x-gitbook-description-html": "<p>Public API V2 documentation</p>"
  },
  "servers": [
    {
      "url": "https://api-z2.zinkee.com",
      "description": "Production API"
    }
  ],
  "paths": {
    "/api/v2/automation-connections": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "List automation connections (v2)",
        "description": "Returns stored workspace connections. Secret values are never returned.",
        "operationId": "listAutomationConnectionsV2",
        "responses": {
          "200": {
            "description": "Automation connections retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AutomationConnectionV2SummaryResponse"
                  }
                },
                "example": [
                  {
                    "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
                    "name": "ERP API Key",
                    "type": "api_key",
                    "scope": "workspace",
                    "active": true,
                    "config": {
                      "headerName": "Authorization"
                    }
                  },
                  {
                    "id": "fb4e9b1e-7fa3-4f15-8f6f-d6a475f16b2f",
                    "name": "Workspace SMTP",
                    "type": "smtp",
                    "scope": "workspace",
                    "active": false,
                    "config": {
                      "host": "smtp.example.com",
                      "port": 587,
                      "security": "STARTTLS",
                      "fromEmail": "noreply@example.com",
                      "fromName": "Zinkee",
                      "status": "draft",
                      "lastTestStatus": "SUCCESS",
                      "lastTestAt": "2026-05-04T10:15:00Z"
                    }
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Automation connections retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns stored workspace connections. Secret values are never returned.",
                      "marks": []
                    }
                  ],
                  "key": "0K9lAWM8Zfzk"
                }
              ],
              "key": "WkhqJRRKNIqz"
            }
          ],
          "key": "nD490iZxOx9W"
        },
        "x-gitbook-description-html": "<p>Returns stored workspace connections. Secret values are never returned.</p>"
      },
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Create automation connection (v2)",
        "description": "Creates one stored workspace connection for `http_request` actions. Secret values are write-only.",
        "operationId": "createAutomationConnectionV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationConnectionV2CreateRequest"
              },
              "examples": {
                "SMTP draft": {
                  "description": "SMTP draft",
                  "value": {
                    "name": "Workspace SMTP Draft",
                    "type": "smtp",
                    "scope": "workspace",
                    "config": {},
                    "active": false
                  }
                },
                "SMTP verified": {
                  "description": "SMTP verified",
                  "value": {
                    "name": "ERP API Key",
                    "type": "api_key",
                    "scope": "workspace",
                    "config": {
                      "headerName": "Authorization"
                    },
                    "secret": {
                      "apiKey": "super-secret"
                    },
                    "active": true
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Automation connection created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                },
                "examples": {
                  "API key": {
                    "description": "API key",
                    "value": {
                      "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
                      "name": "ERP API Key",
                      "type": "api_key",
                      "scope": "workspace",
                      "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
                      "active": true,
                      "config": {
                        "headerName": "Authorization"
                      },
                      "createdAt": "2026-04-21T09:00:00Z",
                      "updatedAt": "2026-04-21T09:00:00Z",
                      "createdBy": "developer@example.com",
                      "updatedBy": "developer@example.com"
                    }
                  },
                  "SMTP draft": {
                    "description": "SMTP draft",
                    "value": {
                      "id": "fb4e9b1e-7fa3-4f15-8f6f-d6a475f16b2f",
                      "name": "Workspace SMTP Draft",
                      "type": "smtp",
                      "scope": "workspace",
                      "ownerMemberId": null,
                      "active": false,
                      "config": {
                        "status": "draft"
                      },
                      "createdAt": "2026-05-04T10:15:00Z",
                      "updatedAt": "2026-05-04T10:15:00Z",
                      "createdBy": "developer@example.com",
                      "updatedBy": "developer@example.com"
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection created successfully</p>"
          },
          "400": {
            "description": "Invalid connection payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid connection payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one stored workspace connection for ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "http_request",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " actions. Secret values are write-only.",
                      "marks": []
                    }
                  ],
                  "key": "F2c83eOqaOeQ"
                }
              ],
              "key": "plP0PelWPjRB"
            }
          ],
          "key": "P9PZmaRVtUl2"
        },
        "x-gitbook-description-html": "<p>Creates one stored workspace connection for <code>http_request</code> actions. Secret values are write-only.</p>"
      }
    },
    "/api/v2/automation-connections/{connectionId}": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get automation connection (v2)",
        "description": "Returns one stored connection. Secret values are never returned.",
        "operationId": "getAutomationConnectionV2",
        "responses": {
          "200": {
            "description": "Automation connection retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                },
                "example": {
                  "id": "fb4e9b1e-7fa3-4f15-8f6f-d6a475f16b2f",
                  "name": "Workspace SMTP",
                  "type": "smtp",
                  "scope": "workspace",
                  "ownerMemberId": null,
                  "active": true,
                  "config": {
                    "host": "smtp.example.com",
                    "port": 587,
                    "security": "STARTTLS",
                    "fromEmail": "noreply@example.com",
                    "fromName": "Zinkee",
                    "status": "verified",
                    "verifiedAt": "2026-05-04T10:15:30Z",
                    "lastTestStatus": "SUCCESS",
                    "lastTestAt": "2026-05-04T10:15:30Z"
                  },
                  "createdAt": "2026-05-04T10:15:00Z",
                  "updatedAt": "2026-05-04T10:15:30Z",
                  "createdBy": "developer@example.com",
                  "updatedBy": "developer@example.com"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns one stored connection. Secret values are never returned.",
                      "marks": []
                    }
                  ],
                  "key": "22NVYcrMCxcR"
                }
              ],
              "key": "ViX2iinqzgJ4"
            }
          ],
          "key": "kZIOHabgMxJt"
        },
        "x-gitbook-description-html": "<p>Returns one stored connection. Secret values are never returned.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Delete automation connection (v2)",
        "description": "Deletes one stored connection.",
        "operationId": "deleteAutomationConnectionV2",
        "responses": {
          "200": {
            "description": "Automation connection deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one stored connection.",
                      "marks": []
                    }
                  ],
                  "key": "nQ4yn7grQT2V"
                }
              ],
              "key": "sUXReOW4Pg3l"
            }
          ],
          "key": "xAG9T1BTWs9k"
        },
        "x-gitbook-description-html": "<p>Deletes one stored connection.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Patch automation connection (v2)",
        "description": "Patches one stored connection. Use `set.secret` only when rotating secrets.",
        "operationId": "patchAutomationConnectionV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationConnectionV2PatchRequest"
              },
              "example": {
                "set": {
                  "name": "ERP API Key Updated",
                  "config": {
                    "headerName": "Authorization"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Automation connection patched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                },
                "example": {
                  "id": "4fc20b5c-9353-4991-b68e-1027cb674ed4",
                  "name": "ERP API Key Updated",
                  "type": "api_key",
                  "scope": "workspace",
                  "ownerMemberId": "6c8a3e0d-7b1f-4c98-a2e9-8b9a2e3f5b14",
                  "active": true,
                  "config": {
                    "headerName": "Authorization"
                  },
                  "createdAt": "2026-04-21T09:00:00Z",
                  "updatedAt": "2026-04-21T10:15:00Z",
                  "createdBy": "developer@example.com",
                  "updatedBy": "developer@example.com"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection patched successfully</p>"
          },
          "400": {
            "description": "Invalid connection patch payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid connection patch payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Patches one stored connection. Use ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "set.secret",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " only when rotating secrets.",
                      "marks": []
                    }
                  ],
                  "key": "UNSX7oxIGFWD"
                }
              ],
              "key": "U0FS1DlON4bd"
            }
          ],
          "key": "JrZQKbZqR2au"
        },
        "x-gitbook-description-html": "<p>Patches one stored connection. Use <code>set.secret</code> only when rotating secrets.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automation-connections/{connectionId}:activate": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Activate automation connection (v2)",
        "description": "Activates one stored connection. SMTP activation requires successful verification.",
        "operationId": "activateAutomationConnectionV2",
        "responses": {
          "200": {
            "description": "Automation connection activated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection activated successfully</p>"
          },
          "400": {
            "description": "Connection cannot be activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection cannot be activated</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Activates one stored connection. SMTP activation requires successful verification.",
                      "marks": []
                    }
                  ],
                  "key": "K6g41nFj6aNc"
                }
              ],
              "key": "4WKl5forpQ6u"
            }
          ],
          "key": "JYaqDr4lCr67"
        },
        "x-gitbook-description-html": "<p>Activates one stored connection. SMTP activation requires successful verification.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automation-connections/{connectionId}:deactivate": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Deactivate automation connection (v2)",
        "description": "Deactivates one stored connection.",
        "operationId": "deactivateAutomationConnectionV2",
        "responses": {
          "200": {
            "description": "Automation connection deactivated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection deactivated successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deactivates one stored connection.",
                      "marks": []
                    }
                  ],
                  "key": "aRFviW503WLy"
                }
              ],
              "key": "tmqXXTma2bvA"
            }
          ],
          "key": "krh5k2hd9ZdD"
        },
        "x-gitbook-description-html": "<p>Deactivates one stored connection.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automation-connections/{connectionId}:test": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Test automation connection (v2)",
        "description": "Runs real SMTP verification for one stored connection and always returns the updated public state without secrets. Success sets verified metadata; failure returns `200` with failed test metadata and pending verification state.",
        "operationId": "testAutomationConnectionV2",
        "responses": {
          "200": {
            "description": "Automation connection test result returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationConnectionV2ResourceResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation connection test result returned</p>"
          },
          "400": {
            "description": "Invalid test request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid test request</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Connection not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Runs real SMTP verification for one stored connection and always returns the updated public state without secrets. Success sets verified metadata; failure returns ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "200",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " with failed test metadata and pending verification state.",
                      "marks": []
                    }
                  ],
                  "key": "drz7PEq4PUbc"
                }
              ],
              "key": "YV4GibAqRs6m"
            }
          ],
          "key": "1cw7AULcqvFM"
        },
        "x-gitbook-description-html": "<p>Runs real SMTP verification for one stored connection and always returns the updated public state without secrets. Success sets verified metadata; failure returns <code>200</code> with failed test metadata and pending verification state.</p>",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automation-folders": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "List automation folders (v2)",
        "description": "Returns the flat public folder projection over legacy workflow groups.",
        "operationId": "listAutomationFoldersV2",
        "responses": {
          "200": {
            "description": "Automation folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AutomationFolderV2Response"
                  }
                },
                "example": [
                  {
                    "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                    "name": "Codex Frontend Demo",
                    "isRoot": false,
                    "automationCount": 2
                  },
                  {
                    "id": "8b22282b-3db3-4dd7-87f7-b29365dcf3f6",
                    "name": null,
                    "isRoot": true,
                    "automationCount": 3
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Automation folders retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the flat public folder projection over legacy workflow groups.",
                      "marks": []
                    }
                  ],
                  "key": "PwH3JfrzcHnW"
                }
              ],
              "key": "kry9mHNEdNzd"
            }
          ],
          "key": "VyW6CNvB99Vq"
        },
        "x-gitbook-description-html": "<p>Returns the flat public folder projection over legacy workflow groups.</p>"
      },
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Create automation folder (v2)",
        "description": "Creates one flat automation folder.",
        "operationId": "createAutomationFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationFolderV2CreateRequest"
              },
              "example": {
                "name": "Codex Frontend Demo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Automation folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationFolderV2Response"
                },
                "example": {
                  "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                  "name": "Codex Frontend Demo",
                  "isRoot": false,
                  "automationCount": 0
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation folder created successfully</p>"
          },
          "400": {
            "description": "Invalid automation folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid automation folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one flat automation folder.",
                      "marks": []
                    }
                  ],
                  "key": "zTq6H1FofiuX"
                }
              ],
              "key": "sZPWkJg0Zue2"
            }
          ],
          "key": "wovwIaLg8Bsl"
        },
        "x-gitbook-description-html": "<p>Creates one flat automation folder.</p>"
      }
    },
    "/api/v2/automation-folders/automations:move": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Move automation to folder (v2)",
        "description": "Moves one automation into a target flat folder at an optional zero-based position.",
        "operationId": "moveAutomationToFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationFolderV2MoveAutomationRequest"
              },
              "example": {
                "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                "targetFolderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                "position": 1
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Automation moved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationFolderLocationV2Response"
                },
                "example": {
                  "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                  "name": "Codex Frontend Demo",
                  "isRoot": false
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation moved successfully</p>"
          },
          "400": {
            "description": "Invalid move payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid move payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder or automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder or automation not found</p>"
          }
        }
      }
    },
    "/api/v2/automation-folders/{folderId}": {
      "delete": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Delete automation folder (v2)",
        "description": "Deletes one non-root automation folder.",
        "operationId": "deleteAutomationFolderV2",
        "responses": {
          "200": {
            "description": "Automation folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationFolderV2Response"
                },
                "example": {
                  "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                  "name": "Codex Frontend Demo",
                  "isRoot": false,
                  "automationCount": 0
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation folder deleted successfully</p>"
          },
          "400": {
            "description": "Invalid delete request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid delete request</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one non-root automation folder.",
                      "marks": []
                    }
                  ],
                  "key": "v0RJOqPcSk55"
                }
              ],
              "key": "CRV8WumkLGks"
            }
          ],
          "key": "wmsheEvi91KF"
        },
        "x-gitbook-description-html": "<p>Deletes one non-root automation folder.</p>",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Patch automation folder (v2)",
        "description": "Updates the name and/or shared order of one automation folder.",
        "operationId": "patchAutomationFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationFolderV2PatchRequest"
              },
              "example": {
                "name": "Codex Frontend Demo Updated",
                "order": 2
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Automation folder patched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationFolderV2Response"
                },
                "example": {
                  "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                  "name": "Codex Frontend Demo Updated",
                  "isRoot": false,
                  "automationCount": 2
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation folder patched successfully</p>"
          },
          "400": {
            "description": "Invalid folder patch payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder patch payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automation-plugins": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "List automation plugins (v2)",
        "description": "Returns active workspace plugins available for `execute_plugin` actions.",
        "operationId": "listAutomationPluginsV2",
        "responses": {
          "200": {
            "description": "Automation plugins retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AutomationPluginV2Response"
                  }
                },
                "example": [
                  {
                    "id": "demo-plugin",
                    "name": "Demo Plugin",
                    "active": true,
                    "description": "Example plugin for automations",
                    "properties": {
                      "version": "1.0"
                    }
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Automation plugins retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns active workspace plugins available for ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "execute_plugin",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " actions.",
                      "marks": []
                    }
                  ],
                  "key": "ILaCxI0Mqit2"
                }
              ],
              "key": "3LCzJWxDJM62"
            }
          ],
          "key": "NREyiDMZe2OB"
        },
        "x-gitbook-description-html": "<p>Returns active workspace plugins available for <code>execute_plugin</code> actions.</p>"
      }
    },
    "/api/v2/automation-plugins/{pluginId}": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get automation plugin (v2)",
        "description": "Returns one active workspace plugin by id.",
        "operationId": "getAutomationPluginV2",
        "responses": {
          "200": {
            "description": "Automation plugin retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationPluginV2Response"
                },
                "example": {
                  "id": "demo-plugin",
                  "name": "Demo Plugin",
                  "active": true,
                  "description": "Example plugin for automations",
                  "properties": {
                    "version": "1.0"
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation plugin retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Plugin not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Plugin not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns one active workspace plugin by id.",
                      "marks": []
                    }
                  ],
                  "key": "4gvQQNrAjRWO"
                }
              ],
              "key": "wHD6hwE7qRQN"
            }
          ],
          "key": "Kr4ZJYhc2OeW"
        },
        "x-gitbook-description-html": "<p>Returns one active workspace plugin by id.</p>",
        "parameters": [
          {
            "name": "pluginId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/v2/automations": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "List automations (v2)",
        "description": "Returns automation summaries with optional filters by folder, status, trigger type, action type, plugin, and search.",
        "operationId": "listAutomationsV2",
        "responses": {
          "200": {
            "description": "Automation list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AutomationV2SummaryResponse"
                  }
                },
                "example": [
                  {
                    "id": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                    "name": "Codex Trigger Demo 1774278580",
                    "description": "Demo compleja no-webhook para revisar en frontend.",
                    "status": "active",
                    "folder": {
                      "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                      "name": "Codex Frontend Demo",
                      "isRoot": false
                    },
                    "triggerType": "record_changed",
                    "actionTypes": [
                      "create_record",
                      "http_request",
                      "execute_plugin",
                      "send_message",
                      "generate_document"
                    ]
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Automation list retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns automation summaries with optional filters by folder, status, trigger type, action type, plugin, and search.",
                      "marks": []
                    }
                  ],
                  "key": "f4tfyASqZNne"
                }
              ],
              "key": "TF6M673vjRZO"
            }
          ],
          "key": "VYaPjGoC1Z1l"
        },
        "x-gitbook-description-html": "<p>Returns automation summaries with optional filters by folder, status, trigger type, action type, plugin, and search.</p>",
        "parameters": [
          {
            "name": "folderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "triggerType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actionType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pluginId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Create automation (v2)",
        "description": "Creates one automation. Agents should provide a complete trigger and a frontend-meaningful configuration, not just a minimally valid payload.",
        "operationId": "createAutomationV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationV2CreateRequest"
              },
              "examples": {
                "Scheduled demo": {
                  "description": "Scheduled demo",
                  "value": {
                    "name": "Nightly invoice sync",
                    "description": "Runs every Monday morning",
                    "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                    "trigger": {
                      "type": "scheduled",
                      "config": {
                        "cronExpression": "0 15 10 * * 1"
                      }
                    }
                  }
                },
                "Record changed": {
                  "description": "Record changed",
                  "value": {
                    "name": "Order status demo",
                    "description": "Runs when order status changes",
                    "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                    "trigger": {
                      "type": "record_changed",
                      "config": {
                        "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                        "fieldIds": [
                          "4dd04e57-2a01-4c49-8728-9cb288bffb8d"
                        ],
                        "conditions": [
                          {
                            "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                            "comparator": "ine",
                            "values": [
                              {
                                "rawValue": "",
                                "source": null
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Automation created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2MutationResponse"
                },
                "examples": {
                  "Non-webhook trigger": {
                    "description": "Non-webhook trigger",
                    "value": {
                      "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                      "webhookEndpoint": null
                    }
                  },
                  "Webhook trigger (endpoint auto-created)": {
                    "description": "Webhook trigger (endpoint auto-created)",
                    "value": {
                      "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                      "webhookEndpoint": {
                        "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
                        "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                        "endpointUrl": "https://hooks.example.com/webhooks/00000000-0000-4000-8000-000000000001",
                        "active": true,
                        "idempotencyKeyJsonPath": "$.id",
                        "eventTypeJsonPath": "$.type",
                        "allowedEventTypes": [],
                        "fieldMappings": []
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation created successfully</p>"
          },
          "400": {
            "description": "Invalid automation payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid automation payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one automation. Agents should provide a complete trigger and a frontend-meaningful configuration, not just a minimally valid payload.",
                      "marks": []
                    }
                  ],
                  "key": "4GWHIasslGQ2"
                }
              ],
              "key": "pnGiaxDSWved"
            }
          ],
          "key": "yD32b2Sgi3NT"
        },
        "x-gitbook-description-html": "<p>Creates one automation. Agents should provide a complete trigger and a frontend-meaningful configuration, not just a minimally valid payload.</p>"
      }
    },
    "/api/v2/automations/{automationId}": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get automation (v2)",
        "description": "Returns the full public automation document including trigger, actions, and flow.",
        "operationId": "getAutomationV2",
        "responses": {
          "200": {
            "description": "Automation retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2ResourceResponse"
                },
                "example": {
                  "id": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "name": "Codex Trigger Demo 1774278580",
                  "description": "Demo compleja no-webhook para revisar en frontend.",
                  "status": "active",
                  "folder": {
                    "id": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f",
                    "name": "Codex Frontend Demo",
                    "isRoot": false
                  },
                  "trigger": {
                    "type": "record_changed",
                    "config": {
                      "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "fieldIds": [
                        "4dd04e57-2a01-4c49-8728-9cb288bffb8d"
                      ],
                      "conditions": [
                        {
                          "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                          "comparator": "ine",
                          "values": [
                            {
                              "rawValue": "",
                              "source": null
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "actions": [
                    {
                      "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                      "type": "create_record",
                      "name": "Create follow-up order",
                      "config": {
                        "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                        "fieldMapping": {
                          "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                            "rawValue": "Created by automation",
                            "source": null
                          }
                        }
                      }
                    },
                    {
                      "id": "784d0971-bd8f-4b05-87eb-3392d1570273",
                      "type": "http_request",
                      "name": "Notify ERP",
                      "config": {
                        "method": "POST",
                        "url": "https://example.com/integrations/order-status",
                        "headers": {
                          "X-Demo": "codex"
                        },
                        "body": "{\"event\":\"order.status.changed\"}",
                        "contentType": "application/json",
                        "timeoutMs": 5000,
                        "variables": {},
                        "authMode": "STORED",
                        "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
                      }
                    },
                    {
                      "id": "dae13307-057f-4c39-817c-4d2dd5898421",
                      "type": "execute_plugin",
                      "name": "Run billing plugin",
                      "config": {
                        "pluginId": "demo-plugin",
                        "pluginArgs": {
                          "mode": "safe"
                        }
                      }
                    }
                  ],
                  "flow": {
                    "entryActionIds": [
                      "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2"
                    ],
                    "transitions": [
                      {
                        "fromActionId": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                        "toActionId": "784d0971-bd8f-4b05-87eb-3392d1570273"
                      },
                      {
                        "fromActionId": "784d0971-bd8f-4b05-87eb-3392d1570273",
                        "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
                      }
                    ]
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the full public automation document including trigger, actions, and flow.",
                      "marks": []
                    }
                  ],
                  "key": "fqsQ9YTXjSkl"
                }
              ],
              "key": "TyeT2qHJM1se"
            }
          ],
          "key": "OV2X5AuNMNit"
        },
        "x-gitbook-description-html": "<p>Returns the full public automation document including trigger, actions, and flow.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Delete automation (v2)",
        "description": "Deletes one automation.",
        "operationId": "deleteAutomationV2",
        "responses": {
          "200": {
            "description": "Automation deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2MutationResponse"
                },
                "example": {
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "webhookEndpoint": null
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one automation.",
                      "marks": []
                    }
                  ],
                  "key": "Dy7CCsaG8F5l"
                }
              ],
              "key": "8TVD6GDQEPR7"
            }
          ],
          "key": "AcBPd0iGil6V"
        },
        "x-gitbook-description-html": "<p>Deletes one automation.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Patch automation metadata (v2)",
        "description": "Updates only top-level metadata. Supported patch paths: `name`, `description`, `folderId`.",
        "operationId": "patchAutomationV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationV2PatchRequest"
              },
              "example": {
                "set": {
                  "description": "Updated by an agent",
                  "folderId": "cdfc14e3-3169-4ffb-8d9b-b11858a9240f"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Automation patched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation patched successfully</p>"
          },
          "400": {
            "description": "Invalid patch payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid patch payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Updates only top-level metadata. Supported patch paths: ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "name",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ", ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "description",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ", ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "folderId",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ".",
                      "marks": []
                    }
                  ],
                  "key": "eL49iPN26VJP"
                }
              ],
              "key": "6JC6vo953Gea"
            }
          ],
          "key": "GfFQCGtBmcUs"
        },
        "x-gitbook-description-html": "<p>Updates only top-level metadata. Supported patch paths: <code>name</code>, <code>description</code>, <code>folderId</code>.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}/actions": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "List actions (v2)",
        "description": "Returns the ordered list of public actions for one automation.",
        "operationId": "listAutomationActionsV2",
        "responses": {
          "200": {
            "description": "Actions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AutomationActionV2Response"
                  }
                },
                "example": [
                  {
                    "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                    "type": "create_record",
                    "name": "Create follow-up order",
                    "config": {
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "fieldMapping": {
                        "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                          "rawValue": "Created by automation",
                          "source": null
                        }
                      }
                    }
                  },
                  {
                    "id": "623b41a1-2525-41bc-bc18-757ab146af59",
                    "type": "generate_document",
                    "name": "Generate invoice PDF",
                    "config": {
                      "documentTemplateId": "6c08673e-f8a6-44d2-8c91-d09eca911f8f",
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "targetFileFieldId": "c8edbde8-a361-4e9f-a39a-2e88971f21a7"
                    }
                  },
                  {
                    "id": "784d0971-bd8f-4b05-87eb-3392d1570273",
                    "type": "http_request",
                    "name": "Notify ERP",
                    "config": {
                      "method": "POST",
                      "url": "https://example.com/integrations/order-status",
                      "headers": {
                        "X-Demo": "codex"
                      },
                      "body": "{\"event\":\"order.status.changed\"}",
                      "contentType": "application/json",
                      "timeoutMs": 5000,
                      "variables": {},
                      "authMode": "STORED",
                      "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
                    }
                  },
                  {
                    "id": "dae13307-057f-4c39-817c-4d2dd5898421",
                    "type": "execute_plugin",
                    "name": "Run billing plugin",
                    "config": {
                      "pluginId": "demo-plugin",
                      "pluginArgs": {
                        "mode": "safe"
                      }
                    }
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Actions retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the ordered list of public actions for one automation.",
                      "marks": []
                    }
                  ],
                  "key": "xgYoE1WBtHNe"
                }
              ],
              "key": "NJsgGweBcL9U"
            }
          ],
          "key": "TJ6SoXkxSgMq"
        },
        "x-gitbook-description-html": "<p>Returns the ordered list of public actions for one automation.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Add action (v2)",
        "description": "Adds one action. For record-based actions, populate visible `fieldMapping` so the frontend form is complete.",
        "operationId": "addAutomationActionV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationActionV2CreateRequest"
              },
              "examples": {
                "Create record": {
                  "description": "Create record",
                  "value": {
                    "type": "create_record",
                    "name": "Create follow-up order",
                    "config": {
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "fieldMapping": {
                        "b013afec-21c8-4b0e-b3bf-5e4f7512e797": {
                          "rawValue": "2026-03-24T09:00:00.000Z",
                          "source": null
                        },
                        "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                          "rawValue": "Created by automation demo",
                          "source": null
                        }
                      }
                    }
                  }
                },
                "Update record": {
                  "description": "Update record",
                  "value": {
                    "type": "update_record",
                    "name": "Mark order as processed",
                    "config": {
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "useTriggerRecord": true,
                      "fieldMapping": {
                        "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                          "rawValue": "processed",
                          "source": null
                        }
                      },
                      "conditions": [
                        {
                          "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                          "comparator": "eq",
                          "values": [
                            {
                              "rawValue": "pending",
                              "source": null
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "Search records": {
                  "description": "Search records",
                  "value": {
                    "type": "search_records",
                    "name": "Find related invoices",
                    "config": {}
                  }
                },
                "Generate document": {
                  "description": "Generate document",
                  "value": {
                    "type": "generate_document",
                    "name": "Generate invoice PDF",
                    "config": {
                      "documentTemplateId": "6c08673e-f8a6-44d2-8c91-d09eca911f8f",
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "targetFileFieldId": "c8edbde8-a361-4e9f-a39a-2e88971f21a7"
                    }
                  }
                },
                "HTTP request": {
                  "description": "HTTP request",
                  "value": {
                    "type": "http_request",
                    "name": "Notify external ERP",
                    "config": {
                      "method": "POST",
                      "url": "https://example.com/integrations/order-status",
                      "headers": {
                        "X-Demo": "codex"
                      },
                      "body": "{\"event\":\"order.status.changed\"}",
                      "contentType": "application/json",
                      "timeoutMs": 5000,
                      "variables": {},
                      "authMode": "STORED",
                      "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
                    }
                  }
                },
                "Execute plugin": {
                  "description": "Execute plugin",
                  "value": {
                    "type": "execute_plugin",
                    "name": "Run billing plugin",
                    "config": {
                      "pluginId": "demo-plugin",
                      "pluginArgs": {
                        "mode": "safe",
                        "steps": [
                          "one",
                          "two"
                        ]
                      }
                    }
                  }
                },
                "Send message": {
                  "description": "Send message",
                  "value": {
                    "type": "send_message",
                    "name": "Notify customer",
                    "config": {
                      "fieldMapping": {
                        "recipients": {
                          "rawValue": "customer@example.com",
                          "source": null
                        },
                        "subject": {
                          "rawValue": "Your order status has changed",
                          "source": null
                        },
                        "body": {
                          "rawValue": "Hello, your order is now processed.",
                          "source": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Action created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Action created successfully</p>"
          },
          "400": {
            "description": "Invalid action payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid action payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Adds one action. For record-based actions, populate visible ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "fieldMapping",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " so the frontend form is complete.",
                      "marks": []
                    }
                  ],
                  "key": "lCdK2pJA5dJ7"
                }
              ],
              "key": "kzCT4qRdJIgC"
            }
          ],
          "key": "DQjuzoyQQ4Ae"
        },
        "x-gitbook-description-html": "<p>Adds one action. For record-based actions, populate visible <code>fieldMapping</code> so the frontend form is complete.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}/actions/{actionId}": {
      "put": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Update action (v2)",
        "description": "Replaces one action payload.",
        "operationId": "updateAutomationActionV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationActionV2PutRequest"
              },
              "examples": {
                "Create record": {
                  "description": "Create record",
                  "value": {
                    "type": "create_record",
                    "name": "Create follow-up order",
                    "config": {
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "fieldMapping": {
                        "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                          "rawValue": "Updated by an agent",
                          "source": null
                        }
                      }
                    }
                  }
                },
                "Generate document": {
                  "description": "Generate document",
                  "value": {
                    "type": "generate_document",
                    "name": "Generate invoice PDF",
                    "config": {
                      "documentTemplateId": "6c08673e-f8a6-44d2-8c91-d09eca911f8f",
                      "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "targetFileFieldId": "c8edbde8-a361-4e9f-a39a-2e88971f21a7"
                    }
                  }
                },
                "HTTP request": {
                  "description": "HTTP request",
                  "value": {
                    "type": "http_request",
                    "name": "Notify external ERP",
                    "config": {
                      "method": "POST",
                      "url": "https://example.com/integrations/order-status",
                      "headers": {
                        "X-Demo": "codex"
                      },
                      "body": "{\"event\":\"order.status.changed\"}",
                      "contentType": "application/json",
                      "timeoutMs": 5000,
                      "variables": {},
                      "authMode": "STORED",
                      "connectionId": "4fc20b5c-9353-4991-b68e-1027cb674ed4"
                    }
                  }
                },
                "Execute plugin": {
                  "description": "Execute plugin",
                  "value": {
                    "type": "execute_plugin",
                    "name": "Run billing plugin",
                    "config": {
                      "pluginId": "demo-plugin",
                      "pluginArgs": {
                        "mode": "safe"
                      }
                    }
                  }
                },
                "Send message": {
                  "description": "Send message",
                  "value": {
                    "type": "send_message",
                    "name": "Notify customer",
                    "config": {
                      "fieldMapping": {
                        "recipients": {
                          "rawValue": "customer@example.com",
                          "source": null
                        },
                        "subject": {
                          "rawValue": "Your order status has changed",
                          "source": null
                        },
                        "body": {
                          "rawValue": "Hello, your order is now processed.",
                          "source": null
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Action updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationActionV2Response"
                },
                "example": {
                  "id": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                  "type": "create_record",
                  "name": "Create follow-up order",
                  "config": {
                    "targetSchemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                    "fieldMapping": {
                      "34250412-f016-44c0-9f88-37dd1ddb4b13": {
                        "rawValue": "Updated by an agent",
                        "source": null
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Action updated successfully</p>"
          },
          "400": {
            "description": "Invalid action payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid action payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation or action not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation or action not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Replaces one action payload.",
                      "marks": []
                    }
                  ],
                  "key": "3G1VFe6BMvxu"
                }
              ],
              "key": "A75XSi2mTawC"
            }
          ],
          "key": "SccTSYpmuZ97"
        },
        "x-gitbook-description-html": "<p>Replaces one action payload.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Delete action (v2)",
        "description": "Deletes one action from the automation.",
        "operationId": "deleteAutomationActionV2",
        "responses": {
          "200": {
            "description": "Action deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2MutationResponse"
                },
                "example": {
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "webhookEndpoint": null
                }
              }
            },
            "x-gitbook-description-html": "<p>Action deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation or action not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation or action not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one action from the automation.",
                      "marks": []
                    }
                  ],
                  "key": "Elx5TPrvENIh"
                }
              ],
              "key": "rijq9Rx0DHb9"
            }
          ],
          "key": "B7pSaDWGmWDt"
        },
        "x-gitbook-description-html": "<p>Deletes one action from the automation.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}/flow": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get flow (v2)",
        "description": "Returns the public flow subresource.",
        "operationId": "getAutomationFlowV2",
        "responses": {
          "200": {
            "description": "Flow retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationFlowV2Response"
                },
                "example": {
                  "entryActionIds": [
                    "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2"
                  ],
                  "transitions": [
                    {
                      "fromActionId": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                      "toActionId": "784d0971-bd8f-4b05-87eb-3392d1570273"
                    },
                    {
                      "fromActionId": "784d0971-bd8f-4b05-87eb-3392d1570273",
                      "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
                    }
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Flow retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the public flow subresource.",
                      "marks": []
                    }
                  ],
                  "key": "Y8JVfedwBc63"
                }
              ],
              "key": "LeE0LUzlB3Zq"
            }
          ],
          "key": "Zhme9ajcwPka"
        },
        "x-gitbook-description-html": "<p>Returns the public flow subresource.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Replace flow (v2)",
        "description": "Replaces entry actions and transitions for the automation.\n\nPhase 1 flow semantics:\n- entryActionIds are trigger entry actions and may execute without ordering guarantees.\n- transitions can connect any action type to any action type.\n- transition children are dispatched after local parent action dispatch.\n- HTTP, plugin, and notification transitions do not wait for external completion.\n- graph references are not validated in this phase; runtime execution depth remains loop protection.\n",
        "operationId": "replaceAutomationFlowV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationFlowV2PutRequest"
              },
              "example": {
                "entryActionIds": [
                  "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2"
                ],
                "transitions": [
                  {
                    "fromActionId": "a657c49a-8ca1-4ec1-af86-d0dac4fc49b2",
                    "toActionId": "784d0971-bd8f-4b05-87eb-3392d1570273"
                  },
                  {
                    "fromActionId": "784d0971-bd8f-4b05-87eb-3392d1570273",
                    "toActionId": "dae13307-057f-4c39-817c-4d2dd5898421"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Flow replaced successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Flow replaced successfully</p>"
          },
          "400": {
            "description": "Invalid flow payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid flow payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Replaces entry actions and transitions for the automation.",
                      "marks": []
                    }
                  ],
                  "key": "VWHGVITDoHhP"
                }
              ],
              "key": "iPJUAe0EAHiZ"
            },
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Phase 1 flow semantics:",
                      "marks": []
                    }
                  ],
                  "key": "ur0IxMxm83sR"
                }
              ],
              "key": "zIZgeWkfEX61"
            },
            {
              "object": "block",
              "type": "list-unordered",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "entryActionIds are trigger entry actions and may execute without ordering guarantees.",
                              "marks": []
                            }
                          ],
                          "key": "345jnA2OZ0fS"
                        }
                      ],
                      "key": "Fr7udMqVIKxU"
                    }
                  ],
                  "key": "U7vKUYbR0soX"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "transitions can connect any action type to any action type.",
                              "marks": []
                            }
                          ],
                          "key": "noz4aefXX3U1"
                        }
                      ],
                      "key": "V0jPfJ5kqY8O"
                    }
                  ],
                  "key": "ifWtitpsOJ2m"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "transition children are dispatched after local parent action dispatch.",
                              "marks": []
                            }
                          ],
                          "key": "fibZuEJPCkPK"
                        }
                      ],
                      "key": "VMyOtqp5vR7r"
                    }
                  ],
                  "key": "QyZoTN17nVxS"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "HTTP, plugin, and notification transitions do not wait for external completion.",
                              "marks": []
                            }
                          ],
                          "key": "oWVlLCJzzC5I"
                        }
                      ],
                      "key": "myGSwxcXW1kS"
                    }
                  ],
                  "key": "xwBPQYMiDaDq"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "graph references are not validated in this phase; runtime execution depth remains loop protection.",
                              "marks": []
                            }
                          ],
                          "key": "sWLpTkDb0Zs8"
                        }
                      ],
                      "key": "Cgy7tZSrA6tE"
                    }
                  ],
                  "key": "bcMsz6dtOxmb"
                }
              ],
              "key": "qP1kSAQuT3Jo"
            }
          ],
          "key": "dyMyxdzR4vbl"
        },
        "x-gitbook-description-html": "<p>Replaces entry actions and transitions for the automation.</p><p>Phase 1 flow semantics:</p><ul><li>entryActionIds are trigger entry actions and may execute without ordering guarantees.</li><li>transitions can connect any action type to any action type.</li><li>transition children are dispatched after local parent action dispatch.</li><li>HTTP, plugin, and notification transitions do not wait for external completion.</li><li>graph references are not validated in this phase; runtime execution depth remains loop protection.</li></ul>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}/trigger": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get trigger (v2)",
        "description": "Returns the public trigger subresource.",
        "operationId": "getAutomationTriggerV2",
        "responses": {
          "200": {
            "description": "Trigger retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationTriggerV2Response"
                },
                "examples": {
                  "Scheduled": {
                    "description": "Scheduled",
                    "value": {
                      "type": "scheduled",
                      "config": {
                        "cronExpression": "0 15 10 * * 1"
                      }
                    }
                  },
                  "Record changed": {
                    "description": "Record changed",
                    "value": {
                      "type": "record_changed",
                      "config": {
                        "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                        "fieldIds": [
                          "4dd04e57-2a01-4c49-8728-9cb288bffb8d"
                        ],
                        "conditions": [
                          {
                            "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                            "comparator": "ine",
                            "values": [
                              {
                                "rawValue": "",
                                "source": null
                              }
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "Webhook": {
                    "description": "Webhook",
                    "value": {
                      "type": "webhook",
                      "config": {
                        "webhookEndpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
                        "endpointUrl": "https://hooks.example.com/webhooks/00000000-0000-4000-8000-000000000001"
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Trigger retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the public trigger subresource.",
                      "marks": []
                    }
                  ],
                  "key": "dYbAK7jomIJW"
                }
              ],
              "key": "ypTTfGs7P56W"
            }
          ],
          "key": "OH9iZRBDpvS2"
        },
        "x-gitbook-description-html": "<p>Returns the public trigger subresource.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Replace trigger (v2)",
        "description": "Replaces the automation trigger. For `record_created` and `record_changed`, agents should provide at least one meaningful condition for frontend-complete workflows.",
        "operationId": "replaceAutomationTriggerV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationTriggerV2PutRequest"
              },
              "examples": {
                "Scheduled": {
                  "description": "Scheduled",
                  "value": {
                    "type": "scheduled",
                    "config": {
                      "cronExpression": "0 15 10 * * 1"
                    }
                  }
                },
                "Record created": {
                  "description": "Record created",
                  "value": {
                    "type": "record_created",
                    "config": {
                      "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "conditions": [
                        {
                          "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                          "comparator": "ine",
                          "values": [
                            {
                              "rawValue": "",
                              "source": null
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "Record changed": {
                  "description": "Record changed",
                  "value": {
                    "type": "record_changed",
                    "config": {
                      "schemaId": "68d2c7be-4392-42de-b5ae-625ad79cfc3c",
                      "fieldIds": [
                        "4dd04e57-2a01-4c49-8728-9cb288bffb8d"
                      ],
                      "conditions": [
                        {
                          "field": "4dd04e57-2a01-4c49-8728-9cb288bffb8d",
                          "comparator": "ine",
                          "values": [
                            {
                              "rawValue": "",
                              "source": null
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "Webhook": {
                  "description": "Webhook",
                  "value": {
                    "type": "webhook",
                    "config": {
                      "webhookEndpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Trigger replaced successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Trigger replaced successfully</p>"
          },
          "400": {
            "description": "Invalid trigger payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid trigger payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Replaces the automation trigger. For ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "record_created",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": " and ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "record_changed",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ", agents should provide at least one meaningful condition for frontend-complete workflows.",
                      "marks": []
                    }
                  ],
                  "key": "9mgeBcrecHV0"
                }
              ],
              "key": "oP0zJsxQAQ4H"
            }
          ],
          "key": "3RT2TnGsPUKw"
        },
        "x-gitbook-description-html": "<p>Replaces the automation trigger. For <code>record_created</code> and <code>record_changed</code>, agents should provide at least one meaningful condition for frontend-complete workflows.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}/webhook-endpoint": {
      "get": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Get webhook endpoint (v2)",
        "description": "Returns the webhook endpoint companion resource for an automation.",
        "operationId": "getAutomationWebhookEndpointV2",
        "responses": {
          "200": {
            "description": "Webhook endpoint retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationWebhookEndpointV2Response"
                },
                "example": {
                  "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "endpointUrl": "https://hooks.example.com/webhooks/00000000-0000-4000-8000-000000000001",
                  "active": true,
                  "idempotencyKeyJsonPath": "$.id",
                  "eventTypeJsonPath": "$.type",
                  "allowedEventTypes": [
                    "frontend.demo.created"
                  ],
                  "fieldMappings": [
                    {
                      "variable": "external_id",
                      "jsonPath": "$.data.id"
                    }
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Webhook endpoint retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation or webhook endpoint not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation or webhook endpoint not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the webhook endpoint companion resource for an automation.",
                      "marks": []
                    }
                  ],
                  "key": "eFf20xNTllra"
                }
              ],
              "key": "I2mMIlwqOPE7"
            }
          ],
          "key": "y8pXxAlck3yF"
        },
        "x-gitbook-description-html": "<p>Returns the webhook endpoint companion resource for an automation.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Create or update webhook endpoint (v2)",
        "description": "Creates or updates the webhook endpoint companion resource.",
        "operationId": "saveAutomationWebhookEndpointV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationWebhookEndpointV2PutRequest"
              },
              "example": {
                "idempotencyKeyJsonPath": "$.id",
                "eventTypeJsonPath": "$.type",
                "allowedEventTypes": [
                  "frontend.demo.created"
                ],
                "fieldMappings": [
                  {
                    "variable": "external_id",
                    "jsonPath": "$.data.id"
                  }
                ],
                "active": true
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Webhook endpoint saved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationWebhookEndpointV2Response"
                },
                "example": {
                  "endpointId": "b3cb4283-97ab-4d94-9e6f-82d0ee5cee24",
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "endpointUrl": "https://hooks.example.com/webhooks/00000000-0000-4000-8000-000000000001",
                  "active": true,
                  "idempotencyKeyJsonPath": "$.id",
                  "eventTypeJsonPath": "$.type",
                  "allowedEventTypes": [
                    "frontend.demo.created"
                  ],
                  "fieldMappings": [
                    {
                      "variable": "external_id",
                      "jsonPath": "$.data.id"
                    }
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Webhook endpoint saved successfully</p>"
          },
          "400": {
            "description": "Invalid webhook endpoint payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid webhook endpoint payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates or updates the webhook endpoint companion resource.",
                      "marks": []
                    }
                  ],
                  "key": "GUzI9oJstCQ9"
                }
              ],
              "key": "QSFwG5ZXgGka"
            }
          ],
          "key": "FNk0mg6mbzsO"
        },
        "x-gitbook-description-html": "<p>Creates or updates the webhook endpoint companion resource.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Delete webhook endpoint (v2)",
        "description": "Deletes the webhook endpoint companion resource.",
        "operationId": "deleteAutomationWebhookEndpointV2",
        "responses": {
          "200": {
            "description": "Webhook endpoint deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Webhook endpoint deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation or webhook endpoint not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation or webhook endpoint not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes the webhook endpoint companion resource.",
                      "marks": []
                    }
                  ],
                  "key": "Fy4G9zJbHjnr"
                }
              ],
              "key": "P15FVB1FoL6f"
            }
          ],
          "key": "PHVU0oR5jRtS"
        },
        "x-gitbook-description-html": "<p>Deletes the webhook endpoint companion resource.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}:activate": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Activate automation (v2)",
        "description": "Transitions one automation to `active`.",
        "operationId": "activateAutomationV2",
        "responses": {
          "200": {
            "description": "Automation activated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2MutationResponse"
                },
                "example": {
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "webhookEndpoint": null
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation activated successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Transitions one automation to ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "active",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ".",
                      "marks": []
                    }
                  ],
                  "key": "U3eBAkpPXMGx"
                }
              ],
              "key": "P7AUxK4jtCM8"
            }
          ],
          "key": "6UW5xnxAjSxC"
        },
        "x-gitbook-description-html": "<p>Transitions one automation to <code>active</code>.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/automations/{automationId}:deactivate": {
      "post": {
        "tags": [
          "v2-automations"
        ],
        "summary": "Deactivate automation (v2)",
        "description": "Transitions one automation to `inactive`.",
        "operationId": "deactivateAutomationV2",
        "responses": {
          "200": {
            "description": "Automation deactivated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationV2MutationResponse"
                },
                "example": {
                  "automationId": "d2df2478-2513-4ecb-a2aa-2cea8c3d614a",
                  "webhookEndpoint": null
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation deactivated successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Automation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Automation not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Transitions one automation to ",
                      "marks": []
                    },
                    {
                      "object": "leaf",
                      "text": "inactive",
                      "marks": [
                        {
                          "object": "mark",
                          "type": "code",
                          "data": {}
                        }
                      ]
                    },
                    {
                      "object": "leaf",
                      "text": ".",
                      "marks": []
                    }
                  ],
                  "key": "Q2YBFTnCdVZI"
                }
              ],
              "key": "sKOx9DLV1EDC"
            }
          ],
          "key": "AzhrlyVCek4b"
        },
        "x-gitbook-description-html": "<p>Transitions one automation to <code>inactive</code>.</p>",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v2/displays": {
      "get": {
        "tags": [
          "v2-displays"
        ],
        "summary": "List displays (v2)",
        "description": "Returns a compact display list.",
        "operationId": "listDisplaysV2",
        "responses": {
          "200": {
            "description": "Display list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DisplayV2SummaryResponse"
                  }
                },
                "example": [
                  {
                    "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
                    "name": "Executive Revenue",
                    "description": "Executive revenue overview.",
                    "layoutTemplate": "widget_row_tabs",
                    "variableCount": 3,
                    "widgetCount": 6,
                    "folder": {
                      "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                      "name": "📊 Executive",
                      "isRoot": false
                    }
                  },
                  {
                    "id": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
                    "name": "Sales Pipeline",
                    "layoutTemplate": "freeform",
                    "variableCount": 1,
                    "widgetCount": 3,
                    "folder": {
                      "id": "a0b1c2d3-e4f5-4061-8273-8495a6b7c8d9",
                      "name": null,
                      "isRoot": true
                    }
                  },
                  {
                    "id": "ef012345-6789-4abc-8def-0123456789ab",
                    "name": "Customer Detail",
                    "layoutTemplate": "grid",
                    "variableCount": 0,
                    "widgetCount": 2,
                    "folder": {
                      "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                      "name": "📊 Executive",
                      "isRoot": false
                    }
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Display list retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns a compact display list.",
                      "marks": []
                    }
                  ],
                  "key": "IW698A76413R"
                }
              ],
              "key": "zs0HJAtFIocP"
            }
          ],
          "key": "lZ3nUQgABV58"
        },
        "x-gitbook-description-html": "<p>Returns a compact display list.</p>"
      },
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create display (v2)",
        "description": "Creates an empty display container with a required shared layout template so clients can compose it progressively. Freeform displays may also include layout.freeformLayouts in the initial request.",
        "operationId": "createDisplayV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2CreateRequest"
              },
              "examples": {
                "Freeform layout": {
                  "description": "Freeform layout",
                  "value": {
                    "name": "Control Proyecto Freeform",
                    "description": "Project control dashboard.",
                    "layout": {
                      "template": "freeform",
                      "freeformLayouts": {
                        "lg": [
                          {
                            "i": "widget-1",
                            "x": 0,
                            "y": 0,
                            "w": 6,
                            "h": 5
                          }
                        ]
                      }
                    }
                  }
                },
                "Tabbed layout": {
                  "description": "Tabbed layout",
                  "value": {
                    "name": "Executive Revenue",
                    "layout": {
                      "template": "widget_row_tabs"
                    }
                  }
                },
                "Grid layout": {
                  "description": "Grid layout",
                  "value": {
                    "name": "Customer Detail",
                    "layout": {
                      "template": "grid"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Display created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2MutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
                }
              }
            },
            "x-gitbook-description-html": "<p>Display created successfully</p>"
          },
          "400": {
            "description": "Invalid display create payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display create payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates an empty display container with a required shared layout template so clients can compose it progressively. Freeform displays may also include layout.freeformLayouts in the initial request.",
                      "marks": []
                    }
                  ],
                  "key": "OAdFKz2EYIIK"
                }
              ],
              "key": "mGSmOBDbfeEp"
            }
          ],
          "key": "a3DdIrWlxt2b"
        },
        "x-gitbook-description-html": "<p>Creates an empty display container with a required shared layout template so clients can compose it progressively. Freeform displays may also include layout.freeformLayouts in the initial request.</p>"
      }
    },
    "/api/v2/displays/{displayId}": {
      "get": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Get display (v2)",
        "operationId": "getDisplayV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Display retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2ResourceResponse"
                },
                "example": {
                  "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "name": "Executive Revenue",
                  "description": "Executive revenue overview.",
                  "layout": {
                    "template": "widget_row_tabs",
                    "freeformLayouts": null,
                    "slots": null,
                    "tabs": [
                      {
                        "id": "tab-main",
                        "name": "Overview",
                        "orientation": "horizontal",
                        "widgetIds": [
                          "11111111-1111-4111-a111-111111111111",
                          "22222222-2222-4222-a222-222222222222",
                          "33333333-3333-4333-a333-333333333333"
                        ]
                      },
                      {
                        "id": "tab-detail",
                        "name": "Detail",
                        "orientation": "horizontal",
                        "widgetIds": [
                          "44444444-4444-4444-a444-444444444444",
                          "55555555-5555-4555-a555-555555555555",
                          "66666666-6666-4666-a666-666666666666"
                        ]
                      }
                    ]
                  },
                  "variables": [
                    {
                      "id": "aaaaaaaa-1111-4111-a111-111111111111",
                      "type": "REFERENCE",
                      "name": "Customer",
                      "source": {
                        "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                      },
                      "defaultValue": "",
                      "allowMultiple": false,
                      "staticVariable": false,
                      "filters": []
                    },
                    {
                      "id": "bbbbbbbb-2222-4222-a222-222222222222",
                      "type": "DATE",
                      "name": "Period",
                      "date": {
                        "mode": "dynamic",
                        "dynamicOption": "thisMonth"
                      }
                    },
                    {
                      "id": "cccccccc-3333-4333-a333-333333333333",
                      "type": "MEMBER",
                      "name": "Owner",
                      "defaultValue": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
                      "allowMultiple": false,
                      "staticVariable": false
                    }
                  ],
                  "widgets": [
                    {
                      "id": "11111111-1111-4111-a111-111111111111",
                      "type": "TABLE_OR_SUBTABLE",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 0,
                          "w": 12,
                          "h": 8
                        }
                      },
                      "presentation": {
                        "name": "Customers",
                        "description": "All customers",
                        "icon": "users",
                        "color": "blue"
                      },
                      "bindings": {
                        "variableMap": {
                          "aaaaaaaa-1111-4111-a111-111111111111": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      },
                      "query": {
                        "filters": [],
                        "sorts": [
                          {
                            "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "direction": "ASC"
                          }
                        ]
                      },
                      "behavior": {
                        "readOnly": false,
                        "hideAddButton": false,
                        "hideDeleteButton": false
                      },
                      "view": {
                        "fields": [
                          "id",
                          "contact-name",
                          "status",
                          "amount"
                        ],
                        "columnSize": {
                          "contact-name": 240
                        }
                      }
                    },
                    {
                      "id": "22222222-2222-4222-a222-222222222222",
                      "type": "CHART",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 8,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Revenue by month"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "chart": {
                        "chartType": "bars",
                        "xAxisFieldId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "xAxisDateFormat": "MONTH_YEAR",
                        "xAxisAsTimeSerie": true,
                        "yAxisSeries": [
                          {
                            "typeCalc": "SUM",
                            "fieldCalc": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                            "color": "#4B9CD3",
                            "axisType": "PRIMARY"
                          }
                        ],
                        "legend": {
                          "position": "bottom"
                        }
                      }
                    },
                    {
                      "id": "33333333-3333-4333-a333-333333333333",
                      "type": "KPI",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 6,
                          "y": 8,
                          "w": 3,
                          "h": 3
                        }
                      },
                      "presentation": {
                        "name": "Total revenue"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "kpi": {
                        "typeCalc": "SUM",
                        "fieldCalc": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                        "config": {
                          "format": "currency",
                          "decimals": 2
                        }
                      }
                    },
                    {
                      "id": "44444444-4444-4444-a444-444444444444",
                      "type": "DETAIL",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 0,
                          "w": 6,
                          "h": 10
                        }
                      },
                      "presentation": {
                        "name": "Customer detail"
                      },
                      "bindings": {
                        "variableMap": {
                          "aaaaaaaa-1111-4111-a111-111111111111": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {
                        "readOnly": true
                      },
                      "view": {
                        "fields": [
                          "contact-name",
                          "contact-email",
                          "status",
                          "amount",
                          "due-date"
                        ]
                      }
                    },
                    {
                      "id": "55555555-5555-4555-a555-555555555555",
                      "type": "TIMELINE",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 6,
                          "y": 0,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Customer schedule"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                          "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
                        ],
                        "viewAdditionalProperties": {
                          "viewState": {
                            "fieldMapping": {
                              "startDateField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "endDateField": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012",
                              "labelField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "groupField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "subgroupField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "progressField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "cardConfig": {
                                "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                                "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                                "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                                "category4Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                                "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                              }
                            },
                            "granularity": "month",
                            "sidebarWidth": 300,
                            "visibleFields": [],
                            "collapsedGroups": [],
                            "collapsedSubgroups": [],
                            "showUngroupedEvents": true,
                            "showUnsubgroupedEvents": true
                          }
                        }
                      }
                    },
                    {
                      "id": "66666666-6666-4666-a666-666666666666",
                      "type": "KANBAN",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 6,
                          "y": 6,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Status board"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                          "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
                        ],
                        "viewAdditionalProperties": {
                          "viewState": {
                            "fieldMapping": {
                              "columnField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "swimlaneField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "cardConfig": {
                                "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                                "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                                "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                                "category3Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                                "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                              },
                              "aggregationConfig": {
                                "method": "sum",
                                "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                              }
                            },
                            "columnOrder": [],
                            "hiddenColumns": [],
                            "collapsedColumns": [],
                            "hideEmptyColumns": false,
                            "showNoValueColumn": true,
                            "collapsedSwimlanes": [],
                            "showNoValueSwimlane": true
                          }
                        }
                      }
                    },
                    {
                      "id": "77777777-7777-4777-a777-777777777777",
                      "type": "HIERARCHY",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 12,
                          "w": 12,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Org tree"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                        ],
                        "hierarchyConfig": {
                          "columns": {
                            "label": "Name",
                            "infos": [
                              {
                                "id": "col_1779975207355_zfndknslw",
                                "name": "Status"
                              },
                              {
                                "id": "col_1779975243018_qm4t7xb2pa",
                                "name": "Description"
                              }
                            ],
                            "numbers": [
                              {
                                "id": "col_1779975261490_h8kd3nv9ws",
                                "name": "Total amount",
                                "aggregation": "SUM"
                              }
                            ]
                          },
                          "rootLevel": {
                            "name": "Customers",
                            "labelFieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "infoMappings": [
                              {
                                "columnId": "col_1779975207355_zfndknslw",
                                "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                              }
                            ],
                            "numberMappings": [
                              {
                                "columnId": "col_1779975261490_h8kd3nv9ws",
                                "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                              }
                            ]
                          },
                          "childLevels": [
                            {
                              "name": "Projects",
                              "schemaId": "3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f",
                              "childFieldId": "80deefae-af3d-4000-b322-bfe1594f8073",
                              "labelFieldId": "50dbef0b-7e0a-4fdd-8019-8fb9281f5d70",
                              "infoMappings": [
                                {
                                  "columnId": "col_1779975243018_qm4t7xb2pa",
                                  "fieldId": "60dcef0c-8f1b-4eee-9120-9fc0392f6e71"
                                }
                              ],
                              "numberMappings": [
                                {
                                  "columnId": "col_1779975261490_h8kd3nv9ws",
                                  "fieldId": "70ddef0d-9f2c-4fff-a221-afd0493f7f72"
                                }
                              ]
                            },
                            {
                              "name": "Tasks",
                              "schemaId": "4fdadefa-8f1b-4eee-9120-9fc0392f6e7f",
                              "childFieldId": "a1e1607b-bf4e-4010-8423-cff269508074",
                              "labelFieldId": "90ef60fc-af3d-4fff-b322-bfe1594f8073",
                              "infoMappings": [],
                              "numberMappings": [
                                {
                                  "columnId": "col_1779975261490_h8kd3nv9ws",
                                  "fieldId": "b1e26170-cf5f-4020-9524-dff36a619075"
                                }
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ],
                  "crossWidgetFilter": [
                    {
                      "sourceWidget": {
                        "widgetId": "11111111-1111-4111-a111-111111111111",
                        "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                      },
                      "targetWidgets": [
                        {
                          "widgetId": "22222222-2222-4222-a222-222222222222",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        },
                        {
                          "widgetId": "33333333-3333-4333-a333-333333333333",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      ]
                    }
                  ],
                  "navigationTargets": [
                    {
                      "id": "nav-target-customer",
                      "sourceWidgetId": "11111111-1111-4111-a111-111111111111",
                      "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
                      "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111",
                      "label": "Open customer"
                    }
                  ],
                  "folder": {
                    "id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                    "name": "📊 Executive",
                    "isRoot": false
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Display retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Display not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Display not found</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display core fields (v2)",
        "description": "Patches core shared display fields such as the display name and description. Send description=null or a blank string to clear it.",
        "operationId": "patchDisplayV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2PatchRequest"
              },
              "example": {
                "name": "Pipeline overview (renamed)",
                "description": "Pipeline health and current opportunities."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Display updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2MutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260"
                }
              }
            },
            "x-gitbook-description-html": "<p>Display updated successfully</p>"
          },
          "400": {
            "description": "Invalid display patch payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display patch payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      },
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display (v2)",
        "description": "Deletes one display and returns its identifier.",
        "operationId": "deleteDisplayV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete display (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2MutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/cross-widget-filter": {
      "put": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Upsert display cross widget filter (v2)",
        "operationId": "putDisplayCrossWidgetFilterV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DisplayV2CrossWidgetFilterPutRequest"
                }
              },
              "examples": {
                "Single configuration": {
                  "description": "Single configuration",
                  "value": [
                    {
                      "source": {
                        "widgetId": "11111111-1111-4111-a111-111111111111",
                        "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                      },
                      "targets": [
                        {
                          "widgetId": "22222222-2222-4222-a222-222222222222",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        },
                        {
                          "widgetId": "33333333-3333-4333-a333-333333333333",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      ]
                    }
                  ]
                },
                "Multiple independent configurations": {
                  "description": "Multiple independent configurations",
                  "value": [
                    {
                      "source": {
                        "widgetId": "11111111-1111-4111-a111-111111111111",
                        "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                      },
                      "targets": [
                        {
                          "widgetId": "22222222-2222-4222-a222-222222222222",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      ]
                    },
                    {
                      "source": {
                        "widgetId": "44444444-4444-4444-a444-444444444444",
                        "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                      },
                      "targets": [
                        {
                          "widgetId": "55555555-5555-4555-a555-555555555555",
                          "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                        }
                      ]
                    }
                  ]
                },
                "Hierarchy chain (a target is the source of the next)": {
                  "description": "Hierarchy chain (a target is the source of the next)",
                  "value": [
                    {
                      "source": {
                        "widgetId": "11111111-1111-4111-a111-111111111111",
                        "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                      },
                      "targets": [
                        {
                          "widgetId": "22222222-2222-4222-a222-222222222222",
                          "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      ]
                    },
                    {
                      "source": {
                        "widgetId": "22222222-2222-4222-a222-222222222222",
                        "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                      },
                      "targets": [
                        {
                          "widgetId": "33333333-3333-4333-a333-333333333333",
                          "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Cross widget filter saved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Cross widget filter saved successfully</p>"
          },
          "400": {
            "description": "Invalid cross widget filter payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid cross widget filter payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      },
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display cross widget filter (v2)",
        "operationId": "deleteDisplayCrossWidgetFilterV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cross widget filter deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Cross widget filter deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/navigation-targets": {
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create display navigation target (v2)",
        "operationId": "createDisplayNavigationTargetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2NavigationTargetCreateRequest"
              },
              "examples": {
                "With label": {
                  "description": "With label",
                  "value": {
                    "sourceWidgetId": "11111111-1111-4111-a111-111111111111",
                    "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
                    "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111",
                    "label": "Open customer"
                  }
                },
                "Without label": {
                  "description": "Without label",
                  "value": {
                    "sourceWidgetId": "22222222-2222-4222-a222-222222222222",
                    "targetDisplayId": "ef012345-6789-4abc-8def-0123456789ab",
                    "targetVariableId": "aaaaaaaa-1111-4111-a111-111111111111"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Navigation target created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2NavigationTargetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "navigationTargetId": "nav-target-customer"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation target created successfully</p>"
          },
          "400": {
            "description": "Invalid navigation target payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid navigation target payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/navigation-targets/{navigationTargetId}": {
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display navigation target (v2)",
        "operationId": "deleteDisplayNavigationTargetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "navigationTargetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Navigation target deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2NavigationTargetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "navigationTargetId": "nav-target-customer"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation target deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display navigation target (v2)",
        "operationId": "patchDisplayNavigationTargetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "navigationTargetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2NavigationTargetPatchRequest"
              },
              "examples": {
                "Change label": {
                  "description": "Change label",
                  "value": {
                    "label": "Go to customer"
                  }
                },
                "Redirect to another display": {
                  "description": "Redirect to another display",
                  "value": {
                    "targetDisplayId": "6b7c8d9e-0f12-3456-789a-bcdef0123456",
                    "targetVariableId": "bbbbbbbb-2222-4222-a222-222222222222"
                  }
                },
                "Change source widget": {
                  "description": "Change source widget",
                  "value": {
                    "sourceWidgetId": "44444444-4444-4444-a444-444444444444"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Navigation target updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2NavigationTargetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "navigationTargetId": "nav-target-customer"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation target updated successfully</p>"
          },
          "400": {
            "description": "Invalid navigation target payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid navigation target payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/tabs": {
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create display tab (v2)",
        "operationId": "createDisplayTabV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2TabCreateRequest"
              },
              "examples": {
                "Horizontal tab": {
                  "description": "Horizontal tab",
                  "value": {
                    "name": "Overview",
                    "orientation": "horizontal"
                  }
                },
                "Vertical tab": {
                  "description": "Vertical tab",
                  "value": {
                    "name": "Details",
                    "orientation": "vertical"
                  }
                },
                "Unnamed tab": {
                  "description": "Unnamed tab",
                  "value": {
                    "orientation": "horizontal"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tab created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2TabMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "tabId": "tab-overview"
                }
              }
            },
            "x-gitbook-description-html": "<p>Tab created successfully</p>"
          },
          "400": {
            "description": "Invalid display tab payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display tab payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/tabs/{tabId}": {
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display tab (v2)",
        "operationId": "deleteDisplayTabV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tabId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tab deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2TabMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "tabId": "tab-main"
                }
              }
            },
            "x-gitbook-description-html": "<p>Tab deleted successfully</p>"
          },
          "400": {
            "description": "Invalid display tab id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display tab id</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display tab (v2)",
        "operationId": "patchDisplayTabV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tabId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2TabPatchRequest"
              },
              "examples": {
                "Rename tab": {
                  "description": "Rename tab",
                  "value": {
                    "name": "Overview (renamed)"
                  }
                },
                "Change orientation": {
                  "description": "Change orientation",
                  "value": {
                    "orientation": "vertical"
                  }
                },
                "Rename and reorient": {
                  "description": "Rename and reorient",
                  "value": {
                    "name": "Details",
                    "orientation": "vertical"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tab updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2TabMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "tabId": "tab-main"
                }
              }
            },
            "x-gitbook-description-html": "<p>Tab updated successfully</p>"
          },
          "400": {
            "description": "Invalid display tab payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display tab payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/variables": {
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create display variable (v2)",
        "description": "Creates a display context variable with a typed public contract and a backend-generated variable id. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.",
        "operationId": "createDisplayVariableV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2CreateVariableRequest"
              },
              "examples": {
                "Reference variable (single)": {
                  "description": "Reference variable (single)",
                  "value": {
                    "type": "REFERENCE",
                    "name": "Customer",
                    "source": {
                      "schemaId": "contacts",
                      "fieldId": "contact-name"
                    },
                    "defaultValue": "",
                    "allowMultiple": false,
                    "staticVariable": false,
                    "filters": []
                  }
                },
                "Reference variable (multi + filters)": {
                  "description": "Reference variable (multi + filters)",
                  "value": {
                    "type": "REFERENCE",
                    "name": "Active customers",
                    "source": {
                      "schemaId": "contacts",
                      "fieldId": "contact-name"
                    },
                    "defaultValues": [],
                    "allowMultiple": true,
                    "staticVariable": false,
                    "filters": [
                      {
                        "origin": {
                          "schemaId": "contacts",
                          "fieldId": "status"
                        },
                        "comparisonOperator": "ANY_OF",
                        "values": [
                          "1",
                          "2"
                        ]
                      }
                    ]
                  }
                },
                "Member variable": {
                  "description": "Member variable",
                  "value": {
                    "type": "MEMBER",
                    "name": "Owner",
                    "defaultValue": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d",
                    "allowMultiple": false,
                    "staticVariable": false
                  }
                },
                "Date variable (dynamic)": {
                  "description": "Date variable (dynamic)",
                  "value": {
                    "type": "DATE",
                    "name": "Period",
                    "date": {
                      "mode": "dynamic",
                      "dynamicOption": "thisMonth"
                    }
                  }
                },
                "Date variable (specific)": {
                  "description": "Date variable (specific)",
                  "value": {
                    "type": "DATE",
                    "name": "Cutoff",
                    "date": {
                      "mode": "specific",
                      "specificDate": "2026-04-22"
                    }
                  }
                },
                "Date variable (range)": {
                  "description": "Date variable (range)",
                  "value": {
                    "type": "DATE",
                    "name": "Quarter",
                    "date": {
                      "mode": "range",
                      "rangeStart": "2026-04-01",
                      "rangeEnd": "2026-06-30"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Variable created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2VariableMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Variable created successfully</p>"
          },
          "400": {
            "description": "Invalid variable payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid variable payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a display context variable with a typed public contract and a backend-generated variable id. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.",
                      "marks": []
                    }
                  ],
                  "key": "sGVVL0YTGW3M"
                }
              ],
              "key": "2lA7tGKc3D3p"
            }
          ],
          "key": "RpgfrcAzwQUq"
        },
        "x-gitbook-description-html": "<p>Creates a display context variable with a typed public contract and a backend-generated variable id. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.</p>"
      }
    },
    "/api/v2/displays/{displayId}/variables/{variableId}": {
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display variable (v2)",
        "operationId": "deleteDisplayVariableV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Variable deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2VariableMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Variable deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Variable not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Variable not found</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display variable (v2)",
        "description": "Patches a display variable using the typed public contract. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.",
        "operationId": "patchDisplayVariableV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2PatchVariableRequest"
              },
              "examples": {
                "Rename + make static": {
                  "description": "Rename + make static",
                  "value": {
                    "name": "Proyecto principal",
                    "staticVariable": true,
                    "defaultValues": []
                  }
                },
                "Change reference filters": {
                  "description": "Change reference filters",
                  "value": {
                    "filters": [
                      {
                        "origin": {
                          "schemaId": "contacts",
                          "fieldId": "status"
                        },
                        "comparisonOperator": "ANY_OF",
                        "values": [
                          "2",
                          "3"
                        ]
                      }
                    ]
                  }
                },
                "Switch to multi-select": {
                  "description": "Switch to multi-select",
                  "value": {
                    "allowMultiple": true,
                    "defaultValues": []
                  }
                },
                "Update date option": {
                  "description": "Update date option",
                  "value": {
                    "date": {
                      "mode": "dynamic",
                      "dynamicOption": "last12Months"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Variable updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2VariableMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "variableId": "aaaaaaaa-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Variable updated successfully</p>"
          },
          "400": {
            "description": "Invalid variable patch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid variable patch</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Patches a display variable using the typed public contract. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.",
                      "marks": []
                    }
                  ],
                  "key": "txsqt7uwRmfz"
                }
              ],
              "key": "v7b3Cu4iz2WY"
            }
          ],
          "key": "IQVjKlmEyuSe"
        },
        "x-gitbook-description-html": "<p>Patches a display variable using the typed public contract. Variable source.schemaId accepts a schema UUID or schema slug. Variable source.fieldId accepts a field UUID or field slug from that source schema.</p>"
      }
    },
    "/api/v2/displays/{displayId}/widgets": {
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create widget (v2)",
        "description": "Creates a widget with a backend-generated widgetId using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.",
        "operationId": "createWidgetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2CreateWidgetRequest"
              },
              "examples": {
                "TABLE_OR_SUBTABLE": {
                  "description": "TABLE_OR_SUBTABLE",
                  "value": {
                    "type": "TABLE_OR_SUBTABLE",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 8
                      }
                    },
                    "presentation": {
                      "name": "Customers"
                    },
                    "bindings": {
                      "variableMap": {
                        "aaaaaaaa-1111-4111-a111-111111111111": "status"
                      }
                    },
                    "query": {
                      "sorts": [
                        {
                          "fieldId": "id",
                          "direction": "DESC"
                        }
                      ]
                    },
                    "view": {
                      "fields": [
                        "id",
                        "contact-name",
                        "status"
                      ]
                    }
                  }
                },
                "TABLE_OR_SUBTABLE (with columnSize)": {
                  "description": "TABLE_OR_SUBTABLE (with columnSize)",
                  "value": {
                    "type": "TABLE_OR_SUBTABLE",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 8
                      }
                    },
                    "presentation": {
                      "name": "Customers"
                    },
                    "view": {
                      "fields": [
                        "id",
                        "contact-name",
                        "status",
                        "amount"
                      ],
                      "columnSize": {
                        "contact-name": 240,
                        "status": 140,
                        "amount": 120
                      }
                    }
                  }
                },
                "TABLE_OR_SUBTABLE (locked fields)": {
                  "description": "TABLE_OR_SUBTABLE (locked fields)",
                  "value": {
                    "type": "TABLE_OR_SUBTABLE",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 8
                      }
                    },
                    "presentation": {
                      "name": "Invoices"
                    },
                    "view": {
                      "fields": [
                        "contact-name",
                        "invoice-number",
                        "status",
                        "amount"
                      ]
                    },
                    "behavior": {
                      "lockedFields": [
                        {
                          "field": {
                            "fieldId": "contact-name"
                          },
                          "conditions": []
                        },
                        {
                          "field": {
                            "fieldId": "status"
                          },
                          "conditions": [
                            {
                              "origin": {
                                "fieldId": "invoice-number"
                              },
                              "comparisonOperator": "IS_EMPTY",
                              "values": []
                            }
                          ],
                          "messageBeforeLock": "Status locks until the invoice number is set.",
                          "messageAfterLock": "Status is locked because the invoice number is missing."
                        }
                      ]
                    }
                  }
                },
                "DETAIL": {
                  "description": "DETAIL",
                  "value": {
                    "type": "DETAIL",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "tabId": "tab-detail",
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 6,
                        "h": 10
                      }
                    },
                    "presentation": {
                      "name": "Customer detail"
                    },
                    "bindings": {
                      "variableMap": {
                        "aaaaaaaa-1111-4111-a111-111111111111": "contact-name"
                      }
                    },
                    "query": {
                      "filters": []
                    },
                    "behavior": {
                      "readOnly": true
                    },
                    "view": {
                      "fields": [
                        "contact-name",
                        "contact-email",
                        "status",
                        "amount"
                      ]
                    }
                  }
                },
                "KPI": {
                  "description": "KPI",
                  "value": {
                    "type": "KPI",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 3,
                        "h": 3
                      }
                    },
                    "presentation": {
                      "name": "Total revenue"
                    },
                    "query": {
                      "filters": []
                    },
                    "kpi": {
                      "typeCalc": "SUM",
                      "fieldCalc": "amount",
                      "config": {
                        "format": "currency",
                        "decimals": 2
                      }
                    }
                  }
                },
                "CHART (by date)": {
                  "description": "CHART (by date)",
                  "value": {
                    "type": "CHART",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 8,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Revenue by day"
                    },
                    "query": {
                      "filters": []
                    },
                    "chart": {
                      "chartType": "lines",
                      "xAxisFieldId": "due-date",
                      "xAxisDateFormat": "DATE",
                      "xAxisAsTimeSerie": true,
                      "yAxisSeries": [
                        {
                          "typeCalc": "SUM",
                          "fieldCalc": "amount",
                          "color": "#4B9CD3",
                          "axisType": "PRIMARY"
                        }
                      ],
                      "legend": {
                        "position": "bottom"
                      }
                    }
                  }
                },
                "CHART (by month)": {
                  "description": "CHART (by month)",
                  "value": {
                    "type": "CHART",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 8,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Revenue by month"
                    },
                    "query": {
                      "filters": []
                    },
                    "chart": {
                      "chartType": "bars",
                      "xAxisFieldId": "due-date",
                      "xAxisDateFormat": "MONTH_YEAR",
                      "xAxisAsTimeSerie": true,
                      "yAxisSeries": [
                        {
                          "typeCalc": "SUM",
                          "fieldCalc": "amount",
                          "color": "#4B9CD3",
                          "axisType": "PRIMARY"
                        },
                        {
                          "typeCalc": "COUNT",
                          "fieldCalc": "id",
                          "color": "#E57373",
                          "axisType": "SECONDARY"
                        }
                      ],
                      "legend": {
                        "position": "bottom"
                      }
                    }
                  }
                },
                "CHART (by quarter)": {
                  "description": "CHART (by quarter)",
                  "value": {
                    "type": "CHART",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 8,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Revenue by quarter"
                    },
                    "query": {
                      "filters": []
                    },
                    "chart": {
                      "chartType": "bars",
                      "xAxisFieldId": "due-date",
                      "xAxisDateFormat": "QUARTER_YEAR",
                      "xAxisAsTimeSerie": true,
                      "yAxisSeries": [
                        {
                          "typeCalc": "SUM",
                          "fieldCalc": "amount",
                          "color": "#4B9CD3",
                          "axisType": "PRIMARY"
                        }
                      ],
                      "legend": {
                        "position": "bottom"
                      }
                    }
                  }
                },
                "CHART (by year)": {
                  "description": "CHART (by year)",
                  "value": {
                    "type": "CHART",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 8,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Revenue by year"
                    },
                    "query": {
                      "filters": []
                    },
                    "chart": {
                      "chartType": "lines",
                      "xAxisFieldId": "due-date",
                      "xAxisDateFormat": "YEAR",
                      "xAxisAsTimeSerie": true,
                      "yAxisSeries": [
                        {
                          "typeCalc": "SUM",
                          "fieldCalc": "amount",
                          "color": "#4B9CD3",
                          "axisType": "PRIMARY"
                        }
                      ],
                      "legend": {
                        "position": "bottom"
                      }
                    }
                  }
                },
                "TIMELINE": {
                  "description": "TIMELINE",
                  "value": {
                    "type": "TIMELINE",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Customer schedule"
                    },
                    "query": {
                      "filters": []
                    },
                    "view": {
                      "fields": [
                        "contact-name",
                        "status",
                        "amount",
                        "due-date"
                      ],
                      "viewAdditionalProperties": {
                        "viewState": {
                          "fieldMapping": {
                            "startDateField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                            "endDateField": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012",
                            "labelField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "groupField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                            "subgroupField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "progressField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                            "cardConfig": {
                              "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "category4Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                            }
                          },
                          "granularity": "month",
                          "sidebarWidth": 300,
                          "visibleFields": [],
                          "collapsedGroups": [],
                          "collapsedSubgroups": [],
                          "showUngroupedEvents": true,
                          "showUnsubgroupedEvents": true
                        }
                      }
                    }
                  }
                },
                "KANBAN": {
                  "description": "KANBAN",
                  "value": {
                    "type": "KANBAN",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 8
                      }
                    },
                    "presentation": {
                      "name": "Status board"
                    },
                    "query": {
                      "filters": []
                    },
                    "view": {
                      "fields": [
                        "contact-name",
                        "status",
                        "amount",
                        "due-date"
                      ],
                      "viewAdditionalProperties": {
                        "viewState": {
                          "fieldMapping": {
                            "columnField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                            "swimlaneField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "cardConfig": {
                              "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "category3Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                            },
                            "aggregationConfig": {
                              "method": "sum",
                              "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                            }
                          },
                          "columnOrder": [],
                          "hiddenColumns": [],
                          "collapsedColumns": [],
                          "hideEmptyColumns": false,
                          "showNoValueColumn": true,
                          "collapsedSwimlanes": [],
                          "showNoValueSwimlane": true
                        }
                      }
                    }
                  }
                },
                "HIERARCHY": {
                  "description": "HIERARCHY",
                  "value": {
                    "type": "HIERARCHY",
                    "source": {
                      "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "isOriginSubSchema": false
                    },
                    "placement": {
                      "layout": {
                        "x": 0,
                        "y": 0,
                        "w": 12,
                        "h": 6
                      }
                    },
                    "presentation": {
                      "name": "Org tree"
                    },
                    "query": {
                      "filters": []
                    },
                    "view": {
                      "fields": [
                        "contact-name",
                        "status",
                        "amount"
                      ],
                      "hierarchyConfig": {
                        "columns": {
                          "label": "Name",
                          "infos": [
                            {
                              "id": "col_1779975207355_zfndknslw",
                              "name": "Status"
                            },
                            {
                              "id": "col_1779975243018_qm4t7xb2pa",
                              "name": "Description"
                            }
                          ],
                          "numbers": [
                            {
                              "id": "col_1779975261490_h8kd3nv9ws",
                              "name": "Total amount",
                              "aggregation": "SUM"
                            }
                          ]
                        },
                        "rootLevel": {
                          "name": "Customers",
                          "labelFieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "infoMappings": [
                            {
                              "columnId": "col_1779975207355_zfndknslw",
                              "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                            }
                          ],
                          "numberMappings": [
                            {
                              "columnId": "col_1779975261490_h8kd3nv9ws",
                              "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                            }
                          ]
                        },
                        "childLevels": [
                          {
                            "name": "Projects",
                            "schemaId": "3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f",
                            "childFieldId": "80deefae-af3d-4000-b322-bfe1594f8073",
                            "labelFieldId": "50dbef0b-7e0a-4fdd-8019-8fb9281f5d70",
                            "infoMappings": [
                              {
                                "columnId": "col_1779975243018_qm4t7xb2pa",
                                "fieldId": "60dcef0c-8f1b-4eee-9120-9fc0392f6e71"
                              }
                            ],
                            "numberMappings": [
                              {
                                "columnId": "col_1779975261490_h8kd3nv9ws",
                                "fieldId": "70ddef0d-9f2c-4fff-a221-afd0493f7f72"
                              }
                            ]
                          },
                          {
                            "name": "Tasks",
                            "schemaId": "4fdadefa-8f1b-4eee-9120-9fc0392f6e7f",
                            "childFieldId": "a1e1607b-bf4e-4010-8423-cff269508074",
                            "labelFieldId": "90ef60fc-af3d-4fff-b322-bfe1594f8073",
                            "infoMappings": [],
                            "numberMappings": [
                              {
                                "columnId": "col_1779975261490_h8kd3nv9ws",
                                "fieldId": "b1e26170-cf5f-4020-9524-dff36a619075"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Widget created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2WidgetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "widgetId": "11111111-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget created successfully</p>"
          },
          "400": {
            "description": "Invalid widget payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid widget payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a widget with a backend-generated widgetId using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.",
                      "marks": []
                    }
                  ],
                  "key": "S5XQiJyjKMv6"
                }
              ],
              "key": "6pgPwkatNM64"
            }
          ],
          "key": "Ir85Lnjp8JoA"
        },
        "x-gitbook-description-html": "<p>Creates a widget with a backend-generated widgetId using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.</p>"
      }
    },
    "/api/v2/displays/{displayId}/widgets/{widgetId}": {
      "get": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Get widget (v2)",
        "operationId": "getWidgetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "widgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Widget retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2WidgetResponse"
                },
                "examples": {
                  "TABLE widget": {
                    "description": "TABLE widget",
                    "value": {
                      "id": "11111111-1111-4111-a111-111111111111",
                      "type": "TABLE_OR_SUBTABLE",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 0,
                          "w": 12,
                          "h": 8
                        }
                      },
                      "presentation": {
                        "name": "Customers",
                        "description": "All customers",
                        "icon": "users",
                        "color": "blue"
                      },
                      "bindings": {
                        "variableMap": {
                          "aaaaaaaa-1111-4111-a111-111111111111": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                        }
                      },
                      "query": {
                        "filters": [],
                        "sorts": [
                          {
                            "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "direction": "ASC"
                          }
                        ]
                      },
                      "behavior": {
                        "readOnly": false,
                        "hideAddButton": false,
                        "hideDeleteButton": false,
                        "lockedFields": [
                          {
                            "field": {
                              "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                              "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                            },
                            "conditions": [
                              {
                                "origin": {
                                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                                  "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                                },
                                "comparisonOperator": "IS_EMPTY",
                                "values": []
                              }
                            ],
                            "messageBeforeLock": "Status locks until the invoice number is set.",
                            "messageAfterLock": "Status is locked because the invoice number is missing."
                          }
                        ]
                      },
                      "view": {
                        "fields": [
                          "id",
                          "contact-name",
                          "status",
                          "amount"
                        ],
                        "columnSize": {
                          "contact-name": 240
                        }
                      }
                    }
                  },
                  "CHART widget": {
                    "description": "CHART widget",
                    "value": {
                      "id": "22222222-2222-4222-a222-222222222222",
                      "type": "CHART",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 8,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Revenue by month"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": [
                          {
                            "origin": {
                              "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                              "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                            },
                            "comparisonOperator": "ANY_OF",
                            "values": [
                              "2",
                              "3"
                            ]
                          }
                        ]
                      },
                      "behavior": {},
                      "chart": {
                        "chartType": "bars",
                        "xAxisFieldId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "xAxisDateFormat": "MONTH_YEAR",
                        "xAxisAsTimeSerie": true,
                        "yAxisSeries": [
                          {
                            "typeCalc": "SUM",
                            "fieldCalc": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                            "color": "#4B9CD3",
                            "axisType": "PRIMARY"
                          }
                        ],
                        "legend": {
                          "position": "bottom"
                        }
                      }
                    }
                  },
                  "KANBAN widget": {
                    "description": "KANBAN widget",
                    "value": {
                      "id": "66666666-6666-4666-a666-666666666666",
                      "type": "KANBAN",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 6,
                          "y": 6,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Status board"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                          "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
                        ],
                        "viewAdditionalProperties": {
                          "viewState": {
                            "fieldMapping": {
                              "columnField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "swimlaneField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "cardConfig": {
                                "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                                "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                                "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                                "category3Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                                "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                              },
                              "aggregationConfig": {
                                "method": "sum",
                                "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                              }
                            },
                            "columnOrder": [],
                            "hiddenColumns": [],
                            "collapsedColumns": [],
                            "hideEmptyColumns": false,
                            "showNoValueColumn": true,
                            "collapsedSwimlanes": [],
                            "showNoValueSwimlane": true
                          }
                        }
                      }
                    }
                  },
                  "TIMELINE widget": {
                    "description": "TIMELINE widget",
                    "value": {
                      "id": "55555555-5555-4555-a555-555555555555",
                      "type": "TIMELINE",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 6,
                          "y": 0,
                          "w": 6,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Customer schedule"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                          "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
                        ],
                        "viewAdditionalProperties": {
                          "viewState": {
                            "fieldMapping": {
                              "startDateField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "endDateField": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012",
                              "labelField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "groupField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "subgroupField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "progressField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "cardConfig": {
                                "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                                "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                                "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                                "category4Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                                "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                              }
                            },
                            "granularity": "month",
                            "sidebarWidth": 300,
                            "visibleFields": [],
                            "collapsedGroups": [],
                            "collapsedSubgroups": [],
                            "showUngroupedEvents": true,
                            "showUnsubgroupedEvents": true
                          }
                        }
                      }
                    }
                  },
                  "HIERARCHY widget": {
                    "description": "HIERARCHY widget",
                    "value": {
                      "id": "77777777-7777-4777-a777-777777777777",
                      "type": "HIERARCHY",
                      "source": {
                        "originResourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "isOriginSubSchema": false
                      },
                      "placement": {
                        "layout": {
                          "x": 0,
                          "y": 12,
                          "w": 12,
                          "h": 6
                        }
                      },
                      "presentation": {
                        "name": "Org tree"
                      },
                      "bindings": {
                        "variableMap": {}
                      },
                      "query": {
                        "filters": []
                      },
                      "behavior": {},
                      "view": {
                        "fields": [
                          "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                          "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                        ],
                        "hierarchyConfig": {
                          "columns": {
                            "label": "Name",
                            "infos": [
                              {
                                "id": "col_1779975207355_zfndknslw",
                                "name": "Status"
                              },
                              {
                                "id": "col_1779975243018_qm4t7xb2pa",
                                "name": "Description"
                              }
                            ],
                            "numbers": [
                              {
                                "id": "col_1779975261490_h8kd3nv9ws",
                                "name": "Total amount",
                                "aggregation": "SUM"
                              }
                            ]
                          },
                          "rootLevel": {
                            "name": "Customers",
                            "labelFieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "infoMappings": [
                              {
                                "columnId": "col_1779975207355_zfndknslw",
                                "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                              }
                            ],
                            "numberMappings": [
                              {
                                "columnId": "col_1779975261490_h8kd3nv9ws",
                                "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                              }
                            ]
                          },
                          "childLevels": [
                            {
                              "name": "Projects",
                              "schemaId": "3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f",
                              "childFieldId": "80deefae-af3d-4000-b322-bfe1594f8073",
                              "labelFieldId": "50dbef0b-7e0a-4fdd-8019-8fb9281f5d70",
                              "infoMappings": [
                                {
                                  "columnId": "col_1779975243018_qm4t7xb2pa",
                                  "fieldId": "60dcef0c-8f1b-4eee-9120-9fc0392f6e71"
                                }
                              ],
                              "numberMappings": [
                                {
                                  "columnId": "col_1779975261490_h8kd3nv9ws",
                                  "fieldId": "70ddef0d-9f2c-4fff-a221-afd0493f7f72"
                                }
                              ]
                            },
                            {
                              "name": "Tasks",
                              "schemaId": "4fdadefa-8f1b-4eee-9120-9fc0392f6e7f",
                              "childFieldId": "a1e1607b-bf4e-4010-8423-cff269508074",
                              "labelFieldId": "90ef60fc-af3d-4fff-b322-bfe1594f8073",
                              "infoMappings": [],
                              "numberMappings": [
                                {
                                  "columnId": "col_1779975261490_h8kd3nv9ws",
                                  "fieldId": "b1e26170-cf5f-4020-9524-dff36a619075"
                                }
                              ]
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Widget not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget not found</p>"
          }
        }
      },
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete widget (v2)",
        "operationId": "deleteWidgetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "widgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Widget deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2WidgetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "widgetId": "11111111-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Widget not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget not found</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch widget (v2)",
        "description": "Patches a widget using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.",
        "operationId": "patchWidgetV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "widgetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2PatchWidgetRequest"
              },
              "examples": {
                "Move placement + update view": {
                  "description": "Move placement + update view",
                  "value": {
                    "placement": {
                      "layout": {
                        "x": 1,
                        "y": 2,
                        "w": 8,
                        "h": 4
                      }
                    },
                    "view": {
                      "fields": [
                        "id",
                        "contact-name",
                        "status"
                      ]
                    },
                    "presentation": {
                      "name": "Revenue Updated"
                    },
                    "behavior": {
                      "readOnly": true
                    }
                  }
                },
                "Add query filters": {
                  "description": "Add query filters",
                  "value": {
                    "query": {
                      "filters": [
                        {
                          "origin": {
                            "schemaId": "contacts",
                            "fieldId": "status"
                          },
                          "comparisonOperator": "EQUAL",
                          "values": [
                            "2"
                          ]
                        },
                        {
                          "origin": {
                            "schemaId": "contacts",
                            "fieldId": "amount"
                          },
                          "comparisonOperator": "GREATER_OR_EQUAL",
                          "values": [
                            "500"
                          ]
                        }
                      ]
                    }
                  }
                },
                "Hide buttons": {
                  "description": "Hide buttons",
                  "value": {
                    "behavior": {
                      "hideAddButton": true,
                      "hideDeleteButton": true,
                      "hideFilterButton": true
                    }
                  }
                },
                "Configure locked fields": {
                  "description": "Configure locked fields",
                  "value": {
                    "behavior": {
                      "lockedFields": [
                        {
                          "field": {
                            "fieldId": "contact-name"
                          },
                          "conditions": []
                        },
                        {
                          "field": {
                            "fieldId": "status"
                          },
                          "conditions": [
                            {
                              "origin": {
                                "fieldId": "invoice-number"
                              },
                              "comparisonOperator": "IS_EMPTY",
                              "values": []
                            }
                          ],
                          "messageBeforeLock": "Status locks until the invoice number is set.",
                          "messageAfterLock": "Status is locked because the invoice number is missing."
                        }
                      ]
                    }
                  }
                },
                "Clear locked fields": {
                  "description": "Clear locked fields",
                  "value": {
                    "behavior": {
                      "lockedFields": []
                    }
                  }
                },
                "Update KPI config": {
                  "description": "Update KPI config",
                  "value": {
                    "kpi": {
                      "typeCalc": "AVG",
                      "fieldCalc": "amount",
                      "config": {
                        "format": "number",
                        "decimals": 1
                      }
                    }
                  }
                },
                "Update chart series": {
                  "description": "Update chart series",
                  "value": {
                    "chart": {
                      "chartType": "lines",
                      "xAxisFieldId": "due-date",
                      "xAxisDateFormat": "QUARTER_YEAR",
                      "xAxisAsTimeSerie": true,
                      "yAxisSeries": [
                        {
                          "typeCalc": "SUM",
                          "fieldCalc": "amount",
                          "color": "#2E7D32",
                          "axisType": "PRIMARY"
                        }
                      ]
                    }
                  }
                },
                "Update bindings": {
                  "description": "Update bindings",
                  "value": {
                    "bindings": {
                      "variableMap": {
                        "aaaaaaaa-1111-4111-a111-111111111111": "contact-name",
                        "cccccccc-3333-4333-a333-333333333333": "owner"
                      }
                    }
                  }
                },
                "Patch TABLE columnSize": {
                  "description": "Patch TABLE columnSize",
                  "value": {
                    "view": {
                      "columnSize": {
                        "contact-name": 320,
                        "amount": 140
                      }
                    }
                  }
                },
                "Patch KANBAN view state": {
                  "description": "Patch KANBAN view state",
                  "value": {
                    "view": {
                      "viewAdditionalProperties": {
                        "viewState": {
                          "fieldMapping": {
                            "columnField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                            "swimlaneField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "cardConfig": {
                              "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "category3Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                            },
                            "aggregationConfig": {
                              "method": "sum",
                              "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                            }
                          },
                          "columnOrder": [],
                          "hiddenColumns": [],
                          "collapsedColumns": [],
                          "hideEmptyColumns": false,
                          "showNoValueColumn": true,
                          "collapsedSwimlanes": [],
                          "showNoValueSwimlane": true
                        }
                      }
                    }
                  }
                },
                "Patch TIMELINE view state": {
                  "description": "Patch TIMELINE view state",
                  "value": {
                    "view": {
                      "viewAdditionalProperties": {
                        "viewState": {
                          "fieldMapping": {
                            "startDateField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                            "endDateField": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012",
                            "labelField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "groupField": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                            "subgroupField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                            "progressField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                            "cardConfig": {
                              "titleField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                              "category1Field": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                              "category2Field": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                              "category4Field": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                              "descriptionField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                            }
                          },
                          "granularity": "month",
                          "sidebarWidth": 300,
                          "visibleFields": [],
                          "collapsedGroups": [],
                          "collapsedSubgroups": [],
                          "showUngroupedEvents": true,
                          "showUnsubgroupedEvents": true
                        }
                      }
                    }
                  }
                },
                "Patch HIERARCHY hierarchyConfig": {
                  "description": "Patch HIERARCHY hierarchyConfig",
                  "value": {
                    "view": {
                      "hierarchyConfig": {
                        "columns": {
                          "label": "Name",
                          "infos": [
                            {
                              "id": "col_1779975207355_zfndknslw",
                              "name": "Status"
                            }
                          ],
                          "numbers": [
                            {
                              "id": "col_1779975261490_h8kd3nv9ws",
                              "name": "Total amount",
                              "aggregation": "SUM"
                            }
                          ]
                        },
                        "rootLevel": {
                          "name": "Customers",
                          "labelFieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "infoMappings": [
                            {
                              "columnId": "col_1779975207355_zfndknslw",
                              "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890"
                            }
                          ],
                          "numberMappings": [
                            {
                              "columnId": "col_1779975261490_h8kd3nv9ws",
                              "fieldId": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043"
                            }
                          ]
                        },
                        "childLevels": [
                          {
                            "name": "Projects",
                            "schemaId": "3ec9cdef-7e0a-4cdd-8019-8fb9281f5d6f",
                            "childFieldId": "80deefae-af3d-4000-b322-bfe1594f8073",
                            "labelFieldId": "50dbef0b-7e0a-4fdd-8019-8fb9281f5d70",
                            "infoMappings": [],
                            "numberMappings": [
                              {
                                "columnId": "col_1779975261490_h8kd3nv9ws",
                                "fieldId": "70ddef0d-9f2c-4fff-a221-afd0493f7f72"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Widget updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2WidgetMutationResponse"
                },
                "example": {
                  "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                  "widgetId": "11111111-1111-4111-a111-111111111111"
                }
              }
            },
            "x-gitbook-description-html": "<p>Widget updated successfully</p>"
          },
          "400": {
            "description": "Invalid widget patch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid widget patch</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Patches a widget using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.",
                      "marks": []
                    }
                  ],
                  "key": "nmLVZSTHHzYy"
                }
              ],
              "key": "SLluUSyw5hrf"
            }
          ],
          "key": "7wwnH4GXKNCF"
        },
        "x-gitbook-description-html": "<p>Patches a widget using the canonical typed widget contract. Semantic field references accept field UUIDs or slugs. For table views, use business schema fields in view.fields and avoid legacy record metadata columns such as id, createdat, updatedat, createdby, and updatedby. For KANBAN and TIMELINE widgets, the typed view state lives in view.viewAdditionalProperties.viewState; field references inside (columnField, startDateField, cardConfig.*Field, etc.) must be canonical UUIDs because slug resolution is only applied to view.fields items. For TABLE_OR_SUBTABLE, providing view.fields regenerates the AG-Grid viewState automatically and any view.viewAdditionalProperties supplied alongside view.fields is overwritten.</p>"
      }
    },
    "/api/v2/display-folders": {
      "get": {
        "tags": [
          "v2-displays"
        ],
        "summary": "List display folders (v2)",
        "description": "Returns the flat folder projection over display groups.",
        "operationId": "listDisplayFoldersV2",
        "responses": {
          "200": {
            "description": "Display folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DisplayFolderV2Response"
                  }
                },
                "example": [
                  {
                    "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                    "name": "Executive Dashboards",
                    "isRoot": false,
                    "displayCount": 2
                  },
                  {
                    "id": "8b22282b-3db3-4dd7-87f7-b29365dcf3f6",
                    "name": null,
                    "isRoot": true,
                    "displayCount": 4
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Display folders retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the flat folder projection over display groups.",
                      "marks": []
                    }
                  ],
                  "key": "A9AmRUh7lL6l"
                }
              ],
              "key": "mozoKg5qqsNY"
            }
          ],
          "key": "7lRd8iZN1sWj"
        },
        "x-gitbook-description-html": "<p>Returns the flat folder projection over display groups.</p>"
      },
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Create display folder (v2)",
        "description": "Creates one flat display folder.",
        "operationId": "createDisplayFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayFolderV2CreateRequest"
              },
              "example": {
                "name": "Executive Dashboards"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Display folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayFolderV2Response"
                },
                "example": {
                  "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                  "name": "Executive Dashboards",
                  "isRoot": false,
                  "displayCount": 0
                }
              }
            },
            "x-gitbook-description-html": "<p>Display folder created successfully</p>"
          },
          "400": {
            "description": "Invalid display folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid display folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one flat display folder.",
                      "marks": []
                    }
                  ],
                  "key": "DkgNprofzTck"
                }
              ],
              "key": "0ZYnjndCIwVj"
            }
          ],
          "key": "r49jbRmXCvq3"
        },
        "x-gitbook-description-html": "<p>Creates one flat display folder.</p>"
      }
    },
    "/api/v2/display-folders/displays:move": {
      "post": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Move display to folder (v2)",
        "description": "Moves one display into a target flat folder at an optional zero-based position.",
        "operationId": "moveDisplayToFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayFolderV2MoveDisplayRequest"
              },
              "example": {
                "displayId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                "targetFolderId": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                "position": 1
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Display moved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayFolderLocationV2Response"
                },
                "example": {
                  "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                  "name": "Executive Dashboards",
                  "isRoot": false
                }
              }
            },
            "x-gitbook-description-html": "<p>Display moved successfully</p>"
          },
          "400": {
            "description": "Invalid move payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid move payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder or display not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder or display not found</p>"
          }
        }
      }
    },
    "/api/v2/display-folders/{folderId}": {
      "delete": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Delete display folder (v2)",
        "description": "Deletes one non-root display folder. Its displays are moved back to the root folder.",
        "operationId": "deleteDisplayFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Display folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayFolderV2Response"
                },
                "example": {
                  "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                  "name": "Executive Dashboards",
                  "isRoot": false,
                  "displayCount": 2
                }
              }
            },
            "x-gitbook-description-html": "<p>Display folder deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          },
          "409": {
            "description": "Default folder cannot be deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Default folder cannot be deleted</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one non-root display folder. Its displays are moved back to the root folder.",
                      "marks": []
                    }
                  ],
                  "key": "GVCoQbny2hJx"
                }
              ],
              "key": "CJSQbpnY4lPA"
            }
          ],
          "key": "0sOAeygEUR30"
        },
        "x-gitbook-description-html": "<p>Deletes one non-root display folder. Its displays are moved back to the root folder.</p>"
      },
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display folder (v2)",
        "description": "Updates the name and/or shared order of one display folder.",
        "operationId": "patchDisplayFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayFolderV2PatchRequest"
              },
              "example": {
                "name": "Executive Dashboards (2026)",
                "order": 2
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Display folder patched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayFolderV2Response"
                },
                "example": {
                  "id": "e7a1c3d2-5f4b-4a6c-9d8e-1f2a3b4c5d6e",
                  "name": "Executive Dashboards (2026)",
                  "isRoot": false,
                  "displayCount": 2
                }
              }
            },
            "x-gitbook-description-html": "<p>Display folder patched successfully</p>"
          },
          "400": {
            "description": "Invalid folder patch payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder patch payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        }
      }
    },
    "/api/v2/document-templates": {
      "get": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "List document templates (v2)",
        "description": "Returns all document templates in the workspace. Each asset's link is a relative path to the download endpoint, ready to call without composition.",
        "operationId": "listDocumentTemplatesV2",
        "responses": {
          "200": {
            "description": "Document templates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentTemplateResponse"
                  }
                },
                "example": [
                  {
                    "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
                    "name": "Quarterly report",
                    "assets": [
                      {
                        "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
                        "name": "Requirements.docx",
                        "link": "/api/v2/document-templates/7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e/assets/9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f/download"
                      }
                    ],
                    "createdAt": "2026-01-15T10:00:00Z",
                    "updatedAt": "2026-01-20T14:30:00Z",
                    "createdBy": "creator@example.com",
                    "updatedBy": "updater@example.com"
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Document templates retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns all document templates in the workspace. Each asset's link is a relative path to the download endpoint, ready to call without composition.",
                      "marks": []
                    }
                  ],
                  "key": "KybCLepAYLgl"
                }
              ],
              "key": "iXkVZEZB1JYU"
            }
          ],
          "key": "PYnS3DRZF9fc"
        },
        "x-gitbook-description-html": "<p>Returns all document templates in the workspace. Each asset's link is a relative path to the download endpoint, ready to call without composition.</p>"
      },
      "post": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Create document template (v2)",
        "description": "Creates a document template by name. Pass assets: [] for the typical flow (assets are uploaded later via the multipart asset endpoint). Names must be unique within the workspace.",
        "operationId": "createDocumentTemplateV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentTemplateV2CreateRequest"
              },
              "examples": {
                "Create empty template": {
                  "description": "Create empty template",
                  "value": {
                    "name": "Quarterly report",
                    "assets": []
                  }
                },
                "Create with pre-existing assets": {
                  "description": "Create with pre-existing assets",
                  "value": {
                    "name": "Annual report",
                    "assets": [
                      {
                        "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
                        "name": "Cover.docx",
                        "link": "/existing/cover.docx"
                      },
                      {
                        "id": "3f2e1d0c-9b8a-7654-3210-fedcba987654",
                        "name": "Appendix.docx",
                        "link": "/existing/appendix.docx"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Document template created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTemplateResponse"
                },
                "example": {
                  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
                  "name": "Quarterly report",
                  "assets": [],
                  "createdAt": "2026-01-15T10:00:00Z",
                  "updatedAt": "2026-01-15T10:00:00Z",
                  "createdBy": "creator@example.com",
                  "updatedBy": "creator@example.com"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template created successfully</p>"
          },
          "400": {
            "description": "Invalid payload, missing name, or document template name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid payload, missing name, or document template name already exists</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a document template by name. Pass assets: [] for the typical flow (assets are uploaded later via the multipart asset endpoint). Names must be unique within the workspace.",
                      "marks": []
                    }
                  ],
                  "key": "52r8Cq8BCsnX"
                }
              ],
              "key": "ZCzjx01hI40C"
            }
          ],
          "key": "ELE2D7H2OPIu"
        },
        "x-gitbook-description-html": "<p>Creates a document template by name. Pass assets: [] for the typical flow (assets are uploaded later via the multipart asset endpoint). Names must be unique within the workspace.</p>"
      }
    },
    "/api/v2/document-templates/{templateId}": {
      "delete": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Delete document template (v2)",
        "description": "Deletes a document template and removes its asset files from storage. Any record fields referencing generated documents are not modified.",
        "operationId": "deleteDocumentTemplateV2",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document template deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTemplateDeleteResponse"
                },
                "example": {
                  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
                  "deleted": true
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Document template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes a document template and removes its asset files from storage. Any record fields referencing generated documents are not modified.",
                      "marks": []
                    }
                  ],
                  "key": "tn43bKr1EI3m"
                }
              ],
              "key": "KFCdTA7qgoC2"
            }
          ],
          "key": "ja7q7dPSf15g"
        },
        "x-gitbook-description-html": "<p>Deletes a document template and removes its asset files from storage. Any record fields referencing generated documents are not modified.</p>"
      },
      "patch": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Patch document template (v2)",
        "description": "Renames an existing document template. Only name is updatable through this endpoint; assets are managed via the asset endpoints.",
        "operationId": "patchDocumentTemplateV2",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentTemplateV2UpdateRequest"
              },
              "example": {
                "name": "Annual report"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Document template updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTemplateResponse"
                },
                "example": {
                  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
                  "name": "Annual report",
                  "assets": [
                    {
                      "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
                      "name": "Requirements.docx",
                      "link": "/api/v2/document-templates/7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e/assets/9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f/download"
                    }
                  ],
                  "createdAt": "2026-01-15T10:00:00Z",
                  "updatedAt": "2026-01-22T09:15:00Z",
                  "createdBy": "creator@example.com",
                  "updatedBy": "updater@example.com"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template updated successfully</p>"
          },
          "400": {
            "description": "Invalid payload or document template name already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid payload or document template name already exists</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Document template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Renames an existing document template. Only name is updatable through this endpoint; assets are managed via the asset endpoints.",
                      "marks": []
                    }
                  ],
                  "key": "sHnlnWOtdOBn"
                }
              ],
              "key": "eTCwYgGbwYIY"
            }
          ],
          "key": "JErtfryWwG21"
        },
        "x-gitbook-description-html": "<p>Renames an existing document template. Only name is updatable through this endpoint; assets are managed via the asset endpoints.</p>"
      }
    },
    "/api/v2/document-templates/{templateId}/assets": {
      "post": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Add document template asset (v2)",
        "description": "Adds one asset to an existing document template using a multipart part named 'file'. The optional 'name' form field overrides the asset display name; if blank or missing, the uploaded filename is used.",
        "operationId": "addDocumentTemplateAssetV2",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "name": {
                    "type": "string",
                    "description": "Optional asset display name. If blank or missing, the uploaded filename is used."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Document template asset added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTemplateResponse"
                },
                "example": {
                  "id": "7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e",
                  "name": "Quarterly report",
                  "assets": [
                    {
                      "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
                      "name": "contract.docx",
                      "link": "/api/v2/document-templates/7c4a8d3f-1b2e-4a5c-9d6e-1f2a3b4c5d6e/assets/9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f/download"
                    }
                  ],
                  "createdAt": "2026-01-15T10:00:00Z",
                  "updatedAt": "2026-01-22T09:15:00Z",
                  "createdBy": "creator@example.com",
                  "updatedBy": "updater@example.com"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template asset added successfully</p>"
          },
          "400": {
            "description": "Missing or invalid multipart 'file' part",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Missing or invalid multipart 'file' part</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Document template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Adds one asset to an existing document template using a multipart part named 'file'. The optional 'name' form field overrides the asset display name; if blank or missing, the uploaded filename is used.",
                      "marks": []
                    }
                  ],
                  "key": "FvQwhga6OuzD"
                }
              ],
              "key": "zP2MWtL3g8N5"
            }
          ],
          "key": "qjn1D46zdV3m"
        },
        "x-gitbook-description-html": "<p>Adds one asset to an existing document template using a multipart part named 'file'. The optional 'name' form field overrides the asset display name; if blank or missing, the uploaded filename is used.</p>"
      }
    },
    "/api/v2/document-templates/{templateId}/assets/{assetId}": {
      "delete": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Delete document template asset (v2)",
        "description": "Removes one asset from a document template and deletes its file from storage.",
        "operationId": "deleteDocumentTemplateAssetV2",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document template asset deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentTemplateAssetDeleteResponse"
                },
                "example": {
                  "id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8b7c6d5e4f",
                  "deleted": true
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template asset deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Document template or asset not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template or asset not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Removes one asset from a document template and deletes its file from storage.",
                      "marks": []
                    }
                  ],
                  "key": "nNT4enBvyvrR"
                }
              ],
              "key": "HMrJb4MaPMp6"
            }
          ],
          "key": "UtwiigmrVwuU"
        },
        "x-gitbook-description-html": "<p>Removes one asset from a document template and deletes its file from storage.</p>"
      }
    },
    "/api/v2/document-templates/{templateId}/assets/{assetId}/download": {
      "get": {
        "tags": [
          "v2-document-templates"
        ],
        "summary": "Download document template asset (v2)",
        "description": "Streams the raw bytes of one document template asset. Use this when an agent needs the binary content itself rather than just a reference.",
        "operationId": "downloadDocumentTemplateAssetV2",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Document template asset downloaded successfully",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template asset downloaded successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Document template or asset not found",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Document template or asset not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Streams the raw bytes of one document template asset. Use this when an agent needs the binary content itself rather than just a reference.",
                      "marks": []
                    }
                  ],
                  "key": "HfRzbjJ8YlXR"
                }
              ],
              "key": "kam1LWQRWEAk"
            }
          ],
          "key": "TGijZfaRI1K6"
        },
        "x-gitbook-description-html": "<p>Streams the raw bytes of one document template asset. Use this when an agent needs the binary content itself rather than just a reference.</p>"
      }
    },
    "/api/v2/files": {
      "post": {
        "tags": [
          "v2-files"
        ],
        "summary": "Upload file (v2)",
        "description": "Uploads exactly one file using a multipart part named file. The backend generates the fileId and returns it for later record references.",
        "operationId": "uploadFileV2",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "File uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileV2UploadResponse"
                },
                "example": {
                  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
                }
              }
            },
            "x-gitbook-description-html": "<p>File uploaded successfully</p>"
          },
          "400": {
            "description": "Missing or invalid multipart file part",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Missing or invalid multipart file part</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Uploads exactly one file using a multipart part named file. The backend generates the fileId and returns it for later record references.",
                      "marks": []
                    }
                  ],
                  "key": "Zmd0x6LFr4B3"
                }
              ],
              "key": "G1tIcuhm6Usk"
            }
          ],
          "key": "aSlb5TThfv23"
        },
        "x-gitbook-description-html": "<p>Uploads exactly one file using a multipart part named file. The backend generates the fileId and returns it for later record references.</p>"
      }
    },
    "/api/v2/files/storage-info": {
      "get": {
        "tags": [
          "v2-files"
        ],
        "summary": "Get file storage info (v2)",
        "description": "Returns the storage quota and current usage for the active workspace. Both values are expressed in bytes.",
        "operationId": "getFileStorageInfoV2",
        "responses": {
          "200": {
            "description": "Storage information retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileV2StorageInfoResponse"
                },
                "example": {
                  "maxSize": 10737418240,
                  "usedSize": 2147483648
                }
              }
            },
            "x-gitbook-description-html": "<p>Storage information retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the storage quota and current usage for the active workspace. Both values are expressed in bytes.",
                      "marks": []
                    }
                  ],
                  "key": "7mUgwh8A8JUb"
                }
              ],
              "key": "ROpduBXT7YX5"
            }
          ],
          "key": "c1d42iJP4skV"
        },
        "x-gitbook-description-html": "<p>Returns the storage quota and current usage for the active workspace. Both values are expressed in bytes.</p>"
      }
    },
    "/api/v2/files/{fileId}": {
      "get": {
        "tags": [
          "v2-files"
        ],
        "summary": "Download file (v2)",
        "description": "Downloads the raw file bytes for one fileId. Use this when an agent needs the binary content itself rather than just a reference.",
        "operationId": "downloadFileV2",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File downloaded successfully",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "x-gitbook-description-html": "<p>File downloaded successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>File not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Downloads the raw file bytes for one fileId. Use this when an agent needs the binary content itself rather than just a reference.",
                      "marks": []
                    }
                  ],
                  "key": "O6MbeSUMT0Wp"
                }
              ],
              "key": "hjFQNiBKiAg3"
            }
          ],
          "key": "s1nEEgbKCYp3"
        },
        "x-gitbook-description-html": "<p>Downloads the raw file bytes for one fileId. Use this when an agent needs the binary content itself rather than just a reference.</p>"
      },
      "delete": {
        "tags": [
          "v2-files"
        ],
        "summary": "Delete file (v2)",
        "description": "Deletes one file from workspace storage. Any record fields still referencing that fileId will keep the stale reference until updated separately.",
        "operationId": "deleteFileV2",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileV2DeleteResponse"
                },
                "example": {
                  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
                  "deleted": true
                }
              }
            },
            "x-gitbook-description-html": "<p>File deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>File not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one file from workspace storage. Any record fields still referencing that fileId will keep the stale reference until updated separately.",
                      "marks": []
                    }
                  ],
                  "key": "nJNrtYQJwzoQ"
                }
              ],
              "key": "cVSbBlKfRYcl"
            }
          ],
          "key": "7nKlo1nKIgcL"
        },
        "x-gitbook-description-html": "<p>Deletes one file from workspace storage. Any record fields still referencing that fileId will keep the stale reference until updated separately.</p>"
      }
    },
    "/api/v2/navigation/folders": {
      "get": {
        "tags": [
          "v2-navigation"
        ],
        "summary": "List navigation folders (v2)",
        "description": "Returns the workspace navigation tree as folders with embedded resources. Folders are sorted by order so agents can plan moves without a second lookup.",
        "operationId": "listNavigationFoldersV2",
        "responses": {
          "200": {
            "description": "Navigation folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NavigationV2FolderResponse"
                  }
                },
                "example": [
                  {
                    "id": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
                    "order": 1,
                    "name": "Sales",
                    "resources": [
                      {
                        "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "name": "Customer records",
                        "type": "SCHEMA",
                        "isInSpace": false,
                        "additionalProperties": {}
                      },
                      {
                        "id": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                        "name": "Orders",
                        "type": "SCHEMA",
                        "isInSpace": true,
                        "additionalProperties": {}
                      }
                    ],
                    "additionalProperties": {
                      "color": "blue"
                    }
                  },
                  {
                    "id": "b8c9d0e1-f2a3-4b5c-6d7e-8f9012345678",
                    "order": 2,
                    "name": "Operations",
                    "resources": [
                      {
                        "id": "3f8a2c1b-9d4e-4a5b-8c6d-7e8f90123456",
                        "name": "Shipments",
                        "type": "SCHEMA",
                        "isInSpace": false,
                        "additionalProperties": {}
                      }
                    ],
                    "additionalProperties": {
                      "color": "purple"
                    }
                  },
                  {
                    "id": "00000000-0000-0000-0000-000000000000",
                    "order": 99,
                    "name": "root",
                    "resources": [],
                    "additionalProperties": {}
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Navigation folders retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the workspace navigation tree as folders with embedded resources. Folders are sorted by order so agents can plan moves without a second lookup.",
                      "marks": []
                    }
                  ],
                  "key": "4nZCTbMviiAE"
                }
              ],
              "key": "ThJDJRyPLEU5"
            }
          ],
          "key": "Yo2u7jw4c9wn"
        },
        "x-gitbook-description-html": "<p>Returns the workspace navigation tree as folders with embedded resources. Folders are sorted by order so agents can plan moves without a second lookup.</p>"
      },
      "post": {
        "tags": [
          "v2-navigation"
        ],
        "summary": "Create navigation folder (v2)",
        "description": "Creates a navigation folder for organizing resources inside the workspace. additionalProperties can store client metadata without changing routing behavior.",
        "operationId": "createNavigationFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NavigationV2CreateFolderRequest"
              },
              "examples": {
                "Full create": {
                  "description": "Full create",
                  "value": {
                    "name": "Finance",
                    "order": 20,
                    "additionalProperties": {
                      "color": "green"
                    }
                  }
                },
                "Minimal create": {
                  "description": "Minimal create",
                  "value": {
                    "name": "Archive"
                  }
                },
                "With icon metadata": {
                  "description": "With icon metadata",
                  "value": {
                    "name": "Reports",
                    "order": 5,
                    "additionalProperties": {
                      "color": "teal",
                      "icon": "chart-line"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Navigation folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationV2FolderMutationResponse"
                },
                "example": {
                  "folderId": "c5d6e7f8-9012-3456-789a-bcdef0123456",
                  "name": "Finance"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation folder created successfully</p>"
          },
          "400": {
            "description": "Invalid folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a navigation folder for organizing resources inside the workspace. additionalProperties can store client metadata without changing routing behavior.",
                      "marks": []
                    }
                  ],
                  "key": "xlxQ6zQ312Dx"
                }
              ],
              "key": "lYcYL5N93NEp"
            }
          ],
          "key": "mlzWhPGpxGbm"
        },
        "x-gitbook-description-html": "<p>Creates a navigation folder for organizing resources inside the workspace. additionalProperties can store client metadata without changing routing behavior.</p>"
      }
    },
    "/api/v2/navigation/folders/{folderId}": {
      "delete": {
        "tags": [
          "v2-navigation"
        ],
        "summary": "Delete navigation folder (v2)",
        "description": "Deletes one navigation folder. Move any resources you still need before calling this endpoint because the folder itself is removed.",
        "operationId": "deleteNavigationFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Navigation folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationV2FolderMutationResponse"
                },
                "example": {
                  "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
                  "name": "Finance Ops"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation folder deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one navigation folder. Move any resources you still need before calling this endpoint because the folder itself is removed.",
                      "marks": []
                    }
                  ],
                  "key": "QOnwvFITz0BS"
                }
              ],
              "key": "KsizcCyzSCZt"
            }
          ],
          "key": "MuIFVT3I17JP"
        },
        "x-gitbook-description-html": "<p>Deletes one navigation folder. Move any resources you still need before calling this endpoint because the folder itself is removed.</p>"
      },
      "patch": {
        "tags": [
          "v2-navigation"
        ],
        "summary": "Patch navigation folder (v2)",
        "description": "Updates one navigation folder. Use this to rename the folder, adjust its display order, or replace additionalProperties.",
        "operationId": "patchNavigationFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NavigationV2UpdateFolderRequest"
              },
              "examples": {
                "Full update": {
                  "description": "Full update",
                  "value": {
                    "name": "Finance Ops",
                    "order": 30,
                    "additionalProperties": {
                      "color": "teal"
                    }
                  }
                },
                "Rename only": {
                  "description": "Rename only",
                  "value": {
                    "name": "Finance (legacy)"
                  }
                },
                "Reorder only": {
                  "description": "Reorder only",
                  "value": {
                    "order": 1
                  }
                },
                "Update metadata only": {
                  "description": "Update metadata only",
                  "value": {
                    "additionalProperties": {
                      "color": "red",
                      "icon": "archive"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Navigation folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationV2FolderMutationResponse"
                },
                "example": {
                  "folderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a",
                  "name": "Finance Ops"
                }
              }
            },
            "x-gitbook-description-html": "<p>Navigation folder updated successfully</p>"
          },
          "400": {
            "description": "Invalid folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Updates one navigation folder. Use this to rename the folder, adjust its display order, or replace additionalProperties.",
                      "marks": []
                    }
                  ],
                  "key": "PUsAmePvKp0A"
                }
              ],
              "key": "qWstP1zQnMgG"
            }
          ],
          "key": "uiZfzsTqvajP"
        },
        "x-gitbook-description-html": "<p>Updates one navigation folder. Use this to rename the folder, adjust its display order, or replace additionalProperties.</p>"
      }
    },
    "/api/v2/navigation/resources:move": {
      "post": {
        "tags": [
          "v2-navigation"
        ],
        "summary": "Move navigation resource (v2)",
        "description": "Moves one schema into a navigation folder. targetFolderId identifies the destination folder. Only schemas can be moved; schedules and sub-schemas follow their parent schema.",
        "operationId": "moveNavigationResourceV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NavigationV2MoveResourceRequest"
              },
              "examples": {
                "Move schema": {
                  "description": "Move schema",
                  "value": {
                    "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                    "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
                  }
                },
                "Move to root folder": {
                  "description": "Move to root folder",
                  "value": {
                    "resourceId": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                    "targetFolderId": "00000000-0000-0000-0000-000000000000"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resource moved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NavigationV2MoveResourceResponse"
                },
                "example": {
                  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "targetFolderId": "84a0fca4-37ef-4c83-a8ed-9ef67ad9324a"
                }
              }
            },
            "x-gitbook-description-html": "<p>Resource moved successfully</p>"
          },
          "400": {
            "description": "Invalid move payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid move payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder or resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder or resource not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Moves one schema into a navigation folder. targetFolderId identifies the destination folder. Only schemas can be moved; schedules and sub-schemas follow their parent schema.",
                      "marks": []
                    }
                  ],
                  "key": "BCohK9SH5nWt"
                }
              ],
              "key": "znRQcYdMXzZs"
            }
          ],
          "key": "QMrsO5Hv01qi"
        },
        "x-gitbook-description-html": "<p>Moves one schema into a navigation folder. targetFolderId identifies the destination folder. Only schemas can be moved; schedules and sub-schemas follow their parent schema.</p>"
      }
    },
    "/api/v2/schemas": {
      "get": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "List schemas (v2)",
        "description": "Returns a compact schema list optimized for agents.",
        "operationId": "listSchemasV2",
        "responses": {
          "200": {
            "description": "Schema list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchemaV2SummaryResponse"
                  }
                },
                "example": [
                  {
                    "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                    "name": "Contacts",
                    "slug": "contacts",
                    "folder": {
                      "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
                      "name": "Customers",
                      "isRoot": false
                    },
                    "auditable": false,
                    "commentable": false,
                    "fieldCount": 11
                  },
                  {
                    "id": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                    "name": "Orders",
                    "slug": "orders",
                    "folder": {
                      "id": "00000000-0000-0000-0000-000000000000",
                      "name": "root",
                      "isRoot": true
                    },
                    "auditable": true,
                    "commentable": true,
                    "fieldCount": 7
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Schema list retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns a compact schema list optimized for agents.",
                      "marks": []
                    }
                  ],
                  "key": "b06cnt73PcTH"
                }
              ],
              "key": "rCRpS0gYOwoc"
            }
          ],
          "key": "bnuOSHvP0plM"
        },
        "x-gitbook-description-html": "<p>Returns a compact schema list optimized for agents.</p>"
      },
      "post": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Create schema (v2)",
        "description": "Creates one schema for agent workflows and injects backend-managed system defaults.",
        "operationId": "createSchemaV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaV2CreateRequest"
              },
              "examples": {
                "Create schema": {
                  "description": "Create schema",
                  "value": {
                    "name": "Codex Demo",
                    "slug": "codex-demo",
                    "auditable": true,
                    "commentable": true
                  }
                },
                "Minimal create": {
                  "description": "Minimal create",
                  "value": {
                    "name": "Leads",
                    "slug": "leads"
                  }
                },
                "Create inside folder": {
                  "description": "Create inside folder",
                  "value": {
                    "name": "Tasks",
                    "slug": "tasks",
                    "auditable": true,
                    "commentable": false,
                    "folderId": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Schema created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2CreationResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "slug": "codex-demo",
                  "folder": {
                    "id": "00000000-0000-0000-0000-000000000000",
                    "name": "root",
                    "isRoot": true
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema created successfully</p>"
          },
          "400": {
            "description": "Invalid schema create payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid schema create payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one schema for agent workflows and injects backend-managed system defaults.",
                      "marks": []
                    }
                  ],
                  "key": "M0YVZbpTH9vl"
                }
              ],
              "key": "W8UMFCYiXfuN"
            }
          ],
          "key": "xpd2pK9touu2"
        },
        "x-gitbook-description-html": "<p>Creates one schema for agent workflows and injects backend-managed system defaults.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}": {
      "get": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Get schema (v2)",
        "description": "Returns the full public schema representation including fields.",
        "operationId": "getSchemaV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schema retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2ResourceResponse"
                },
                "example": {
                  "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "name": "Contacts",
                  "slug": "contacts",
                  "folder": {
                    "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
                    "name": "Customers",
                    "isRoot": false
                  },
                  "auditable": true,
                  "commentable": true,
                  "highlightedField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                  "fields": [
                    {
                      "id": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "type": "TextField",
                      "slug": "contact-name",
                      "label": "Customer Name",
                      "required": true,
                      "system": false,
                      "config": {
                        "textType": "NORMAL",
                        "defaultValue": "Unknown",
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd",
                      "type": "TextField",
                      "slug": "notes",
                      "label": "Notes",
                      "required": false,
                      "system": false,
                      "config": {
                        "textType": "LONG",
                        "defaultValue": null,
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                      "type": "NumberField",
                      "slug": "amount",
                      "label": "Amount",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": "0",
                        "formatOptions": {
                          "format": "currency",
                          "decimals": 2,
                          "negativesInRed": true,
                          "thousandsSeparator": true,
                          "symbolEnabled": true,
                          "symbolPosition": "before",
                          "symbolValue": "€"
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "2f3a4b5c-6d7e-8f90-1234-56789abcdef0",
                      "type": "NumberField",
                      "slug": "quantity",
                      "label": "Quantity",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": "0",
                        "formatOptions": {
                          "format": "number",
                          "decimals": 0,
                          "thousandsSeparator": false
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "3a4b5c6d-7e8f-9012-3456-789abcdef012",
                      "type": "NumberField",
                      "slug": "discount-rate",
                      "label": "Discount Rate",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": "0",
                        "formatOptions": {
                          "format": "percentage",
                          "decimals": 1,
                          "negativesInRed": true
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "type": "DateField",
                      "slug": "due-date",
                      "label": "Due Date",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": null,
                        "formatOptions": {
                          "format": "datetime",
                          "dateFormat": "DD/MM/YYYY",
                          "showTime": true
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "4b5c6d7e-8f90-1234-5678-9abcdef01234",
                      "type": "DateField",
                      "slug": "birth-date",
                      "label": "Birth Date",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": null,
                        "formatOptions": {
                          "format": "date",
                          "dateFormat": "YYYY-MM-DD",
                          "showTime": false
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                      "type": "OptionField",
                      "slug": "status",
                      "label": "Status",
                      "required": false,
                      "system": false,
                      "config": {
                        "options": [
                          {
                            "id": 1,
                            "name": "Open",
                            "color": "default"
                          },
                          {
                            "id": 2,
                            "name": "In Progress",
                            "color": "warning"
                          },
                          {
                            "id": 3,
                            "name": "Done",
                            "color": "success"
                          }
                        ],
                        "defaultValue": 1,
                        "conditionalFormatting": [],
                        "buttonConfig": null
                      }
                    },
                    {
                      "id": "5c6d7e8f-9012-3456-789a-bcdef0123456",
                      "type": "OptionField",
                      "slug": "stage",
                      "label": "Stage",
                      "required": false,
                      "system": false,
                      "config": {
                        "options": [
                          {
                            "id": 1,
                            "name": "To Do",
                            "color": "default"
                          },
                          {
                            "id": 2,
                            "name": "Doing",
                            "color": "warning"
                          },
                          {
                            "id": 3,
                            "name": "Done",
                            "color": "success"
                          }
                        ],
                        "defaultValue": 1,
                        "conditionalFormatting": [],
                        "buttonConfig": {
                          "displayMode": "button",
                          "buttonBehavior": {
                            "mode": "cycle",
                            "cycleOrder": [
                              1,
                              2,
                              3
                            ],
                            "requireConfirmation": false,
                            "lockAfterSelection": false,
                            "allowReselect": true
                          }
                        }
                      }
                    },
                    {
                      "id": "3e9f8c12-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
                      "type": "FormulaField",
                      "slug": "formula-total",
                      "label": "Formula Total",
                      "required": false,
                      "system": false,
                      "config": {
                        "formulaText": "amount * 1.21",
                        "uiFormatKind": "number",
                        "status": "ACTIVE",
                        "defaultValue": null,
                        "numberFormatOptions": {
                          "format": "number",
                          "decimals": 2,
                          "thousandsSeparator": true
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "6d7e8f90-1234-5678-9abc-def012345678",
                      "type": "FormulaField",
                      "slug": "formula-deadline",
                      "label": "Computed Deadline",
                      "required": false,
                      "system": false,
                      "config": {
                        "formulaText": "addDays(startDate, 7)",
                        "uiFormatKind": "date",
                        "status": "ACTIVE",
                        "defaultValue": null,
                        "dateFormatOptions": {
                          "format": "date",
                          "dateFormat": "DD/MM/YYYY",
                          "showTime": false
                        },
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "45c5da96-0dc2-4cc1-ba61-7660a9c6da32",
                      "type": "ReferenceField",
                      "slug": "customer-ref",
                      "label": "Customer",
                      "required": false,
                      "system": false,
                      "config": {
                        "targetSchema": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                        "targetDisplayField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                        "deleteBehavior": "SET_NULL",
                        "defaultValue": null,
                        "filterFields": [],
                        "descriptionFields": [],
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "7e8f9012-3456-789a-bcde-f01234567890",
                      "type": "ReferenceField",
                      "slug": "company-ref",
                      "label": "Company",
                      "required": false,
                      "system": false,
                      "config": {
                        "targetSchema": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                        "targetDisplayField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                        "deleteBehavior": "RESTRICT",
                        "defaultValue": null,
                        "filterFields": [],
                        "descriptionFields": [],
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
                      "type": "AutoIncrementalField",
                      "slug": "sequence-code",
                      "label": "Sequence Code",
                      "required": false,
                      "system": true,
                      "config": {
                        "segmentedByFieldId": "45c5da96-0dc2-4cc1-ba61-7660a9c6da32",
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "8f901234-5678-9abc-def0-123456789012",
                      "type": "AutoIncrementalField",
                      "slug": "order-number",
                      "label": "Order Number",
                      "required": false,
                      "system": true,
                      "config": {
                        "segmentedByFieldId": null,
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9012",
                      "type": "FileField",
                      "slug": "attachment",
                      "label": "Attachment",
                      "required": false,
                      "system": false,
                      "config": {}
                    },
                    {
                      "id": "f6a7b8c9-d0e1-2f3a-4b5c-6d7e8f901234",
                      "type": "ScheduleField",
                      "slug": "recurrence",
                      "label": "Recurrence",
                      "required": false,
                      "system": false,
                      "config": {
                        "referenceField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                        "beginningPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "frequency": "monthly"
                      }
                    },
                    {
                      "id": "9012abcd-ef01-2345-6789-abcdef012345",
                      "type": "ScheduleField",
                      "slug": "daily-recurrence",
                      "label": "Daily Recurrence",
                      "required": false,
                      "system": false,
                      "config": {
                        "referenceField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                        "beginningPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "frequency": "daily"
                      }
                    },
                    {
                      "id": "a7b8c9d0-e1f2-3a4b-5c6d-7e8f90123456",
                      "type": "MemberField",
                      "slug": "owner",
                      "label": "Owner",
                      "required": false,
                      "system": false,
                      "config": {
                        "defaultValue": null,
                        "conditionalFormatting": []
                      }
                    }
                  ],
                  "uniqueFields": [
                    "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                    "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd"
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the full public schema representation including fields.",
                      "marks": []
                    }
                  ],
                  "key": "PcBLDs5yl3P6"
                }
              ],
              "key": "fai0xIHG7HoA"
            }
          ],
          "key": "wvSUJNDAqnes"
        },
        "x-gitbook-description-html": "<p>Returns the full public schema representation including fields.</p>"
      },
      "delete": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Delete schema (v2)",
        "description": "Deletes one schema and removes it from folder navigation.",
        "operationId": "deleteSchemaV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schema deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2DeleteResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "deleted": true
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one schema and removes it from folder navigation.",
                      "marks": []
                    }
                  ],
                  "key": "w7mZ0cEjoDXQ"
                }
              ],
              "key": "ySUoBzk7ZCIx"
            }
          ],
          "key": "bNT4hAeaBUA8"
        },
        "x-gitbook-description-html": "<p>Deletes one schema and removes it from folder navigation.</p>"
      },
      "patch": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Patch schema metadata (v2)",
        "description": "Updates only top-level schema metadata.",
        "operationId": "patchSchemaV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaV2PatchRequest"
              },
              "examples": {
                "Toggle commentable": {
                  "description": "Toggle commentable",
                  "value": {
                    "commentable": true
                  }
                },
                "Rename schema": {
                  "description": "Rename schema",
                  "value": {
                    "name": "Customer Contacts",
                    "slug": "customer-contacts"
                  }
                },
                "Enable audit": {
                  "description": "Enable audit",
                  "value": {
                    "auditable": true
                  }
                },
                "Set highlighted field": {
                  "description": "Set highlighted field",
                  "value": {
                    "highlightedField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Schema patched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2ResourceResponse"
                },
                "example": {
                  "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "name": "Customer Contacts",
                  "slug": "customer-contacts",
                  "folder": {
                    "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
                    "name": "Customers",
                    "isRoot": false
                  },
                  "auditable": true,
                  "commentable": true,
                  "highlightedField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                  "fields": [
                    {
                      "id": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "type": "TextField",
                      "slug": "contact-name",
                      "label": "Customer Name",
                      "required": true,
                      "system": false,
                      "config": {
                        "textType": "LONG",
                        "defaultValue": "Unknown",
                        "conditionalFormatting": []
                      }
                    }
                  ],
                  "uniqueFields": []
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema patched successfully</p>"
          },
          "400": {
            "description": "Invalid schema patch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid schema patch</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Updates only top-level schema metadata.",
                      "marks": []
                    }
                  ],
                  "key": "sbodtbqR5VAu"
                }
              ],
              "key": "Jf8DiND93fKW"
            }
          ],
          "key": "QjpbRrlXaD9B"
        },
        "x-gitbook-description-html": "<p>Updates only top-level schema metadata.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/fields": {
      "post": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Create schema field (v2)",
        "description": "Creates a field with a typed public configuration contract and a backend-generated fieldId.\n\nNotes:\n- Field-level `unique` is intentionally not part of the public V2 contract.\n- Calculated fields (`FormulaField`, `AutoIncrementalField`) are stored in calc infrastructure and their values are system-managed.\n- Incoming record payloads that include calculated fields are ignored by the legacy data insertion flow.\n- Formula creation through this API also needs the workflow/dispatcher runtime path enabled in the API app in order to trigger recalculation tasks.\n",
        "operationId": "createSchemaFieldV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaV2CreateFieldRequest"
              },
              "examples": {
                "Text field (normal)": {
                  "description": "Text field (normal)",
                  "value": {
                    "type": "TextField",
                    "slug": "customer-name",
                    "label": "Customer Name",
                    "description": "Primary name shown for the customer.",
                    "required": true,
                    "config": {
                      "textType": "NORMAL",
                      "defaultValue": null,
                      "conditionalFormatting": []
                    }
                  }
                },
                "Text field (long)": {
                  "description": "Text field (long)",
                  "value": {
                    "type": "TextField",
                    "slug": "customer-notes",
                    "label": "Customer Notes",
                    "required": false,
                    "config": {
                      "textType": "LONG",
                      "defaultValue": "Add internal notes here...",
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (plain integer)": {
                  "description": "Number field (plain integer)",
                  "value": {
                    "type": "NumberField",
                    "slug": "quantity",
                    "label": "Quantity",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "number",
                        "decimals": 0,
                        "thousandsSeparator": false
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (decimal with thousands)": {
                  "description": "Number field (decimal with thousands)",
                  "value": {
                    "type": "NumberField",
                    "slug": "weight",
                    "label": "Weight (kg)",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "number",
                        "decimals": 2,
                        "thousandsSeparator": true,
                        "negativesInRed": false
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (currency € prefix)": {
                  "description": "Number field (currency € prefix)",
                  "value": {
                    "type": "NumberField",
                    "slug": "amount-eur",
                    "label": "Amount (EUR)",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "currency",
                        "decimals": 2,
                        "negativesInRed": true,
                        "thousandsSeparator": true,
                        "symbolEnabled": true,
                        "symbolPosition": "before",
                        "symbolValue": "€"
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (currency $ suffix)": {
                  "description": "Number field (currency $ suffix)",
                  "value": {
                    "type": "NumberField",
                    "slug": "amount-usd",
                    "label": "Amount (USD)",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "currency",
                        "decimals": 2,
                        "negativesInRed": false,
                        "thousandsSeparator": true,
                        "symbolEnabled": true,
                        "symbolPosition": "right",
                        "symbolValue": " $"
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (percentage)": {
                  "description": "Number field (percentage)",
                  "value": {
                    "type": "NumberField",
                    "slug": "discount-rate",
                    "label": "Discount Rate",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "percentage",
                        "decimals": 1,
                        "negativesInRed": true
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Number field (duration HH:MM)": {
                  "description": "Number field (duration HH:MM)",
                  "value": {
                    "type": "NumberField",
                    "slug": "tracked-time",
                    "label": "Tracked Time",
                    "required": false,
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "duration",
                        "durationFormat": "HH:MM"
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Date field (date only)": {
                  "description": "Date field (date only)",
                  "value": {
                    "type": "DateField",
                    "slug": "birth-date",
                    "label": "Birth Date",
                    "required": false,
                    "config": {
                      "defaultValue": null,
                      "formatOptions": {
                        "format": "date",
                        "dateFormat": "YYYY-MM-DD",
                        "showTime": false
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Date field (datetime EU)": {
                  "description": "Date field (datetime EU)",
                  "value": {
                    "type": "DateField",
                    "slug": "due-date",
                    "label": "Due Date",
                    "required": false,
                    "config": {
                      "defaultValue": null,
                      "formatOptions": {
                        "format": "datetime",
                        "dateFormat": "DD/MM/YYYY",
                        "showTime": true
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Date field (datetime US)": {
                  "description": "Date field (datetime US)",
                  "value": {
                    "type": "DateField",
                    "slug": "appointment-at",
                    "label": "Appointment",
                    "required": false,
                    "config": {
                      "defaultValue": null,
                      "formatOptions": {
                        "format": "datetime",
                        "dateFormat": "MM/DD/YYYY",
                        "showTime": true
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Option field (select dropdown)": {
                  "description": "Option field (select dropdown)",
                  "value": {
                    "type": "OptionField",
                    "slug": "priority",
                    "label": "Priority",
                    "required": false,
                    "config": {
                      "options": [
                        {
                          "id": 1,
                          "name": "Low",
                          "color": "default"
                        },
                        {
                          "id": 2,
                          "name": "Medium",
                          "color": "warning"
                        },
                        {
                          "id": 3,
                          "name": "High",
                          "color": "danger"
                        }
                      ],
                      "defaultValue": 1,
                      "conditionalFormatting": [],
                      "buttonConfig": null
                    }
                  }
                },
                "Option field (button cycle)": {
                  "description": "Option field (button cycle)",
                  "value": {
                    "type": "OptionField",
                    "slug": "stage",
                    "label": "Stage",
                    "required": false,
                    "config": {
                      "options": [
                        {
                          "id": 1,
                          "name": "To Do",
                          "color": "default"
                        },
                        {
                          "id": 2,
                          "name": "Doing",
                          "color": "warning"
                        },
                        {
                          "id": 3,
                          "name": "Done",
                          "color": "success"
                        }
                      ],
                      "defaultValue": 1,
                      "conditionalFormatting": [],
                      "buttonConfig": {
                        "displayMode": "button",
                        "buttonBehavior": {
                          "mode": "cycle",
                          "cycleOrder": [
                            1,
                            2,
                            3
                          ],
                          "requireConfirmation": false,
                          "lockAfterSelection": false,
                          "allowReselect": true
                        }
                      }
                    }
                  }
                },
                "Option field (button dropdown w/ confirm)": {
                  "description": "Option field (button dropdown w/ confirm)",
                  "value": {
                    "type": "OptionField",
                    "slug": "status",
                    "label": "Status",
                    "required": false,
                    "config": {
                      "options": [
                        {
                          "id": 1,
                          "name": "Open",
                          "color": "default"
                        },
                        {
                          "id": 2,
                          "name": "In Progress",
                          "color": "warning"
                        },
                        {
                          "id": 3,
                          "name": "Done",
                          "color": "success"
                        }
                      ],
                      "defaultValue": 1,
                      "conditionalFormatting": [],
                      "buttonConfig": {
                        "displayMode": "button",
                        "buttonBehavior": {
                          "mode": "dropdown",
                          "requireConfirmation": true,
                          "confirmationMessage": "Confirm status change",
                          "useFixedLabel": true,
                          "buttonLabel": "Set status",
                          "allowReselect": true
                        }
                      }
                    }
                  }
                },
                "Formula field (none)": {
                  "description": "Formula field (none)",
                  "value": {
                    "type": "FormulaField",
                    "slug": "formula-summary",
                    "label": "Formula Summary",
                    "required": false,
                    "config": {
                      "formulaText": "concat(firstName, ' ', lastName)",
                      "uiFormatKind": "none",
                      "status": "ACTIVE",
                      "conditionalFormatting": []
                    }
                  }
                },
                "Formula field (number)": {
                  "description": "Formula field (number)",
                  "value": {
                    "type": "FormulaField",
                    "slug": "formula-total",
                    "label": "Formula Total",
                    "required": false,
                    "config": {
                      "formulaText": "amount * 1.21",
                      "uiFormatKind": "number",
                      "status": "ACTIVE",
                      "numberFormatOptions": {
                        "format": "number",
                        "decimals": 2,
                        "thousandsSeparator": true
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Formula field (date)": {
                  "description": "Formula field (date)",
                  "value": {
                    "type": "FormulaField",
                    "slug": "formula-deadline",
                    "label": "Computed Deadline",
                    "required": false,
                    "config": {
                      "formulaText": "addDays(startDate, 7)",
                      "uiFormatKind": "date",
                      "status": "ACTIVE",
                      "dateFormatOptions": {
                        "format": "date",
                        "dateFormat": "DD/MM/YYYY",
                        "showTime": false
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Formula field (member)": {
                  "description": "Formula field (member)",
                  "value": {
                    "type": "FormulaField",
                    "slug": "formula-assignee",
                    "label": "Computed Assignee",
                    "required": false,
                    "config": {
                      "formulaText": "manager",
                      "uiFormatKind": "member",
                      "status": "ACTIVE",
                      "conditionalFormatting": []
                    }
                  }
                },
                "Reference field (minimal)": {
                  "description": "Reference field (minimal)",
                  "value": {
                    "type": "ReferenceField",
                    "slug": "company-ref",
                    "label": "Company",
                    "required": false,
                    "config": {
                      "targetSchema": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                      "targetDisplayField": "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                    }
                  }
                },
                "Reference field (restrict + filter + description)": {
                  "description": "Reference field (restrict + filter + description)",
                  "value": {
                    "type": "ReferenceField",
                    "slug": "customer-ref",
                    "label": "Customer",
                    "required": false,
                    "config": {
                      "targetSchema": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                      "targetDisplayField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "deleteBehavior": "RESTRICT",
                      "defaultValue": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621::Ref A",
                      "filterFields": [
                        {
                          "fatherField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                          "currentField": "45c5da96-0dc2-4cc1-ba61-7660a9c6da32",
                          "comparison": "EQUAL",
                          "value": null
                        }
                      ],
                      "descriptionFields": [
                        {
                          "id": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                          "fieldType": "NumberField",
                          "options": null,
                          "format": "number"
                        }
                      ],
                      "conditionalFormatting": []
                    }
                  }
                },
                "Autoincremental (global counter)": {
                  "description": "Autoincremental (global counter)",
                  "value": {
                    "type": "AutoIncrementalField",
                    "slug": "order-number",
                    "label": "Order Number",
                    "required": false,
                    "config": {
                      "segmentedByFieldId": null,
                      "conditionalFormatting": []
                    }
                  }
                },
                "Autoincremental (segmented)": {
                  "description": "Autoincremental (segmented)",
                  "value": {
                    "type": "AutoIncrementalField",
                    "slug": "sequence-code",
                    "label": "Sequence Code",
                    "required": false,
                    "config": {
                      "segmentedByFieldId": "45c5da96-0dc2-4cc1-ba61-7660a9c6da32",
                      "conditionalFormatting": []
                    }
                  }
                },
                "File field": {
                  "description": "File field",
                  "value": {
                    "type": "FileField",
                    "slug": "attachment",
                    "label": "Attachment",
                    "required": false,
                    "config": {}
                  }
                },
                "Schedule field (monthly)": {
                  "description": "Schedule field (monthly)",
                  "value": {
                    "type": "ScheduleField",
                    "slug": "monthly-recurrence",
                    "label": "Monthly Recurrence",
                    "required": false,
                    "config": {
                      "referenceField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                      "beginningPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "frequency": "monthly"
                    }
                  }
                },
                "Schedule field (daily)": {
                  "description": "Schedule field (daily)",
                  "value": {
                    "type": "ScheduleField",
                    "slug": "daily-recurrence",
                    "label": "Daily Recurrence",
                    "required": false,
                    "config": {
                      "referenceField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                      "beginningPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "frequency": "daily"
                    }
                  }
                },
                "Member field": {
                  "description": "Member field",
                  "value": {
                    "type": "MemberField",
                    "slug": "owner",
                    "label": "Owner",
                    "required": false,
                    "config": {
                      "defaultValue": null,
                      "conditionalFormatting": []
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Field created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2FieldMutationResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                  "slug": "status"
                }
              }
            },
            "x-gitbook-description-html": "<p>Field created successfully</p>"
          },
          "400": {
            "description": "Invalid field payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid field payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a field with a typed public configuration contract and a backend-generated fieldId.",
                      "marks": []
                    }
                  ],
                  "key": "itTklfLj4Xv8"
                }
              ],
              "key": "YCuKJWKHSLjr"
            },
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Notes:",
                      "marks": []
                    }
                  ],
                  "key": "2SHeBhWmyha2"
                }
              ],
              "key": "p1548cO1TnuP"
            },
            {
              "object": "block",
              "type": "list-unordered",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "Field-level ",
                              "marks": []
                            },
                            {
                              "object": "leaf",
                              "text": "unique",
                              "marks": [
                                {
                                  "object": "mark",
                                  "type": "code",
                                  "data": {}
                                }
                              ]
                            },
                            {
                              "object": "leaf",
                              "text": " is intentionally not part of the public V2 contract.",
                              "marks": []
                            }
                          ],
                          "key": "Mok9s6YPRoTg"
                        }
                      ],
                      "key": "2HkJAkHb6x98"
                    }
                  ],
                  "key": "a01xO6jFJemE"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "Calculated fields (",
                              "marks": []
                            },
                            {
                              "object": "leaf",
                              "text": "FormulaField",
                              "marks": [
                                {
                                  "object": "mark",
                                  "type": "code",
                                  "data": {}
                                }
                              ]
                            },
                            {
                              "object": "leaf",
                              "text": ", ",
                              "marks": []
                            },
                            {
                              "object": "leaf",
                              "text": "AutoIncrementalField",
                              "marks": [
                                {
                                  "object": "mark",
                                  "type": "code",
                                  "data": {}
                                }
                              ]
                            },
                            {
                              "object": "leaf",
                              "text": ") are stored in calc infrastructure and their values are system-managed.",
                              "marks": []
                            }
                          ],
                          "key": "7cIClWjNDHe4"
                        }
                      ],
                      "key": "NXtxVb0XiHQT"
                    }
                  ],
                  "key": "SDCQ1JwqTGeO"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "Incoming record payloads that include calculated fields are ignored by the legacy data insertion flow.",
                              "marks": []
                            }
                          ],
                          "key": "JK8kT0NQAQci"
                        }
                      ],
                      "key": "WRKzhR1o3H2V"
                    }
                  ],
                  "key": "N2xgDBC6kRjf"
                },
                {
                  "object": "block",
                  "type": "list-item",
                  "isVoid": false,
                  "data": {},
                  "nodes": [
                    {
                      "object": "block",
                      "type": "paragraph",
                      "isVoid": false,
                      "data": {},
                      "nodes": [
                        {
                          "object": "text",
                          "leaves": [
                            {
                              "object": "leaf",
                              "text": "Formula creation through this API also needs the workflow/dispatcher runtime path enabled in the API app in order to trigger recalculation tasks.",
                              "marks": []
                            }
                          ],
                          "key": "dhsjkA0uAPoB"
                        }
                      ],
                      "key": "IMm6cUk40SFl"
                    }
                  ],
                  "key": "ixYnkSMggtsV"
                }
              ],
              "key": "buTWZoI4yBKd"
            }
          ],
          "key": "gpAdHrMlw5Ry"
        },
        "x-gitbook-description-html": "<p>Creates a field with a typed public configuration contract and a backend-generated fieldId.</p><p>Notes:</p><ul><li>Field-level <code>unique</code> is intentionally not part of the public V2 contract.</li><li>Calculated fields (<code>FormulaField</code>, <code>AutoIncrementalField</code>) are stored in calc infrastructure and their values are system-managed.</li><li>Incoming record payloads that include calculated fields are ignored by the legacy data insertion flow.</li><li>Formula creation through this API also needs the workflow/dispatcher runtime path enabled in the API app in order to trigger recalculation tasks.</li></ul>"
      }
    },
    "/api/v2/schemas/{schemaId}/fields/{fieldId}": {
      "get": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Get schema field (v2)",
        "operationId": "getSchemaFieldV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2FieldResponse"
                },
                "example": {
                  "id": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                  "type": "OptionField",
                  "slug": "status",
                  "label": "Status",
                  "description": "Current lifecycle status.",
                  "required": false,
                  "system": false,
                  "config": {
                    "options": [
                      {
                        "id": 1,
                        "name": "Open",
                        "color": "default"
                      },
                      {
                        "id": 2,
                        "name": "In Progress",
                        "color": "warning"
                      },
                      {
                        "id": 3,
                        "name": "Done",
                        "color": "success"
                      }
                    ],
                    "defaultValue": 1,
                    "conditionalFormatting": [],
                    "buttonConfig": {
                      "displayMode": "button",
                      "buttonBehavior": {
                        "mode": "cycle",
                        "cycleOrder": [
                          1,
                          2,
                          3
                        ],
                        "requireConfirmation": false,
                        "lockAfterSelection": false,
                        "useFixedLabel": false,
                        "allowReselect": true
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Field retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Field not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Field not found</p>"
          }
        }
      },
      "delete": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Delete schema field (v2)",
        "operationId": "deleteSchemaFieldV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Field deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2FieldMutationResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "fieldId": "a8f1d7e3-2b5c-4d9e-8a1b-3c4d5e6f7890",
                  "slug": "status"
                }
              }
            },
            "x-gitbook-description-html": "<p>Field deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Field not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Field not found</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Patch schema field (v2)",
        "description": "Updates one field using its top-level type, label, slug, required, description and config properties. Omitted properties keep their current value. The config object updates the typed field configuration. When sending config, also include type so the backend can decode the field configuration. Send description=null or a blank string to clear the field description. Calculated record values are recomputed by the backend.",
        "operationId": "patchSchemaFieldV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaV2UpdateFieldRequest"
              },
              "examples": {
                "Rename slug and label": {
                  "description": "Rename slug and label",
                  "value": {
                    "slug": "customer-full-name",
                    "label": "Customer Full Name",
                    "description": "Customer name used in documents and reports."
                  }
                },
                "Toggle required": {
                  "description": "Toggle required",
                  "value": {
                    "required": true
                  }
                },
                "Patch text field (long with default)": {
                  "description": "Patch text field (long with default)",
                  "value": {
                    "type": "TextField",
                    "label": "Customer Full Name",
                    "required": false,
                    "config": {
                      "textType": "LONG",
                      "defaultValue": "Unknown",
                      "conditionalFormatting": []
                    }
                  }
                },
                "Declare expected DNI/NIE format (non-blocking)": {
                  "description": "Declare expected DNI/NIE format (non-blocking)",
                  "value": {
                    "type": "TextField",
                    "config": {
                      "expectedFormat": {
                        "kind": "dniNie"
                      }
                    }
                  }
                },
                "Patch number field (to currency)": {
                  "description": "Patch number field (to currency)",
                  "value": {
                    "type": "NumberField",
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "currency",
                        "decimals": 2,
                        "thousandsSeparator": true,
                        "symbolEnabled": true,
                        "symbolPosition": "before",
                        "symbolValue": "€"
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Patch number field (to percentage)": {
                  "description": "Patch number field (to percentage)",
                  "value": {
                    "type": "NumberField",
                    "config": {
                      "defaultValue": "0",
                      "formatOptions": {
                        "format": "percentage",
                        "decimals": 1
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Patch date field (to date only)": {
                  "description": "Patch date field (to date only)",
                  "value": {
                    "type": "DateField",
                    "config": {
                      "defaultValue": null,
                      "formatOptions": {
                        "format": "date",
                        "dateFormat": "YYYY-MM-DD",
                        "showTime": false
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Patch option field (button cycle)": {
                  "description": "Patch option field (button cycle)",
                  "value": {
                    "type": "OptionField",
                    "config": {
                      "options": [
                        {
                          "id": 1,
                          "name": "To Do",
                          "color": "default"
                        },
                        {
                          "id": 2,
                          "name": "Doing",
                          "color": "warning"
                        },
                        {
                          "id": 3,
                          "name": "Done",
                          "color": "success"
                        }
                      ],
                      "defaultValue": 1,
                      "conditionalFormatting": [],
                      "buttonConfig": {
                        "displayMode": "button",
                        "buttonBehavior": {
                          "mode": "cycle",
                          "cycleOrder": [
                            1,
                            2,
                            3
                          ],
                          "allowReselect": true
                        }
                      }
                    }
                  }
                },
                "Patch option field (drop button mode)": {
                  "description": "Patch option field (drop button mode)",
                  "value": {
                    "type": "OptionField",
                    "config": {
                      "options": [
                        {
                          "id": 1,
                          "name": "Open",
                          "color": "default"
                        },
                        {
                          "id": 2,
                          "name": "In Progress",
                          "color": "warning"
                        },
                        {
                          "id": 3,
                          "name": "Done",
                          "color": "success"
                        }
                      ],
                      "defaultValue": 1,
                      "conditionalFormatting": [],
                      "buttonConfig": null
                    }
                  }
                },
                "Patch formula field (formula text)": {
                  "description": "Patch formula field (formula text)",
                  "value": {
                    "type": "FormulaField",
                    "config": {
                      "formulaText": "amount * 1.10",
                      "uiFormatKind": "number",
                      "status": "ACTIVE",
                      "numberFormatOptions": {
                        "format": "number",
                        "decimals": 2,
                        "thousandsSeparator": true
                      },
                      "conditionalFormatting": []
                    }
                  }
                },
                "Patch reference field (delete behavior)": {
                  "description": "Patch reference field (delete behavior)",
                  "value": {
                    "type": "ReferenceField",
                    "config": {
                      "targetSchema": "5223cbc8-8c6c-4694-93bc-dd176364df9b",
                      "targetDisplayField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "deleteBehavior": "RESTRICT",
                      "defaultValue": null,
                      "filterFields": [],
                      "descriptionFields": [],
                      "conditionalFormatting": []
                    }
                  }
                },
                "Patch schedule field (to daily)": {
                  "description": "Patch schedule field (to daily)",
                  "value": {
                    "type": "ScheduleField",
                    "config": {
                      "referenceField": "c52efe3f-2825-4c60-a7e3-34dd4c1ce043",
                      "beginningPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "endingPeriodField": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                      "frequency": "daily"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Field updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2FieldMutationResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "fieldId": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                  "slug": "customer-full-name"
                }
              }
            },
            "x-gitbook-description-html": "<p>Field updated successfully</p>"
          },
          "400": {
            "description": "Invalid field patch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid field patch</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        }
      }
    },
    "/api/v2/schemas/{schemaId}/records": {
      "get": {
        "tags": [
          "v2-data"
        ],
        "summary": "List records (v2)",
        "description": "Lists records using simple offset pagination. For advanced filtering, sorting, or field selection, use the query endpoint.",
        "operationId": "listRecordsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Zero-based row offset. Defaults to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "x-gitbook-description-html": "<p>Zero-based row offset. Defaults to 0.</p>"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum rows to return. Defaults to 50 and is capped at 200.",
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1
            },
            "x-gitbook-description-html": "<p>Maximum rows to return. Defaults to 50 and is capped at 200.</p>"
          }
        ],
        "responses": {
          "200": {
            "description": "Records listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2QueryResponse"
                },
                "example": {
                  "records": [
                    {
                      "recordId": "550e8400-e29b-41d4-a716-446655440000",
                      "values": {
                        "contact-name": "Ada Lovelace",
                        "contact-email": "ada@example.com",
                        "status": 2,
                        "amount": 1250.5,
                        "due-date": "2026-05-15T12:00:00Z",
                        "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                      }
                    },
                    {
                      "recordId": "7c9a4b31-e85d-42f7-8b6a-123456789abc",
                      "values": {
                        "contact-name": "Alan Turing",
                        "contact-email": "alan@example.com",
                        "status": 1,
                        "amount": 890.0
                      }
                    }
                  ],
                  "page": {
                    "offset": 0,
                    "limit": 50,
                    "total": 2,
                    "count": 2,
                    "hasMore": false
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Records listed successfully</p>"
          },
          "400": {
            "description": "Invalid pagination",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid pagination</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Lists records using simple offset pagination. For advanced filtering, sorting, or field selection, use the query endpoint.",
                      "marks": []
                    }
                  ],
                  "key": "bsNFfFaamyKk"
                }
              ],
              "key": "CSCpWcAi105V"
            }
          ],
          "key": "bdIQts4V4pKg"
        },
        "x-gitbook-description-html": "<p>Lists records using simple offset pagination. For advanced filtering, sorting, or field selection, use the query endpoint.</p>"
      },
      "post": {
        "tags": [
          "v2-data"
        ],
        "summary": "Create records (v2)",
        "description": "Creates one or more records in a single request using field slugs instead of field UUIDs. Best-effort: valid records are inserted and invalid ones are reported per index in 'errors' (the request is not rolled back). Returns the created record ids; query them if you need the full representation. Reference fields accept either the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server resolves and stores the canonical 'recordId::displayValue' (any client-supplied label is replaced with the target's current targetDisplayField value), and rejects references whose record id or display value does not exist in the target schema with reason 'data_field_reference_not_found'.",
        "operationId": "createRecordsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataV2CreateRecordsRequest"
              },
              "examples": {
                "Create multiple records": {
                  "description": "Create multiple records",
                  "value": {
                    "records": [
                      {
                        "contact-name": "Ada Lovelace",
                        "contact-email": "ada@example.com"
                      },
                      {
                        "contact-name": "Grace Hopper",
                        "contact-email": "grace@example.com",
                        "status": 2,
                        "amount": 1999.99,
                        "due-date": "2026-06-01T09:00:00Z",
                        "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621",
                        "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Batch processed. Inspect 'errors' for any records that were rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2CreateRecordsResponse"
                },
                "examples": {
                  "All created": {
                    "description": "All created",
                    "value": {
                      "created": [
                        "550e8400-e29b-41d4-a716-446655440000",
                        "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                      ],
                      "errors": []
                    }
                  },
                  "Partial success": {
                    "description": "Partial success",
                    "value": {
                      "created": [
                        "550e8400-e29b-41d4-a716-446655440000"
                      ],
                      "errors": [
                        {
                          "index": 1,
                          "reason": "record_field_not_found",
                          "message": "Field 'contact-emial' was not found in schema '2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e'.",
                          "action": "Use a valid field slug from the schema and retry."
                        }
                      ]
                    }
                  },
                  "Reference not found": {
                    "description": "Reference not found",
                    "value": {
                      "created": [],
                      "errors": [
                        {
                          "index": 0,
                          "reason": "data_field_reference_not_found",
                          "message": "Referenced record was not found in the target schema.",
                          "action": "Use an existing record id or an existing display value for this reference field."
                        }
                      ]
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Batch processed. Inspect 'errors' for any records that were rejected.</p>"
          },
          "400": {
            "description": "Malformed or empty request payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Malformed or empty request payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates one or more records in a single request using field slugs instead of field UUIDs. Best-effort: valid records are inserted and invalid ones are reported per index in 'errors' (the request is not rolled back). Returns the created record ids; query them if you need the full representation. Reference fields accept either the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server resolves and stores the canonical 'recordId::displayValue' (any client-supplied label is replaced with the target's current targetDisplayField value), and rejects references whose record id or display value does not exist in the target schema with reason 'data_field_reference_not_found'.",
                      "marks": []
                    }
                  ],
                  "key": "rQgG4bSH3YVD"
                }
              ],
              "key": "prY649WNK2kj"
            }
          ],
          "key": "BzBJa1gKzDk7"
        },
        "x-gitbook-description-html": "<p>Creates one or more records in a single request using field slugs instead of field UUIDs. Best-effort: valid records are inserted and invalid ones are reported per index in 'errors' (the request is not rolled back). Returns the created record ids; query them if you need the full representation. Reference fields accept either the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server resolves and stores the canonical 'recordId::displayValue' (any client-supplied label is replaced with the target's current targetDisplayField value), and rejects references whose record id or display value does not exist in the target schema with reason 'data_field_reference_not_found'.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records/{recordId}": {
      "get": {
        "tags": [
          "v2-data"
        ],
        "summary": "Get record (v2)",
        "operationId": "getRecordV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2RecordResponse"
                },
                "example": {
                  "recordId": "550e8400-e29b-41d4-a716-446655440000",
                  "values": {
                    "contact-name": "Ada Lovelace",
                    "contact-email": "ada@example.com",
                    "status": 2,
                    "amount": 1250.5,
                    "due-date": "2026-05-15T12:00:00Z",
                    "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Record retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Record not found</p>"
          }
        }
      },
      "patch": {
        "tags": [
          "v2-data"
        ],
        "summary": "Patch record (v2)",
        "description": "Patches one record using set/unset by field slug. Reference fields accept the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server stores the canonical 'recordId::displayValue'. If the referenced record id or display value does not exist in the target schema, the request is rejected with reason 'data_field_reference_not_found'.",
        "operationId": "patchRecordV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataV2PatchRecordRequest"
              },
              "examples": {
                "Set and unset fields": {
                  "description": "Set and unset fields",
                  "value": {
                    "set": {
                      "contact-name": "Ada Lovelace Updated"
                    },
                    "unset": [
                      "contact-email"
                    ]
                  }
                },
                "Update multiple typed values": {
                  "description": "Update multiple typed values",
                  "value": {
                    "set": {
                      "status": 3,
                      "amount": 2500.0,
                      "due-date": "2026-07-01T09:00:00Z",
                      "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                    }
                  }
                },
                "Unset only": {
                  "description": "Unset only",
                  "value": {
                    "unset": [
                      "contact-email",
                      "due-date"
                    ]
                  }
                },
                "Set a reference field": {
                  "description": "Set a reference field",
                  "value": {
                    "set": {
                      "customer-ref": "8ad602a1-f6e3-43f6-9ab2-f1c5afc99621"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Record updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2RecordResponse"
                },
                "example": {
                  "recordId": "550e8400-e29b-41d4-a716-446655440000",
                  "values": {
                    "contact-name": "Ada Lovelace Updated",
                    "status": 2,
                    "amount": 1250.5,
                    "due-date": "2026-05-15T12:00:00Z",
                    "owner": "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Record updated successfully</p>"
          },
          "400": {
            "description": "Invalid record patch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid record patch</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Patches one record using set/unset by field slug. Reference fields accept the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server stores the canonical 'recordId::displayValue'. If the referenced record id or display value does not exist in the target schema, the request is rejected with reason 'data_field_reference_not_found'.",
                      "marks": []
                    }
                  ],
                  "key": "Qasb1OB2ktdy"
                }
              ],
              "key": "i7yJ1mjxdDGX"
            }
          ],
          "key": "HPgzbwKHbsVO"
        },
        "x-gitbook-description-html": "<p>Patches one record using set/unset by field slug. Reference fields accept the target record id (a bare UUID, or the compound 'recordId::anything' whose label is ignored) or an exact display value; the server stores the canonical 'recordId::displayValue'. If the referenced record id or display value does not exist in the target schema, the request is rejected with reason 'data_field_reference_not_found'.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records/{recordId}/comments": {
      "get": {
        "tags": [
          "v2-comments"
        ],
        "summary": "List record comments (v2)",
        "description": "Returns all comments for a given record.",
        "operationId": "listCommentsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommentV2Response"
                  }
                },
                "example": [
                  {
                    "id": "cd8e3b2a-1f5c-4e9a-8b7d-0a2b3c4d5e6f",
                    "recordId": "550e8400-e29b-41d4-a716-446655440000",
                    "createdAt": "2026-04-22T10:15:00Z",
                    "createdBy": "developer@example.com",
                    "content": [
                      {
                        "type": "TEXT",
                        "value": "This record needs review."
                      }
                    ]
                  },
                  {
                    "id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
                    "recordId": "550e8400-e29b-41d4-a716-446655440000",
                    "createdAt": "2026-04-22T11:30:00Z",
                    "createdBy": "developer@example.com",
                    "content": [
                      {
                        "type": "TEXT",
                        "value": "Assigning to "
                      },
                      {
                        "type": "MENTION",
                        "value": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"
                      },
                      {
                        "type": "TEXT",
                        "value": " for follow up."
                      }
                    ]
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Comments retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Record not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns all comments for a given record.",
                      "marks": []
                    }
                  ],
                  "key": "d0Dha05otvVS"
                }
              ],
              "key": "EZeoq5THNkDi"
            }
          ],
          "key": "vWjlg1r5JiSi"
        },
        "x-gitbook-description-html": "<p>Returns all comments for a given record.</p>"
      },
      "post": {
        "tags": [
          "v2-comments"
        ],
        "summary": "Create record comment (v2)",
        "description": "Creates a comment on a record with one or more content items.",
        "operationId": "createCommentV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentV2CreateRequest"
              },
              "examples": {
                "Plain text": {
                  "description": "Plain text",
                  "value": {
                    "content": [
                      {
                        "type": "TEXT",
                        "value": "This record needs review."
                      }
                    ]
                  }
                },
                "Text with mention": {
                  "description": "Text with mention",
                  "value": {
                    "content": [
                      {
                        "type": "TEXT",
                        "value": "Assigning to "
                      },
                      {
                        "type": "MENTION",
                        "value": "9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6"
                      },
                      {
                        "type": "TEXT",
                        "value": " for follow up."
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Comment created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentV2Response"
                },
                "example": {
                  "id": "cd8e3b2a-1f5c-4e9a-8b7d-0a2b3c4d5e6f",
                  "recordId": "550e8400-e29b-41d4-a716-446655440000",
                  "createdAt": "2026-04-22T10:15:00Z",
                  "createdBy": "developer@example.com",
                  "content": [
                    {
                      "type": "TEXT",
                      "value": "This record needs review."
                    }
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Comment created successfully</p>"
          },
          "400": {
            "description": "Invalid comment payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid comment payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Record not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a comment on a record with one or more content items.",
                      "marks": []
                    }
                  ],
                  "key": "PJOyY1NztPc6"
                }
              ],
              "key": "cWdPViQc6nkD"
            }
          ],
          "key": "8iCr5UaWzWmD"
        },
        "x-gitbook-description-html": "<p>Creates a comment on a record with one or more content items.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records/{recordId}/logs": {
      "get": {
        "tags": [
          "v2-logs"
        ],
        "summary": "List record logs (v2)",
        "description": "Returns the change history for a given record.",
        "operationId": "listLogsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Logs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LogV2Response"
                  }
                },
                "example": [
                  {
                    "recordId": "550e8400-e29b-41d4-a716-446655440000",
                    "timestamp": "2026-04-22T10:00:00Z",
                    "changeField": "",
                    "change": {
                      "beforeValue": null,
                      "afterValue": null,
                      "author": "developer@example.com",
                      "operation": "CREATE"
                    }
                  },
                  {
                    "recordId": "550e8400-e29b-41d4-a716-446655440000",
                    "timestamp": "2026-04-22T10:15:00Z",
                    "changeField": "status",
                    "change": {
                      "beforeValue": "1",
                      "afterValue": "2",
                      "author": "developer@example.com",
                      "operation": "UPDATE"
                    }
                  },
                  {
                    "recordId": "550e8400-e29b-41d4-a716-446655440000",
                    "timestamp": "2026-04-22T10:20:00Z",
                    "changeField": "amount",
                    "change": {
                      "beforeValue": "1000.00",
                      "afterValue": "1250.50",
                      "author": "developer@example.com",
                      "operation": "UPDATE"
                    }
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Logs retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Record not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns the change history for a given record.",
                      "marks": []
                    }
                  ],
                  "key": "cLtK32iXITRL"
                }
              ],
              "key": "gZbSQTWtwzFd"
            }
          ],
          "key": "09VazJcfoY16"
        },
        "x-gitbook-description-html": "<p>Returns the change history for a given record.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records:clear": {
      "delete": {
        "tags": [
          "v2-data"
        ],
        "summary": "Clear all records (v2)",
        "description": "Removes every record from the schema's table. Heritage rules (CASCADE / SET NULL) are applied to son schemas so that reference tables converge asynchronously through the standard CDC pipeline. The endpoint returns immediately after the table is cleared; downstream cleanup of related rows happens eventually.",
        "operationId": "clearRecordsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Records cleared successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2ClearRecordsResponse"
                },
                "example": {
                  "schemaId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "cleared": true
                }
              }
            },
            "x-gitbook-description-html": "<p>Records cleared successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Removes every record from the schema's table. Heritage rules (CASCADE / SET NULL) are applied to son schemas so that reference tables converge asynchronously through the standard CDC pipeline. The endpoint returns immediately after the table is cleared; downstream cleanup of related rows happens eventually.",
                      "marks": []
                    }
                  ],
                  "key": "BDUGEqAAtU8j"
                }
              ],
              "key": "WUr9EBKidYQ0"
            }
          ],
          "key": "86L3Hr4bMGep"
        },
        "x-gitbook-description-html": "<p>Removes every record from the schema's table. Heritage rules (CASCADE / SET NULL) are applied to son schemas so that reference tables converge asynchronously through the standard CDC pipeline. The endpoint returns immediately after the table is cleared; downstream cleanup of related rows happens eventually.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records:delete": {
      "post": {
        "tags": [
          "v2-data"
        ],
        "summary": "Delete records (v2)",
        "description": "Deletes one or more records of the schema in a single request. Record ids that no longer exist are ignored silently. Heritage rules (CASCADE / SET NULL) are applied to son schemas. The endpoint waits until the requested records are no longer visible before responding.",
        "operationId": "deleteRecordsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataV2DeleteRecordsRequest"
              },
              "example": {
                "recordIds": [
                  "550e8400-e29b-41d4-a716-446655440000",
                  "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Records deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2DeleteRecordsResponse"
                },
                "example": {
                  "recordIds": [
                    "550e8400-e29b-41d4-a716-446655440000",
                    "6c8a3e0d-4e5f-4a1b-9c2d-3e4f5a6b7c8d"
                  ],
                  "deleted": true
                }
              }
            },
            "x-gitbook-description-html": "<p>Records deleted successfully</p>"
          },
          "400": {
            "description": "Invalid delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid delete payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one or more records of the schema in a single request. Record ids that no longer exist are ignored silently. Heritage rules (CASCADE / SET NULL) are applied to son schemas. The endpoint waits until the requested records are no longer visible before responding.",
                      "marks": []
                    }
                  ],
                  "key": "cHmviJ5Xv8V5"
                }
              ],
              "key": "kCtel6MQs9Qj"
            }
          ],
          "key": "zCZin6w4w9sY"
        },
        "x-gitbook-description-html": "<p>Deletes one or more records of the schema in a single request. Record ids that no longer exist are ignored silently. Heritage rules (CASCADE / SET NULL) are applied to son schemas. The endpoint waits until the requested records are no longer visible before responding.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/records:query": {
      "post": {
        "tags": [
          "v2-data"
        ],
        "summary": "Query records (v2)",
        "description": "Runs the simple agent-oriented record query contract using field slugs and a simplified where/sort/page shape.",
        "operationId": "queryRecordsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataV2QueryRequest"
              },
              "examples": {
                "Lookup by id": {
                  "description": "Lookup by id",
                  "value": {
                    "select": [
                      "id",
                      "contact-name"
                    ],
                    "where": [
                      {
                        "field": "id",
                        "op": "eq",
                        "value": "550e8400-e29b-41d4-a716-446655440000"
                      }
                    ],
                    "sort": [
                      {
                        "field": "id",
                        "direction": "DESC"
                      }
                    ],
                    "page": {
                      "offset": 0,
                      "limit": 10
                    }
                  }
                },
                "Filter + multi-sort": {
                  "description": "Filter + multi-sort",
                  "value": {
                    "select": [
                      "id",
                      "contact-name",
                      "status",
                      "amount"
                    ],
                    "where": [
                      {
                        "field": "status",
                        "op": "in",
                        "value": [
                          1,
                          2
                        ]
                      },
                      {
                        "field": "amount",
                        "op": "gte",
                        "value": 500
                      }
                    ],
                    "sort": [
                      {
                        "field": "amount",
                        "direction": "DESC"
                      },
                      {
                        "field": "contact-name",
                        "direction": "ASC"
                      }
                    ],
                    "page": {
                      "offset": 0,
                      "limit": 25
                    }
                  }
                },
                "Filter + search term": {
                  "description": "Filter + search term",
                  "value": {
                    "select": [
                      "id",
                      "contact-name",
                      "status"
                    ],
                    "where": [
                      {
                        "field": "status",
                        "op": "in",
                        "value": [
                          "OPEN"
                        ]
                      }
                    ],
                    "search": {
                      "term": "garcia"
                    },
                    "page": {
                      "offset": 0,
                      "limit": 25
                    }
                  }
                },
                "Text contains": {
                  "description": "Text contains",
                  "value": {
                    "select": [
                      "id",
                      "contact-name",
                      "contact-email"
                    ],
                    "where": [
                      {
                        "field": "contact-name",
                        "op": "contains",
                        "value": "Lovelace"
                      }
                    ],
                    "page": {
                      "offset": 0,
                      "limit": 50
                    }
                  }
                },
                "Is not empty + date range": {
                  "description": "Is not empty + date range",
                  "value": {
                    "where": [
                      {
                        "field": "due-date",
                        "op": "is_not_empty"
                      },
                      {
                        "field": "due-date",
                        "op": "lte",
                        "value": "2026-12-31T23:59:59Z"
                      }
                    ],
                    "sort": [
                      {
                        "field": "due-date",
                        "direction": "ASC"
                      }
                    ]
                  }
                },
                "Not equal (neq)": {
                  "description": "Not equal (neq)",
                  "value": {
                    "where": [
                      {
                        "field": "status",
                        "op": "neq",
                        "value": 0
                      }
                    ]
                  }
                },
                "Greater than (gt)": {
                  "description": "Greater than (gt)",
                  "value": {
                    "where": [
                      {
                        "field": "amount",
                        "op": "gt",
                        "value": 1000
                      }
                    ]
                  }
                },
                "Less than (lt)": {
                  "description": "Less than (lt)",
                  "value": {
                    "where": [
                      {
                        "field": "amount",
                        "op": "lt",
                        "value": 100
                      }
                    ]
                  }
                },
                "Is empty (is_empty)": {
                  "description": "Is empty (is_empty)",
                  "value": {
                    "where": [
                      {
                        "field": "due-date",
                        "op": "is_empty"
                      }
                    ]
                  }
                },
                "Is not empty (is_not_empty)": {
                  "description": "Is not empty (is_not_empty)",
                  "value": {
                    "where": [
                      {
                        "field": "contact-email",
                        "op": "is_not_empty"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Query executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataV2QueryResponse"
                },
                "example": {
                  "records": [
                    {
                      "recordId": "550e8400-e29b-41d4-a716-446655440000",
                      "values": {
                        "contact-name": "Ada Lovelace",
                        "status": 2,
                        "amount": 1250.5
                      }
                    }
                  ],
                  "page": {
                    "offset": 0,
                    "limit": 25,
                    "total": 1,
                    "count": 1,
                    "hasMore": false
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Query executed successfully</p>"
          },
          "400": {
            "description": "Invalid query payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid query payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Runs the simple agent-oriented record query contract using field slugs and a simplified where/sort/page shape.",
                      "marks": []
                    }
                  ],
                  "key": "puggTwn2NSaC"
                }
              ],
              "key": "AP2qW6kMfkjo"
            }
          ],
          "key": "5NRBHFK07o3B"
        },
        "x-gitbook-description-html": "<p>Runs the simple agent-oriented record query contract using field slugs and a simplified where/sort/page shape.</p>"
      }
    },
    "/api/v2/schemas/{schemaId}/unique-fields": {
      "put": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Set unique fields (v2)",
        "description": "Replaces the composite unique constraint of the schema. The listed fields must be unique together across records. Send an empty array to clear it.",
        "operationId": "setSchemaUniqueFieldsV2",
        "parameters": [
          {
            "name": "schemaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaV2SetUniqueFieldsRequest"
              },
              "examples": {
                "Composite unique constraint": {
                  "description": "Composite unique constraint",
                  "value": {
                    "fieldIds": [
                      "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd"
                    ]
                  }
                },
                "Single field unique": {
                  "description": "Single field unique",
                  "value": {
                    "fieldIds": [
                      "c60b8526-5835-4c9f-aecd-9a16c7704a34"
                    ]
                  }
                },
                "Clear constraint": {
                  "description": "Clear constraint",
                  "value": {
                    "fieldIds": []
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Unique fields set successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaV2ResourceResponse"
                },
                "example": {
                  "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "name": "Contacts",
                  "slug": "contacts",
                  "folder": {
                    "id": "7f4e7c25-d8b2-4c1a-9f3e-6a7b5c8d9e1f",
                    "name": "Customers",
                    "isRoot": false
                  },
                  "auditable": true,
                  "commentable": true,
                  "highlightedField": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                  "fields": [
                    {
                      "id": "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                      "type": "TextField",
                      "slug": "contact-name",
                      "label": "Customer Name",
                      "required": true,
                      "system": false,
                      "config": {
                        "textType": "NORMAL",
                        "defaultValue": "Unknown",
                        "conditionalFormatting": []
                      }
                    },
                    {
                      "id": "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd",
                      "type": "TextField",
                      "slug": "notes",
                      "label": "Notes",
                      "required": false,
                      "system": false,
                      "config": {
                        "textType": "LONG",
                        "defaultValue": null,
                        "conditionalFormatting": []
                      }
                    }
                  ],
                  "uniqueFields": [
                    "c60b8526-5835-4c9f-aecd-9a16c7704a34",
                    "1d2e3f4a-5b6c-7d8e-9f01-23456789abcd"
                  ]
                }
              }
            },
            "x-gitbook-description-html": "<p>Unique fields set successfully</p>"
          },
          "400": {
            "description": "Invalid unique fields payload or unknown field ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid unique fields payload or unknown field ID</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Schema not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Schema not found</p>"
          },
          "409": {
            "description": "Existing records violate the requested unique constraint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Existing records violate the requested unique constraint</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Replaces the composite unique constraint of the schema. The listed fields must be unique together across records. Send an empty array to clear it.",
                      "marks": []
                    }
                  ],
                  "key": "cT4QIPW0Ct8L"
                }
              ],
              "key": "LLn8Ebhn3cr3"
            }
          ],
          "key": "1ZI5vsi6T3wK"
        },
        "x-gitbook-description-html": "<p>Replaces the composite unique constraint of the schema. The listed fields must be unique together across records. Send an empty array to clear it.</p>"
      }
    },
    "/api/v2/teamspaces/folders": {
      "get": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "List teamspace folders (v2)",
        "description": "Returns teamspace folders. Use include=resources when you need the currently published schema/display summaries inside each folder.",
        "operationId": "listTeamspaceFoldersV2",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "description": "Set to resources to include published resource summaries in each folder response.",
            "schema": {
              "type": "string",
              "enum": [
                "resources"
              ]
            },
            "x-gitbook-description-html": "<p>Set to resources to include published resource summaries in each folder response.</p>"
          }
        ],
        "responses": {
          "200": {
            "description": "Teamspace folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TeamspaceV2FolderResponse"
                  }
                },
                "example": [
                  {
                    "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                    "name": "Shared Dashboards",
                    "order": 1,
                    "isRoot": false,
                    "resourceCount": 2,
                    "resources": [
                      {
                        "id": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                        "name": "Customer records",
                        "type": "SCHEMA"
                      },
                      {
                        "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
                        "name": "Executive Revenue",
                        "type": "DISPLAY"
                      }
                    ],
                    "additionalProperties": {}
                  }
                ]
              }
            },
            "x-gitbook-description-html": "<p>Teamspace folders retrieved successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Returns teamspace folders. Use include=resources when you need the currently published schema/display summaries inside each folder.",
                      "marks": []
                    }
                  ],
                  "key": "DcHn10iDzQVU"
                }
              ],
              "key": "HMRKwBFJOvnJ"
            }
          ],
          "key": "wKksGRDFhd6k"
        },
        "x-gitbook-description-html": "<p>Returns teamspace folders. Use include=resources when you need the currently published schema/display summaries inside each folder.</p>"
      },
      "post": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "Create teamspace folder (v2)",
        "description": "Creates a folder inside the teamspace publishing area. Use it to group resources that are meant to be shared with other users.",
        "operationId": "createTeamspaceFolderV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamspaceV2CreateFolderRequest"
              },
              "examples": {
                "Full create": {
                  "description": "Full create",
                  "value": {
                    "name": "Customer Success",
                    "order": 10,
                    "additionalProperties": {
                      "icon": "folder-users"
                    }
                  }
                },
                "Minimal create": {
                  "description": "Minimal create",
                  "value": {
                    "name": "Shared"
                  }
                },
                "Ordered with icon": {
                  "description": "Ordered with icon",
                  "value": {
                    "name": "Executive",
                    "order": 1,
                    "additionalProperties": {
                      "icon": "crown",
                      "color": "gold"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Teamspace folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamspaceV2FolderResponse"
                },
                "example": {
                  "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                  "name": "Customer Success",
                  "order": 10,
                  "isRoot": false,
                  "resourceCount": 0,
                  "resources": [],
                  "additionalProperties": {
                    "icon": "folder-users"
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Teamspace folder created successfully</p>"
          },
          "400": {
            "description": "Invalid folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Creates a folder inside the teamspace publishing area. Use it to group resources that are meant to be shared with other users.",
                      "marks": []
                    }
                  ],
                  "key": "pVhzbbOc67oP"
                }
              ],
              "key": "pHG9nlgy7lJV"
            }
          ],
          "key": "hvjHJpPNiQyI"
        },
        "x-gitbook-description-html": "<p>Creates a folder inside the teamspace publishing area. Use it to group resources that are meant to be shared with other users.</p>"
      }
    },
    "/api/v2/teamspaces/folders/{folderId}": {
      "delete": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "Delete teamspace folder (v2)",
        "description": "Deletes one teamspace folder. Unpublish or move resources first if you want to preserve the shared structure before removal.",
        "operationId": "deleteTeamspaceFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Teamspace folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamspaceV2FolderDeleteResponse"
                },
                "example": {
                  "folderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                  "movedResourceCount": 3,
                  "targetFolder": {
                    "id": "00000000-0000-0000-0000-000000000000",
                    "name": "root",
                    "isRoot": true
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Teamspace folder deleted successfully</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Deletes one teamspace folder. Unpublish or move resources first if you want to preserve the shared structure before removal.",
                      "marks": []
                    }
                  ],
                  "key": "HUymWd3t04ZR"
                }
              ],
              "key": "BwA9hlO1i2Nl"
            }
          ],
          "key": "UhEhm4KolSUU"
        },
        "x-gitbook-description-html": "<p>Deletes one teamspace folder. Unpublish or move resources first if you want to preserve the shared structure before removal.</p>"
      },
      "patch": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "Patch teamspace folder (v2)",
        "description": "Updates one teamspace folder. Use this to rename the folder, change its sort order, or replace additionalProperties.",
        "operationId": "patchTeamspaceFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamspaceV2UpdateFolderRequest"
              },
              "examples": {
                "Full update": {
                  "description": "Full update",
                  "value": {
                    "name": "Shared KPIs",
                    "order": 5,
                    "additionalProperties": {
                      "icon": "chart-bar"
                    }
                  }
                },
                "Rename only": {
                  "description": "Rename only",
                  "value": {
                    "name": "Shared Analytics"
                  }
                },
                "Reorder only": {
                  "description": "Reorder only",
                  "value": {
                    "order": 2
                  }
                },
                "Update icon only": {
                  "description": "Update icon only",
                  "value": {
                    "additionalProperties": {
                      "icon": "chart-line"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Teamspace folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamspaceV2FolderResponse"
                },
                "example": {
                  "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                  "name": "Shared KPIs",
                  "order": 5,
                  "isRoot": false,
                  "resourceCount": 1,
                  "resources": [
                    {
                      "id": "0f6f062f-1478-4df2-96a1-c495d037d260",
                      "name": "Executive Revenue",
                      "type": "DISPLAY"
                    }
                  ],
                  "additionalProperties": {
                    "icon": "chart-bar"
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Teamspace folder updated successfully</p>"
          },
          "400": {
            "description": "Invalid folder payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid folder payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Updates one teamspace folder. Use this to rename the folder, change its sort order, or replace additionalProperties.",
                      "marks": []
                    }
                  ],
                  "key": "DF1rp5BgWyYg"
                }
              ],
              "key": "tQ1yTBMUzVfa"
            }
          ],
          "key": "LKDadE5EdN8f"
        },
        "x-gitbook-description-html": "<p>Updates one teamspace folder. Use this to rename the folder, change its sort order, or replace additionalProperties.</p>"
      }
    },
    "/api/v2/teamspaces/resources:publish": {
      "post": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "Publish resource to teamspace (v2)",
        "description": "Publishes one schema or display into the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. If the resource is already published in another folder, this operation moves it.",
        "operationId": "publishTeamspaceResourceV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamspaceV2PublishRequest"
              },
              "examples": {
                "Publish schema by slug": {
                  "description": "Publish schema by slug",
                  "value": {
                    "resourceId": "customer-records",
                    "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
                  }
                },
                "Publish schema by UUID": {
                  "description": "Publish schema by UUID",
                  "value": {
                    "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                    "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
                  }
                },
                "Publish display": {
                  "description": "Publish display",
                  "value": {
                    "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260",
                    "targetFolderId": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a"
                  }
                },
                "Publish to root": {
                  "description": "Publish to root",
                  "value": {
                    "resourceId": "customer-records",
                    "targetFolderId": "00000000-0000-0000-0000-000000000000"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resource published successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamspaceV2PublishResponse"
                },
                "examples": {
                  "First publish": {
                    "description": "First publish",
                    "value": {
                      "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "targetFolder": {
                        "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                        "name": "Shared Dashboards",
                        "isRoot": false
                      },
                      "previousFolder": null
                    }
                  },
                  "Moved between teamspace folders": {
                    "description": "Moved between teamspace folders",
                    "value": {
                      "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                      "targetFolder": {
                        "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                        "name": "Shared Dashboards",
                        "isRoot": false
                      },
                      "previousFolder": {
                        "id": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
                        "name": "Customer Success",
                        "isRoot": false
                      }
                    }
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Resource published successfully</p>"
          },
          "400": {
            "description": "Invalid publish payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid publish payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Folder or resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Folder or resource not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Publishes one schema or display into the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. If the resource is already published in another folder, this operation moves it.",
                      "marks": []
                    }
                  ],
                  "key": "OBt6cnGen7n2"
                }
              ],
              "key": "T19BKn6AbYv2"
            }
          ],
          "key": "Hf29pULQvsvj"
        },
        "x-gitbook-description-html": "<p>Publishes one schema or display into the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. If the resource is already published in another folder, this operation moves it.</p>"
      }
    },
    "/api/v2/teamspaces/resources:unpublish": {
      "post": {
        "tags": [
          "v2-teamspaces"
        ],
        "summary": "Unpublish resource from teamspace (v2)",
        "description": "Removes one resource from the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. Use this when the resource should no longer be visible in shared folders.",
        "operationId": "unpublishTeamspaceResourceV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamspaceV2UnpublishRequest"
              },
              "examples": {
                "Unpublish schema by slug": {
                  "description": "Unpublish schema by slug",
                  "value": {
                    "resourceId": "customer-records"
                  }
                },
                "Unpublish schema by UUID": {
                  "description": "Unpublish schema by UUID",
                  "value": {
                    "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e"
                  }
                },
                "Unpublish display": {
                  "description": "Unpublish display",
                  "value": {
                    "resourceId": "0f6f062f-1478-4df2-96a1-c495d037d260"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resource unpublished successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamspaceV2UnpublishResponse"
                },
                "example": {
                  "resourceId": "2eb8bdcf-6d9c-4fbb-9018-7fa8180f4c5e",
                  "removedFromFolder": {
                    "id": "f45a251d-3ea0-4b41-bfe8-c0f44c8ad54a",
                    "name": "Shared Dashboards",
                    "isRoot": false
                  }
                }
              }
            },
            "x-gitbook-description-html": "<p>Resource unpublished successfully</p>"
          },
          "400": {
            "description": "Invalid unpublish payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Invalid unpublish payload</p>"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Unauthorized</p>"
          },
          "404": {
            "description": "Resource not published or not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            },
            "x-gitbook-description-html": "<p>Resource not published or not found</p>"
          }
        },
        "x-gitbook-description-document": {
          "object": "document",
          "data": {
            "schemaVersion": 9
          },
          "nodes": [
            {
              "object": "block",
              "type": "paragraph",
              "isVoid": false,
              "data": {},
              "nodes": [
                {
                  "object": "text",
                  "leaves": [
                    {
                      "object": "leaf",
                      "text": "Removes one resource from the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. Use this when the resource should no longer be visible in shared folders.",
                      "marks": []
                    }
                  ],
                  "key": "JDp5mLJyuS6n"
                }
              ],
              "key": "8qxvpwFhYm4P"
            }
          ],
          "key": "Pq6w9Kj9bSpf"
        },
        "x-gitbook-description-html": "<p>Removes one resource from the teamspace area. resourceId accepts a schema UUID, schema slug, or display UUID. Use this when the resource should no longer be visible in shared folders.</p>"
      }
    },
    "/api/v2/formulas:recompute": {
      "post": {
        "tags": [
          "v2-formulas"
        ],
        "summary": "Queue a full formula recalculation",
        "description": "Queues an asynchronous recalculation for one active formula field, one schema or the complete workspace. Schema and field selectors accept UUIDs or slugs. A 202 response confirms queueing, not completion. A 503 response can mean that some events were already queued.",
        "operationId": "recomputeFormulasV2",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormulaRecomputeRequest"
              },
              "examples": {
                "Field": {
                  "description": "Field",
                  "value": {
                    "scope": "FIELD",
                    "schema": "invoices",
                    "field": "total"
                  }
                },
                "Schema": {
                  "description": "Schema",
                  "value": {
                    "scope": "SCHEMA",
                    "schema": "invoices"
                  }
                },
                "Workspace": {
                  "description": "Workspace",
                  "value": {
                    "scope": "WORKSPACE"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Formula recalculation events queued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormulaRecomputeResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid scope or selectors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Schema or field not found"
          },
          "409": {
            "description": "Field is not recalculable"
          },
          "503": {
            "description": "Events could not be fully queued"
          }
        }
      }
    },
    "/api/v2/displays/{displayId}/layout": {
      "patch": {
        "tags": [
          "v2-displays"
        ],
        "summary": "Patch display layout (v2)",
        "description": "Updates template and/or freeformLayouts. freeformLayouts is accepted only for a freeform display. Changing the template is rejected while the display contains widgets.",
        "operationId": "patchDisplayLayoutV2",
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayV2LayoutPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Patch display layout (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayV2MutationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    },
    "/api/v2/schema-folders": {
      "get": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "List schema folders (v2)",
        "description": "Lists schema folders with their shared order, root marker and resource count. Pass include=resources to include schema identifiers and names in each folder.",
        "operationId": "listSchemaFoldersV2",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "resources"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List schema folders (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SchemaFolderV2Response"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Create schema folder (v2)",
        "description": "Creates a schema folder with a name and optional order.",
        "operationId": "createSchemaFolderV2",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaFolderV2CreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create schema folder (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaFolderV2Response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Folder name conflict or protected root folder"
          }
        }
      }
    },
    "/api/v2/schema-folders/{folderId}": {
      "patch": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Patch schema folder (v2)",
        "description": "Updates the name and/or shared order of a schema folder. At least one property is required.",
        "operationId": "patchSchemaFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaFolderV2PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Patch schema folder (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaFolderV2Response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Resource not found"
          },
          "409": {
            "description": "Folder name conflict or protected root folder"
          }
        }
      },
      "delete": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Delete schema folder (v2)",
        "description": "Deletes a non-root folder and moves its schemas to the root folder. Returns the deleted folder identifier, moved resource count and target folder.",
        "operationId": "deleteSchemaFolderV2",
        "parameters": [
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete schema folder (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaFolderV2DeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Resource not found"
          },
          "409": {
            "description": "Folder name conflict or protected root folder"
          }
        }
      }
    },
    "/api/v2/schema-resources:move": {
      "post": {
        "tags": [
          "v2-schemas"
        ],
        "summary": "Move schema resources (v2)",
        "description": "Moves the schema identifiers in resourceIds to targetFolderId. resourceIds must contain at least one identifier.",
        "operationId": "moveSchemaResourcesV2",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaFolderV2MoveResourcesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Move schema resources (v2) successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaFolderV2MoveResourcesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Resource not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AutomationConnectionV2SummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": {},
            "description": "Public config projection. SMTP responses flatten verification metadata into config.status, config.verifiedAt, config.lastTestStatus, config.lastTestAt, and config.lastTestError.",
            "x-gitbook-description-html": "<p>Public config projection. SMTP responses flatten verification metadata into config.status, config.verifiedAt, config.lastTestStatus, config.lastTestAt, and config.lastTestError.</p>"
          }
        }
      },
      "ServerResponse": {},
      "AutomationConnectionV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "ownerMemberId": {
            "type": "string",
            "format": "uuid"
          },
          "config": {
            "type": "object",
            "additionalProperties": {},
            "description": "Public connection config. SMTP accepts partial draft config on inactive saves and returns verification metadata in responses.",
            "x-gitbook-description-html": "<p>Public connection config. SMTP accepts partial draft config on inactive saves and returns verification metadata in responses.</p>"
          },
          "secret": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Write-only secret payload. Never returned in public responses.",
            "x-gitbook-description-html": "<p>Write-only secret payload. Never returned in public responses.</p>"
          },
          "active": {
            "type": "boolean",
            "description": "Set false to save an inactive draft connection.",
            "x-gitbook-description-html": "<p>Set false to save an inactive draft connection.</p>"
          }
        }
      },
      "AutomationConnectionV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "ownerMemberId": {
            "type": "string",
            "format": "uuid"
          },
          "active": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": {},
            "description": "Public config projection. SMTP responses flatten verification metadata into config.status, config.verifiedAt, config.lastTestStatus, config.lastTestAt, and config.lastTestError.",
            "x-gitbook-description-html": "<p>Public config projection. SMTP responses flatten verification metadata into config.status, config.verifiedAt, config.lastTestStatus, config.lastTestAt, and config.lastTestError.</p>"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        }
      },
      "AutomationConnectionV2PatchRequest": {
        "type": "object",
        "properties": {
          "set": {
            "type": "object",
            "additionalProperties": {}
          },
          "unset": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AutomationFolderV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          },
          "automationCount": {
            "type": "integer",
            "format": "int32"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AutomationFolderV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "AutomationFolderV2MoveAutomationRequest": {
        "type": "object",
        "properties": {
          "automationId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AutomationFolderLocationV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          }
        }
      },
      "AutomationFolderV2PatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AutomationPluginV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "AutomationV2SummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "folder": {
            "$ref": "#/components/schemas/AutomationFolderLocationV2Response"
          },
          "triggerType": {
            "type": "string"
          },
          "actionTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AutomationTriggerV2PutRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "AutomationV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "$ref": "#/components/schemas/AutomationTriggerV2PutRequest"
          }
        }
      },
      "AutomationV2MutationResponse": {
        "type": "object",
        "properties": {
          "automationId": {
            "type": "string",
            "format": "uuid"
          },
          "webhookEndpoint": {
            "$ref": "#/components/schemas/AutomationWebhookEndpointV2Response"
          }
        }
      },
      "AutomationWebhookEndpointV2Response": {
        "type": "object",
        "properties": {
          "endpointId": {
            "type": "string",
            "format": "uuid"
          },
          "automationId": {
            "type": "string",
            "format": "uuid"
          },
          "endpointUrl": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "idempotencyKeyJsonPath": {
            "type": "string"
          },
          "eventTypeJsonPath": {
            "type": "string"
          },
          "allowedEventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fieldMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationWebhookFieldMappingV2"
            }
          }
        }
      },
      "AutomationWebhookFieldMappingV2": {
        "type": "object",
        "properties": {
          "variable": {
            "type": "string"
          },
          "jsonPath": {
            "type": "string"
          }
        }
      },
      "AutomationActionV2Config": {
        "discriminator": {
          "propertyName": "type"
        },
        "properties": {
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "AutomationActionV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AutomationCreateRecordActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationExecutePluginActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationGenerateDocumentActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationHttpRequestActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationSearchRecordsActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationSendEmailActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationSendMessageActionV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationUpdateRecordActionV2Config"
              }
            ]
          }
        }
      },
      "AutomationConditionV2": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "comparator": {
            "type": "string"
          },
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationFieldMappingValueV2"
            }
          }
        }
      },
      "AutomationCreateRecordActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "targetSchemaId": {
                "type": "string",
                "format": "uuid"
              },
              "fieldMapping": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/AutomationFieldMappingValueV2"
                }
              }
            }
          }
        ]
      },
      "AutomationEmailAttachmentSourceV2": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "fieldId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "AutomationEmailVariableSourceV2": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "fieldId": {
            "type": "string"
          }
        }
      },
      "AutomationExecutePluginActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "pluginId": {
                "type": "string"
              },
              "pluginArgs": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        ]
      },
      "AutomationFieldMappingSourceV2": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "TRIGGER",
              "PREVIOUS_ACTION"
            ]
          },
          "id": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          }
        }
      },
      "AutomationFieldMappingValueV2": {
        "type": "object",
        "properties": {
          "rawValue": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/AutomationFieldMappingSourceV2"
          }
        }
      },
      "AutomationFlowTransitionV2": {
        "type": "object",
        "properties": {
          "fromActionId": {
            "type": "string",
            "format": "uuid"
          },
          "toActionId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AutomationFlowV2Response": {
        "type": "object",
        "properties": {
          "entryActionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationFlowTransitionV2"
            }
          }
        }
      },
      "AutomationGenerateDocumentActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "documentTemplateId": {
                "type": "string",
                "format": "uuid"
              },
              "targetSchemaId": {
                "type": "string",
                "format": "uuid"
              },
              "targetFileFieldId": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ]
      },
      "AutomationHttpRequestActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {}
              },
              "body": {},
              "contentType": {
                "type": "string"
              },
              "timeoutMs": {
                "type": "integer",
                "format": "int32"
              },
              "variables": {
                "type": "object",
                "additionalProperties": {}
              },
              "authMode": {
                "type": "string"
              },
              "connectionId": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        ]
      },
      "AutomationRecordChangedTriggerV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationTriggerV2Config"
          },
          {
            "type": "object",
            "properties": {
              "schemaId": {
                "type": "string"
              },
              "fieldIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AutomationConditionV2"
                }
              }
            }
          }
        ]
      },
      "AutomationRecordCreatedTriggerV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationTriggerV2Config"
          },
          {
            "type": "object",
            "properties": {
              "schemaId": {
                "type": "string"
              },
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AutomationConditionV2"
                }
              }
            }
          }
        ]
      },
      "AutomationScheduledTriggerV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationTriggerV2Config"
          },
          {
            "type": "object",
            "properties": {
              "cronExpression": {
                "type": "string"
              }
            }
          }
        ]
      },
      "AutomationSearchRecordsActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "targetSchemaId": {
                "type": "string",
                "format": "uuid"
              },
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AutomationConditionV2"
                }
              },
              "useTriggerRecord": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "AutomationSendEmailActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "connectionId": {
                "type": "string",
                "format": "uuid"
              },
              "to": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cc": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "bcc": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "replyTo": {
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "body": {
                "type": "string"
              },
              "variables": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/AutomationEmailVariableSourceV2"
                }
              },
              "attachments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AutomationEmailAttachmentSourceV2"
                }
              },
              "timeoutMs": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ]
      },
      "AutomationSendMessageActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "fieldMapping": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        ]
      },
      "AutomationTriggerV2Config": {
        "discriminator": {
          "propertyName": "type"
        },
        "properties": {
          "type": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "AutomationTriggerV2Response": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AutomationRecordChangedTriggerV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationRecordCreatedTriggerV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationScheduledTriggerV2Config"
              },
              {
                "$ref": "#/components/schemas/AutomationWebhookTriggerV2Config"
              }
            ]
          }
        }
      },
      "AutomationUpdateRecordActionV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationActionV2Config"
          },
          {
            "type": "object",
            "properties": {
              "targetSchemaId": {
                "type": "string",
                "format": "uuid"
              },
              "fieldMapping": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/AutomationFieldMappingValueV2"
                }
              },
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AutomationConditionV2"
                }
              },
              "useTriggerRecord": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "AutomationV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "folder": {
            "$ref": "#/components/schemas/AutomationFolderLocationV2Response"
          },
          "trigger": {
            "$ref": "#/components/schemas/AutomationTriggerV2Response"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationActionV2Response"
            }
          },
          "flow": {
            "$ref": "#/components/schemas/AutomationFlowV2Response"
          }
        }
      },
      "AutomationWebhookTriggerV2Config": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AutomationTriggerV2Config"
          },
          {
            "type": "object",
            "properties": {
              "webhookEndpointId": {
                "type": "string",
                "format": "uuid"
              },
              "endpointUrl": {
                "type": "string"
              }
            }
          }
        ]
      },
      "AutomationV2PatchRequest": {
        "type": "object",
        "properties": {
          "set": {
            "type": "object",
            "additionalProperties": {}
          },
          "unset": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "$ref": "#/components/schemas/JsonNode",
            "writeOnly": true
          },
          "description": {
            "$ref": "#/components/schemas/JsonNode",
            "writeOnly": true
          },
          "folderId": {
            "$ref": "#/components/schemas/JsonNode",
            "writeOnly": true
          }
        }
      },
      "JsonNode": {},
      "AutomationActionV2CreateRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "AutomationActionV2PutRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "AutomationFlowV2PutRequest": {
        "type": "object",
        "properties": {
          "entryActionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationFlowTransitionV2"
            }
          }
        }
      },
      "AutomationWebhookEndpointV2PutRequest": {
        "type": "object",
        "properties": {
          "idempotencyKeyJsonPath": {
            "type": "string"
          },
          "eventTypeJsonPath": {
            "type": "string"
          },
          "allowedEventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fieldMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationWebhookFieldMappingV2"
            }
          },
          "active": {
            "type": "boolean"
          }
        }
      },
      "DisplayFolderLocationV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          }
        }
      },
      "DisplayV2SummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "layoutTemplate": {
            "type": "string"
          },
          "variableCount": {
            "type": "integer",
            "format": "int32"
          },
          "widgetCount": {
            "type": "integer",
            "format": "int32"
          },
          "folder": {
            "$ref": "#/components/schemas/DisplayFolderLocationV2Response"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "DisplayV2CreateRequest": {
        "type": "object",
        "description": "Create display request for API v2.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display visible name.",
            "x-gitbook-description-html": "<p>Display visible name.</p>"
          },
          "layout": {
            "$ref": "#/components/schemas/Layout",
            "description": "Shared display layout configuration.",
            "x-gitbook-description-html": "<p>Shared display layout configuration.</p>"
          },
          "description": {
            "type": "string",
            "description": "Display description.",
            "maxLength": 500
          }
        },
        "x-gitbook-description-html": "<p>Create display request for API v2.</p>"
      },
      "Layout": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string",
            "description": "Layout template identifier.",
            "example": "widget_row_tabs",
            "x-gitbook-description-html": "<p>Layout template identifier.</p>"
          },
          "freeformLayouts": {
            "description": "Responsive freeform layouts object used when the layout template is freeform.",
            "x-gitbook-description-html": "<p>Responsive freeform layouts object used when the layout template is freeform.</p>"
          }
        }
      },
      "DisplayV2MutationResponse": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Behavior": {
        "type": "object",
        "properties": {
          "readOnly": {
            "type": "boolean"
          },
          "hideAddButton": {
            "type": "boolean"
          },
          "hideDeleteButton": {
            "type": "boolean"
          },
          "hideSortButton": {
            "type": "boolean"
          },
          "hideFilterButton": {
            "type": "boolean"
          },
          "hideSeeButton": {
            "type": "boolean"
          },
          "searchEnabled": {
            "type": "boolean",
            "description": "Whether grid widget header search is enabled.",
            "x-gitbook-description-html": "<p>Whether grid widget header search is enabled.</p>"
          },
          "lockedFields": {
            "type": "array",
            "description": "Per-field edit locks for record-editing widgets. Each entry locks one field, either permanently (no conditions) or when every condition matches the record (AND logic). When provided, replaces the stored configuration; an empty array clears it.",
            "items": {
              "$ref": "#/components/schemas/LockedField"
            },
            "x-gitbook-description-html": "<p>Per-field edit locks for record-editing widgets. Each entry locks one field, either permanently (no conditions) or when every condition matches the record (AND logic). When provided, replaces the stored configuration; an empty array clears it.</p>"
          }
        }
      },
      "Bindings": {
        "type": "object",
        "properties": {
          "variableMap": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Variable bindings by variable id and field reference. Values accept UUID or field slug.",
            "x-gitbook-description-html": "<p>Variable bindings by variable id and field reference. Values accept UUID or field slug.</p>"
          }
        }
      },
      "Chart": {
        "type": "object",
        "properties": {
          "chartType": {
            "type": "string"
          },
          "xAxisFieldId": {
            "type": "string",
            "description": "X-axis field reference. Accepts UUID or field slug.",
            "x-gitbook-description-html": "<p>X-axis field reference. Accepts UUID or field slug.</p>"
          },
          "xAxisDateFormat": {
            "type": "string",
            "enum": [
              "DATE",
              "MONTH_YEAR",
              "QUARTER_YEAR",
              "YEAR"
            ]
          },
          "xAxisAsTimeSerie": {
            "type": "boolean"
          },
          "yAxisSeries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YaxisSerie"
            }
          },
          "legend": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "DateConfig": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "description": "Date mode.",
            "example": "dynamic",
            "x-gitbook-description-html": "<p>Date mode.</p>"
          },
          "dynamicOption": {
            "type": "string",
            "description": "Dynamic date option.",
            "example": "thisMonth",
            "x-gitbook-description-html": "<p>Dynamic date option.</p>"
          },
          "specificDate": {
            "type": "string",
            "description": "Specific ISO date value.",
            "x-gitbook-description-html": "<p>Specific ISO date value.</p>"
          },
          "rangeStart": {
            "type": "string",
            "description": "ISO range start.",
            "x-gitbook-description-html": "<p>ISO range start.</p>"
          },
          "rangeEnd": {
            "type": "string",
            "description": "ISO range end.",
            "x-gitbook-description-html": "<p>ISO range end.</p>"
          }
        }
      },
      "DisplayV2Filter": {
        "type": "object",
        "description": "Semantic filter descriptor for API v2.",
        "properties": {
          "origin": {
            "$ref": "#/components/schemas/SchemaField",
            "description": "Origin field reference.",
            "x-gitbook-description-html": "<p>Origin field reference.</p>"
          },
          "target": {
            "$ref": "#/components/schemas/SchemaField",
            "description": "Target field reference when the comparison uses two fields.",
            "x-gitbook-description-html": "<p>Target field reference when the comparison uses two fields.</p>"
          },
          "comparisonOperator": {
            "type": "string",
            "description": "Filter comparison operator.",
            "enum": [
              "EQUAL",
              "NOT_EQUAL",
              "GREATER",
              "GREATER_OR_EQUAL",
              "LESS",
              "LESS_OR_EQUAL",
              "IS_EMPTY",
              "IS_NOT_EMPTY",
              "RANGE",
              "CONTAINS",
              "NOT_CONTAINS",
              "ANY_OF"
            ],
            "x-gitbook-description-html": "<p>Filter comparison operator.</p>"
          },
          "values": {
            "type": "array",
            "description": "Filter values.",
            "items": {
              "type": "string"
            },
            "x-gitbook-description-html": "<p>Filter values.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Semantic filter descriptor for API v2.</p>"
      },
      "DisplayV2LayoutResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "freeformLayouts": {},
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisplayV2LayoutSlotResponse"
            }
          },
          "tabs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisplayV2TabResponse"
            }
          }
        }
      },
      "DisplayV2LayoutSlotResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "widgetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DisplayV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "layout": {
            "$ref": "#/components/schemas/DisplayV2LayoutResponse"
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisplayV2VariableResponse"
            }
          },
          "widgets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisplayV2WidgetResponse"
            }
          },
          "crossWidgetFilter": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "navigationTargets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "folder": {
            "$ref": "#/components/schemas/DisplayFolderLocationV2Response"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "DisplayV2TabResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "orientation": {
            "type": "string"
          },
          "widgetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DisplayV2VariableResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "reference",
              "member",
              "date"
            ]
          },
          "name": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "defaultValue": {
            "type": "string"
          },
          "defaultValues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowMultiple": {
            "type": "boolean"
          },
          "staticVariable": {
            "type": "boolean"
          },
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DisplayV2Filter"
            }
          },
          "date": {
            "$ref": "#/components/schemas/DateConfig"
          }
        }
      },
      "DisplayV2WidgetResponse": {
        "type": "object",
        "description": "Public widget response for API v2 using semantic sections aligned with the canonical widget contract.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Widget identifier.",
            "x-gitbook-description-html": "<p>Widget identifier.</p>"
          },
          "type": {
            "type": "string",
            "enum": [
              "TABLE_OR_SUBTABLE",
              "DETAIL",
              "KPI",
              "CHART",
              "TIMELINE",
              "KANBAN",
              "HIERARCHY"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "placement": {
            "$ref": "#/components/schemas/Placement"
          },
          "presentation": {
            "$ref": "#/components/schemas/Presentation"
          },
          "bindings": {
            "$ref": "#/components/schemas/Bindings"
          },
          "query": {
            "$ref": "#/components/schemas/Query"
          },
          "behavior": {
            "$ref": "#/components/schemas/Behavior"
          },
          "view": {
            "$ref": "#/components/schemas/View"
          },
          "kpi": {
            "$ref": "#/components/schemas/Kpi"
          },
          "chart": {
            "$ref": "#/components/schemas/Chart"
          }
        },
        "x-gitbook-description-html": "<p>Public widget response for API v2 using semantic sections aligned with the canonical widget contract.</p>"
      },
      "HierarchyChildLevel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "schemaId": {
            "type": "string",
            "format": "uuid"
          },
          "childFieldId": {
            "type": "string",
            "format": "uuid"
          },
          "labelFieldId": {
            "type": "string",
            "format": "uuid"
          },
          "infoMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyFieldMapping"
            }
          },
          "numberMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyFieldMapping"
            }
          }
        }
      },
      "HierarchyColumnInfoDef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "HierarchyColumnNumberDef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "aggregation": {
            "type": "string",
            "enum": [
              "COUNT",
              "COUNT_DISTINCT",
              "SUM",
              "AVERAGE",
              "MINIMUM",
              "MAXIMUM"
            ]
          }
        }
      },
      "HierarchyColumns": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "infos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyColumnInfoDef"
            }
          },
          "numbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyColumnNumberDef"
            }
          }
        }
      },
      "HierarchyConfig": {
        "type": "object",
        "properties": {
          "columns": {
            "$ref": "#/components/schemas/HierarchyColumns"
          },
          "rootLevel": {
            "$ref": "#/components/schemas/HierarchyLevelMapping"
          },
          "childLevels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyChildLevel"
            }
          }
        }
      },
      "HierarchyFieldMapping": {
        "type": "object",
        "properties": {
          "columnId": {
            "type": "string"
          },
          "fieldId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "HierarchyLevelMapping": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "labelFieldId": {
            "type": "string",
            "format": "uuid"
          },
          "infoMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyFieldMapping"
            }
          },
          "numberMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HierarchyFieldMapping"
            }
          }
        }
      },
      "Kpi": {
        "type": "object",
        "properties": {
          "typeCalc": {
            "type": "string",
            "enum": [
              "COUNT",
              "COUNT_DISTINCT",
              "SUM",
              "AVERAGE",
              "MINIMUM",
              "MAXIMUM"
            ]
          },
          "fieldCalc": {
            "type": "string",
            "description": "Field reference for KPI calculations. Accepts UUID or field slug.",
            "x-gitbook-description-html": "<p>Field reference for KPI calculations. Accepts UUID or field slug.</p>"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "LockedField": {
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/SchemaField",
            "description": "Locked field reference.",
            "x-gitbook-description-html": "<p>Locked field reference.</p>"
          },
          "conditions": {
            "type": "array",
            "description": "Conditions evaluated with AND logic against the record. Empty or absent means the field is always locked.",
            "items": {
              "$ref": "#/components/schemas/DisplayV2FilterRequest"
            },
            "x-gitbook-description-html": "<p>Conditions evaluated with AND logic against the record. Empty or absent means the field is always locked.</p>"
          },
          "messageBeforeLock": {
            "type": "string",
            "description": "Message shown while the field is editable but has pending lock conditions.",
            "x-gitbook-description-html": "<p>Message shown while the field is editable but has pending lock conditions.</p>"
          },
          "messageAfterLock": {
            "type": "string",
            "description": "Message shown once the field is locked.",
            "x-gitbook-description-html": "<p>Message shown once the field is locked.</p>"
          }
        }
      },
      "Placement": {
        "type": "object",
        "properties": {
          "slotId": {
            "type": "string",
            "description": "Slot identifier for slot-based layouts.",
            "x-gitbook-description-html": "<p>Slot identifier for slot-based layouts.</p>"
          },
          "tabId": {
            "type": "string",
            "description": "Tab identifier for tab-based layouts.",
            "x-gitbook-description-html": "<p>Tab identifier for tab-based layouts.</p>"
          },
          "layout": {
            "type": "object",
            "additionalProperties": {},
            "description": "Freeform widget layout object.",
            "x-gitbook-description-html": "<p>Freeform widget layout object.</p>"
          }
        }
      },
      "Presentation": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Widget visible name.",
            "x-gitbook-description-html": "<p>Widget visible name.</p>"
          },
          "description": {
            "type": "string",
            "description": "Widget description.",
            "x-gitbook-description-html": "<p>Widget description.</p>"
          },
          "icon": {
            "type": "string",
            "description": "Widget icon.",
            "x-gitbook-description-html": "<p>Widget icon.</p>"
          },
          "color": {
            "type": "string",
            "description": "Widget color.",
            "x-gitbook-description-html": "<p>Widget color.</p>"
          }
        }
      },
      "Query": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "array",
            "description": "Widget-level query filters.",
            "items": {
              "$ref": "#/components/schemas/DisplayV2FilterRequest"
            },
            "x-gitbook-description-html": "<p>Widget-level query filters.</p>"
          },
          "sorts": {
            "description": "Widget-level sorts stored in viewConfig.order.",
            "x-gitbook-description-html": "<p>Widget-level sorts stored in viewConfig.order.</p>"
          }
        }
      },
      "SchemaField": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string",
            "format": "uuid",
            "description": "Schema identifier.",
            "x-gitbook-description-html": "<p>Schema identifier.</p>"
          },
          "fieldId": {
            "type": "string",
            "description": "Field reference. Accepts UUID or field slug.",
            "x-gitbook-description-html": "<p>Field reference. Accepts UUID or field slug.</p>"
          }
        }
      },
      "Source": {
        "type": "object",
        "properties": {
          "originResourceId": {
            "type": "string",
            "format": "uuid",
            "description": "Backing resource identifier.",
            "x-gitbook-description-html": "<p>Backing resource identifier.</p>"
          },
          "isOriginSubSchema": {
            "type": "boolean",
            "description": "Whether the origin resource is a subschema.",
            "x-gitbook-description-html": "<p>Whether the origin resource is a subschema.</p>"
          }
        }
      },
      "View": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "columnSize": {},
          "groupsExpanded": {},
          "viewAdditionalProperties": {},
          "hierarchyConfig": {
            "$ref": "#/components/schemas/HierarchyConfig"
          }
        }
      },
      "DisplayV2PatchRequest": {
        "type": "object",
        "description": "Patch display core fields request for API v2.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display visible name.",
            "x-gitbook-description-html": "<p>Display visible name.</p>"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Description. Omit to keep the current value; send null or a blank string to clear it."
          }
        },
        "x-gitbook-description-html": "<p>Patch display core fields request for API v2.</p>"
      },
      "DisplayV2CrossWidgetFilterPutRequest": {
        "type": "object",
        "description": "Upsert cross-widget filter request for API v2.",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Target"
            }
          }
        },
        "x-gitbook-description-html": "<p>Upsert cross-widget filter request for API v2.</p>"
      },
      "Target": {
        "type": "object",
        "properties": {
          "widgetId": {
            "type": "string",
            "format": "uuid",
            "description": "Target widget identifier.",
            "x-gitbook-description-html": "<p>Target widget identifier.</p>"
          },
          "fieldId": {
            "type": "string",
            "format": "uuid",
            "description": "Target field identifier.",
            "x-gitbook-description-html": "<p>Target field identifier.</p>"
          }
        }
      },
      "DisplayV2NavigationTargetCreateRequest": {
        "type": "object",
        "description": "Create navigation target request for API v2.",
        "properties": {
          "sourceWidgetId": {
            "type": "string",
            "format": "uuid",
            "description": "Source widget identifier.",
            "x-gitbook-description-html": "<p>Source widget identifier.</p>"
          },
          "targetDisplayId": {
            "type": "string",
            "format": "uuid",
            "description": "Target display identifier.",
            "x-gitbook-description-html": "<p>Target display identifier.</p>"
          },
          "targetVariableId": {
            "type": "string",
            "format": "uuid",
            "description": "Target variable identifier.",
            "x-gitbook-description-html": "<p>Target variable identifier.</p>"
          },
          "label": {
            "type": "string",
            "description": "Optional visible label.",
            "x-gitbook-description-html": "<p>Optional visible label.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Create navigation target request for API v2.</p>"
      },
      "DisplayV2NavigationTargetMutationResponse": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          },
          "navigationTargetId": {
            "type": "string"
          }
        }
      },
      "DisplayV2NavigationTargetPatchRequest": {
        "type": "object",
        "description": "Patch navigation target request for API v2.",
        "properties": {
          "sourceWidgetId": {
            "type": "string",
            "format": "uuid",
            "description": "Source widget identifier.",
            "x-gitbook-description-html": "<p>Source widget identifier.</p>"
          },
          "targetDisplayId": {
            "type": "string",
            "format": "uuid",
            "description": "Target display identifier.",
            "x-gitbook-description-html": "<p>Target display identifier.</p>"
          },
          "targetVariableId": {
            "type": "string",
            "format": "uuid",
            "description": "Target variable identifier.",
            "x-gitbook-description-html": "<p>Target variable identifier.</p>"
          },
          "label": {
            "type": "string",
            "description": "Optional visible label.",
            "x-gitbook-description-html": "<p>Optional visible label.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Patch navigation target request for API v2.</p>"
      },
      "DisplayV2TabCreateRequest": {
        "type": "object",
        "description": "Create display tab request for API v2.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional tab visible name.",
            "x-gitbook-description-html": "<p>Optional tab visible name.</p>"
          },
          "orientation": {
            "type": "string",
            "description": "Tab widget orientation.",
            "example": "vertical",
            "x-gitbook-description-html": "<p>Tab widget orientation.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Create display tab request for API v2.</p>"
      },
      "DisplayV2TabMutationResponse": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          },
          "tabId": {
            "type": "string"
          }
        }
      },
      "DisplayV2TabPatchRequest": {
        "type": "object",
        "description": "Patch display tab request for API v2.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Optional tab visible name.",
            "x-gitbook-description-html": "<p>Optional tab visible name.</p>"
          },
          "orientation": {
            "type": "string",
            "description": "Tab widget orientation.",
            "example": "horizontal",
            "x-gitbook-description-html": "<p>Tab widget orientation.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Patch display tab request for API v2.</p>"
      },
      "DisplayV2CreateVariableRequest": {
        "type": "object",
        "description": "Create variable request for API v2.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Variable type.",
            "enum": [
              "reference",
              "member",
              "date"
            ],
            "example": "reference",
            "x-gitbook-description-html": "<p>Variable type.</p>"
          },
          "name": {
            "type": "string",
            "description": "Variable visible name.",
            "x-gitbook-description-html": "<p>Variable visible name.</p>"
          },
          "source": {
            "$ref": "#/components/schemas/Source",
            "description": "Optional schema/field source for reference variables.",
            "x-gitbook-description-html": "<p>Optional schema/field source for reference variables.</p>"
          },
          "defaultValue": {
            "type": "string",
            "description": "Single default value.",
            "x-gitbook-description-html": "<p>Single default value.</p>"
          },
          "defaultValues": {
            "type": "array",
            "description": "Multiple default values.",
            "items": {
              "type": "string"
            },
            "x-gitbook-description-html": "<p>Multiple default values.</p>"
          },
          "allowMultiple": {
            "type": "boolean",
            "description": "Whether the variable allows multiple values.",
            "x-gitbook-description-html": "<p>Whether the variable allows multiple values.</p>"
          },
          "staticVariable": {
            "type": "boolean",
            "description": "Whether the variable is static and not user-editable.",
            "x-gitbook-description-html": "<p>Whether the variable is static and not user-editable.</p>"
          },
          "filters": {
            "type": "array",
            "description": "Reference variable filters.",
            "items": {
              "$ref": "#/components/schemas/DisplayV2Filter"
            },
            "x-gitbook-description-html": "<p>Reference variable filters.</p>"
          },
          "date": {
            "$ref": "#/components/schemas/DateConfig",
            "description": "Date variable configuration.",
            "x-gitbook-description-html": "<p>Date variable configuration.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Create variable request for API v2.</p>"
      },
      "DisplayV2VariableMutationResponse": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          },
          "variableId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DisplayV2PatchVariableRequest": {
        "type": "object",
        "description": "Patch display variable request for API v2.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Variable type.",
            "enum": [
              "reference",
              "member",
              "date"
            ],
            "example": "reference",
            "x-gitbook-description-html": "<p>Variable type.</p>"
          },
          "name": {
            "type": "string",
            "description": "Variable visible name.",
            "x-gitbook-description-html": "<p>Variable visible name.</p>"
          },
          "source": {
            "$ref": "#/components/schemas/Source",
            "description": "Optional schema/field source for reference variables.",
            "x-gitbook-description-html": "<p>Optional schema/field source for reference variables.</p>"
          },
          "defaultValue": {
            "type": "string",
            "description": "Single default value.",
            "x-gitbook-description-html": "<p>Single default value.</p>"
          },
          "defaultValues": {
            "type": "array",
            "description": "Multiple default values.",
            "items": {
              "type": "string"
            },
            "x-gitbook-description-html": "<p>Multiple default values.</p>"
          },
          "allowMultiple": {
            "type": "boolean",
            "description": "Whether the variable allows multiple values.",
            "x-gitbook-description-html": "<p>Whether the variable allows multiple values.</p>"
          },
          "staticVariable": {
            "type": "boolean",
            "description": "Whether the variable is static and not user-editable.",
            "x-gitbook-description-html": "<p>Whether the variable is static and not user-editable.</p>"
          },
          "filters": {
            "type": "array",
            "description": "Reference variable filters.",
            "items": {
              "$ref": "#/components/schemas/DisplayV2Filter"
            },
            "x-gitbook-description-html": "<p>Reference variable filters.</p>"
          },
          "date": {
            "$ref": "#/components/schemas/DateConfig",
            "description": "Date variable configuration.",
            "x-gitbook-description-html": "<p>Date variable configuration.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Patch display variable request for API v2.</p>"
      },
      "DisplayV2CreateWidgetRequest": {
        "type": "object",
        "description": "Create widget request for API v2.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Widget type.",
            "enum": [
              "TABLE_OR_SUBTABLE",
              "DETAIL",
              "KPI",
              "CHART",
              "TIMELINE",
              "KANBAN",
              "HIERARCHY"
            ],
            "x-gitbook-description-html": "<p>Widget type.</p>"
          },
          "placement": {
            "$ref": "#/components/schemas/Placement",
            "description": "Placement definition inside the display.",
            "x-gitbook-description-html": "<p>Placement definition inside the display.</p>"
          },
          "source": {
            "$ref": "#/components/schemas/Source",
            "description": "Source data configuration.",
            "x-gitbook-description-html": "<p>Source data configuration.</p>"
          },
          "presentation": {
            "$ref": "#/components/schemas/Presentation",
            "description": "Presentation configuration.",
            "x-gitbook-description-html": "<p>Presentation configuration.</p>"
          },
          "bindings": {
            "$ref": "#/components/schemas/Bindings",
            "description": "Variable bindings.",
            "x-gitbook-description-html": "<p>Variable bindings.</p>"
          },
          "query": {
            "$ref": "#/components/schemas/Query",
            "description": "Query configuration.",
            "x-gitbook-description-html": "<p>Query configuration.</p>"
          },
          "behavior": {
            "$ref": "#/components/schemas/Behavior",
            "description": "Behavior flags.",
            "x-gitbook-description-html": "<p>Behavior flags.</p>"
          },
          "view": {
            "$ref": "#/components/schemas/View",
            "description": "View-specific configuration for view-based widgets.",
            "x-gitbook-description-html": "<p>View-specific configuration for view-based widgets.</p>"
          },
          "kpi": {
            "$ref": "#/components/schemas/Kpi",
            "description": "KPI-specific configuration.",
            "x-gitbook-description-html": "<p>KPI-specific configuration.</p>"
          },
          "chart": {
            "$ref": "#/components/schemas/Chart",
            "description": "Chart-specific configuration.",
            "x-gitbook-description-html": "<p>Chart-specific configuration.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Create widget request for API v2.</p>"
      },
      "DisplayV2FilterRequest": {
        "type": "object",
        "description": "Semantic filter descriptor for public Display API v2 requests.",
        "properties": {
          "origin": {
            "$ref": "#/components/schemas/SchemaField",
            "description": "Origin field reference.",
            "x-gitbook-description-html": "<p>Origin field reference.</p>"
          },
          "target": {
            "$ref": "#/components/schemas/SchemaField",
            "description": "Target field reference when the comparison uses two fields.",
            "x-gitbook-description-html": "<p>Target field reference when the comparison uses two fields.</p>"
          },
          "comparisonOperator": {
            "type": "string",
            "description": "Filter comparison operator.",
            "enum": [
              "EQUAL",
              "NOT_EQUAL",
              "GREATER",
              "GREATER_OR_EQUAL",
              "LESS",
              "LESS_OR_EQUAL",
              "IS_EMPTY",
              "IS_NOT_EMPTY",
              "RANGE",
              "CONTAINS",
              "NOT_CONTAINS",
              "ANY_OF"
            ],
            "x-gitbook-description-html": "<p>Filter comparison operator.</p>"
          },
          "values": {
            "type": "array",
            "description": "Filter values.",
            "items": {
              "type": "string"
            },
            "x-gitbook-description-html": "<p>Filter values.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Semantic filter descriptor for public Display API v2 requests.</p>"
      },
      "YaxisSerie": {
        "type": "object",
        "properties": {
          "typeCalc": {
            "type": "string",
            "enum": [
              "COUNT",
              "COUNT_DISTINCT",
              "SUM",
              "AVERAGE",
              "MINIMUM",
              "MAXIMUM"
            ]
          },
          "fieldCalc": {
            "type": "string",
            "description": "Y-axis field reference. Accepts UUID or field slug.",
            "x-gitbook-description-html": "<p>Y-axis field reference. Accepts UUID or field slug.</p>"
          },
          "color": {
            "type": "string"
          },
          "axisType": {
            "type": "string",
            "enum": [
              "PRIMARY",
              "SECONDARY"
            ]
          }
        }
      },
      "DisplayV2WidgetMutationResponse": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          },
          "widgetId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "DisplayV2PatchWidgetRequest": {
        "type": "object",
        "description": "Patch widget request for API v2.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Widget type.",
            "enum": [
              "TABLE_OR_SUBTABLE",
              "DETAIL",
              "KPI",
              "CHART",
              "TIMELINE",
              "KANBAN",
              "HIERARCHY"
            ],
            "x-gitbook-description-html": "<p>Widget type.</p>"
          },
          "placement": {
            "$ref": "#/components/schemas/Placement",
            "description": "Placement definition inside the display.",
            "x-gitbook-description-html": "<p>Placement definition inside the display.</p>"
          },
          "source": {
            "$ref": "#/components/schemas/Source",
            "description": "Source data configuration.",
            "x-gitbook-description-html": "<p>Source data configuration.</p>"
          },
          "presentation": {
            "$ref": "#/components/schemas/Presentation",
            "description": "Presentation configuration.",
            "x-gitbook-description-html": "<p>Presentation configuration.</p>"
          },
          "bindings": {
            "$ref": "#/components/schemas/Bindings",
            "description": "Variable bindings.",
            "x-gitbook-description-html": "<p>Variable bindings.</p>"
          },
          "query": {
            "$ref": "#/components/schemas/Query",
            "description": "Query configuration.",
            "x-gitbook-description-html": "<p>Query configuration.</p>"
          },
          "behavior": {
            "$ref": "#/components/schemas/Behavior",
            "description": "Behavior flags.",
            "x-gitbook-description-html": "<p>Behavior flags.</p>"
          },
          "view": {
            "$ref": "#/components/schemas/View",
            "description": "View-specific configuration for view-based widgets.",
            "x-gitbook-description-html": "<p>View-specific configuration for view-based widgets.</p>"
          },
          "kpi": {
            "$ref": "#/components/schemas/Kpi",
            "description": "KPI-specific configuration.",
            "x-gitbook-description-html": "<p>KPI-specific configuration.</p>"
          },
          "chart": {
            "$ref": "#/components/schemas/Chart",
            "description": "Chart-specific configuration.",
            "x-gitbook-description-html": "<p>Chart-specific configuration.</p>"
          }
        },
        "x-gitbook-description-html": "<p>Patch widget request for API v2.</p>"
      },
      "DisplayFolderV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          },
          "displayCount": {
            "type": "integer",
            "format": "int32"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DisplayFolderV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "DisplayFolderV2MoveDisplayRequest": {
        "type": "object",
        "properties": {
          "displayId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DisplayFolderV2PatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DocumentTemplateAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        }
      },
      "DocumentTemplateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTemplateAsset"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        }
      },
      "DocumentTemplateV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentTemplateAsset"
            }
          }
        }
      },
      "DocumentTemplateV2UpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "DocumentTemplateDeleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DocumentTemplateAssetDeleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "FileV2UploadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "FileV2StorageInfoResponse": {
        "type": "object",
        "properties": {
          "maxSize": {
            "type": "integer",
            "format": "int64"
          },
          "usedSize": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "FileV2DeleteResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "NavigationV2FolderResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NavigationV2ResourceResponse"
            }
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "NavigationV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "SCHEMA",
              "SUBSCHEMA",
              "WORKFLOW",
              "DISPLAY",
              "SCHEDULE",
              "SUBSCHEDULE"
            ]
          },
          "isInSpace": {
            "type": "boolean"
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "NavigationV2CreateFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "NavigationV2FolderMutationResponse": {
        "type": "object",
        "properties": {
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "NavigationV2UpdateFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "NavigationV2MoveResourceRequest": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "NavigationV2MoveResourceResponse": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SchemaV2FolderLocationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          }
        }
      },
      "SchemaV2SummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "folder": {
            "$ref": "#/components/schemas/SchemaV2FolderLocationResponse"
          },
          "auditable": {
            "type": "boolean"
          },
          "commentable": {
            "type": "boolean"
          },
          "fieldCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "SchemaV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "auditable": {
            "type": "boolean"
          },
          "commentable": {
            "type": "boolean"
          },
          "folderId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SchemaV2CreationResponse": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "folder": {
            "$ref": "#/components/schemas/SchemaV2FolderLocationResponse"
          }
        }
      },
      "SchemaV2FieldConfigurationResponse": {},
      "SchemaV2FieldResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "system": {
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/SchemaV2FieldConfigurationResponse"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "SchemaV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "folder": {
            "$ref": "#/components/schemas/SchemaV2FolderLocationResponse"
          },
          "auditable": {
            "type": "boolean"
          },
          "commentable": {
            "type": "boolean"
          },
          "highlightedField": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the field used as each record's display name in the UI (activity-panel title and detail-view record list).",
            "x-gitbook-description-html": "<p>UUID of the field used as each record's display name in the UI (activity-panel title and detail-view record list).</p>"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SchemaV2FieldResponse"
            }
          },
          "uniqueFields": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "SchemaV2PatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "auditable": {
            "type": "boolean"
          },
          "commentable": {
            "type": "boolean"
          },
          "highlightedField": {
            "type": "string",
            "description": "Field whose value is used as each record's display name in the UI (record title in the activity panel, and record name in the detail-view record list). Accepts the field UUID.",
            "x-gitbook-description-html": "<p>Field whose value is used as each record's display name in the UI (record title in the activity panel, and record name in the detail-view record list). Accepts the field UUID.</p>"
          }
        }
      },
      "SchemaV2DeleteResponse": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "SchemaV2CreateFieldRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          },
          "description": {
            "type": "string",
            "description": "Field description.",
            "maxLength": 500
          }
        }
      },
      "SchemaV2FieldMutationResponse": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string",
            "format": "uuid"
          },
          "fieldId": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "SchemaV2UpdateFieldRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Description. Omit to keep the current value; send null or a blank string to clear it."
          }
        }
      },
      "DataV2PageResponse": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        }
      },
      "DataV2QueryResponse": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataV2RecordResponse"
            }
          },
          "page": {
            "$ref": "#/components/schemas/DataV2PageResponse"
          }
        }
      },
      "DataV2RecordResponse": {
        "type": "object",
        "properties": {
          "recordId": {
            "type": "string",
            "format": "uuid"
          },
          "values": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "DataV2CreateRecordsRequest": {
        "type": "object",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          }
        }
      },
      "DataV2CreateRecordError": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "reason": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "action": {
            "type": "string"
          }
        }
      },
      "DataV2CreateRecordsResponse": {
        "type": "object",
        "properties": {
          "created": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataV2CreateRecordError"
            }
          }
        }
      },
      "DataV2PatchRecordRequest": {
        "type": "object",
        "properties": {
          "set": {
            "type": "object",
            "additionalProperties": {}
          },
          "unset": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CommentV2ContentResponse": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "CommentV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "recordId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentV2ContentResponse"
            }
          }
        }
      },
      "CommentV2ContentRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "CommentV2CreateRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentV2ContentRequest"
            }
          }
        }
      },
      "LogV2ChangeResponse": {
        "type": "object",
        "properties": {
          "beforeValue": {
            "type": "string"
          },
          "afterValue": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          }
        }
      },
      "LogV2Response": {
        "type": "object",
        "properties": {
          "recordId": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "changeField": {
            "type": "string"
          },
          "change": {
            "$ref": "#/components/schemas/LogV2ChangeResponse"
          }
        }
      },
      "DataV2ClearRecordsResponse": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string",
            "format": "uuid"
          },
          "cleared": {
            "type": "boolean"
          }
        }
      },
      "DataV2DeleteRecordsRequest": {
        "type": "object",
        "properties": {
          "recordIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DataV2DeleteRecordsResponse": {
        "type": "object",
        "properties": {
          "recordIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "ApiV2PageRequest": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DataV2QueryCondition": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "op": {
            "type": "string"
          },
          "value": {}
        }
      },
      "DataV2QueryRequest": {
        "type": "object",
        "properties": {
          "select": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "where": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataV2QueryCondition"
            }
          },
          "search": {
            "$ref": "#/components/schemas/DataV2SearchRequest"
          },
          "sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataV2SortRequest"
            }
          },
          "page": {
            "$ref": "#/components/schemas/ApiV2PageRequest"
          }
        }
      },
      "DataV2SearchRequest": {
        "type": "object",
        "properties": {
          "term": {
            "type": "string"
          }
        }
      },
      "DataV2SortRequest": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ]
          }
        }
      },
      "SchemaV2SetUniqueFieldsRequest": {
        "type": "object",
        "properties": {
          "fieldIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "TeamspaceV2FolderResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "isRoot": {
            "type": "boolean"
          },
          "resourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamspaceV2ResourceResponse"
            }
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "TeamspaceV2ResourceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "SCHEMA",
              "SUBSCHEMA",
              "WORKFLOW",
              "DISPLAY",
              "SCHEDULE",
              "SUBSCHEDULE"
            ]
          }
        }
      },
      "TeamspaceV2CreateFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "TeamspaceV2UpdateFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "TeamspaceV2FolderDeleteResponse": {
        "type": "object",
        "properties": {
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "movedResourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "targetFolder": {
            "$ref": "#/components/schemas/TeamspaceV2FolderLocationResponse"
          }
        }
      },
      "TeamspaceV2FolderLocationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isRoot": {
            "type": "boolean"
          }
        }
      },
      "TeamspaceV2PublishRequest": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "description": "Resource reference. Accepts schema UUID, schema slug, or display UUID.",
            "x-gitbook-description-html": "<p>Resource reference. Accepts schema UUID, schema slug, or display UUID.</p>"
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid",
            "description": "Destination teamspace folder identifier.",
            "x-gitbook-description-html": "<p>Destination teamspace folder identifier.</p>"
          }
        }
      },
      "TeamspaceV2PublishResponse": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "targetFolder": {
            "$ref": "#/components/schemas/TeamspaceV2FolderLocationResponse"
          },
          "previousFolder": {
            "$ref": "#/components/schemas/TeamspaceV2FolderLocationResponse"
          }
        }
      },
      "TeamspaceV2UnpublishRequest": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "description": "Resource reference. Accepts schema UUID, schema slug, or display UUID.",
            "x-gitbook-description-html": "<p>Resource reference. Accepts schema UUID, schema slug, or display UUID.</p>"
          }
        }
      },
      "TeamspaceV2UnpublishResponse": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string",
            "format": "uuid"
          },
          "removedFromFolder": {
            "$ref": "#/components/schemas/TeamspaceV2FolderLocationResponse"
          }
        }
      },
      "FormulaRecomputeRequest": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "FIELD",
              "SCHEMA",
              "WORKSPACE"
            ]
          },
          "schema": {
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "scope"
        ],
        "description": "FIELD requires schema and field; SCHEMA requires schema and does not accept field; WORKSPACE does not accept either selector. Selectors accept UUIDs or slugs."
      },
      "FormulaRecomputeResult": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "type": "string",
            "enum": [
              "FIELD",
              "SCHEMA",
              "WORKSPACE"
            ]
          },
          "formulaCount": {
            "type": "integer",
            "format": "int32"
          },
          "skippedFormulaCount": {
            "type": "integer",
            "format": "int32"
          },
          "eventsQueued": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED"
            ]
          }
        }
      },
      "SchemaFolderV2MoveResourcesRequest": {
        "type": "object",
        "properties": {
          "resourceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          },
          "targetFolderId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "resourceIds",
          "targetFolderId"
        ]
      },
      "SchemaFolderV2ResourceSummaryResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "resourceType": {
            "type": "string",
            "enum": [
              "SCHEMA"
            ]
          }
        }
      },
      "SchemaFolderV2DeleteResponse": {
        "type": "object",
        "properties": {
          "deletedFolderId": {
            "type": "string",
            "format": "uuid"
          },
          "movedResourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "targetFolder": {
            "$ref": "#/components/schemas/SchemaV2FolderLocationResponse"
          }
        }
      },
      "SchemaFolderV2PatchRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "SchemaFolderV2CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "name"
        ]
      },
      "SchemaFolderV2Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          },
          "isRoot": {
            "type": "boolean"
          },
          "resourceType": {
            "type": "string",
            "enum": [
              "SCHEMA"
            ]
          },
          "resourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SchemaFolderV2ResourceSummaryResponse"
            }
          }
        }
      },
      "SchemaFolderV2MoveResourcesResponse": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "enum": [
              "SCHEMA"
            ]
          },
          "movedResourceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "targetFolder": {
            "$ref": "#/components/schemas/SchemaV2FolderLocationResponse"
          }
        }
      },
      "DisplayV2LayoutPatchRequest": {
        "type": "object",
        "description": "Patch display freeform layout request for API v2.",
        "properties": {
          "template": {
            "type": "string",
            "description": "Layout template identifier.",
            "example": "freeform"
          },
          "freeformLayouts": {
            "description": "Responsive freeform layouts object used by freeform displays."
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key for the target workspace, sent in the Authorization header as Bearer <API_KEY>."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
