Skip to main content
POST
/
v1
/
boards
/
{boardId}
/
nodes
/
batch
curl -X POST "https://api.chatgrid.ai/v1/boards/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nodes/batch" \
  -H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {
        "action": "create",
        "data": {
          "type": "chatNode",
          "position": { "x": 100, "y": 200 },
          "data": { "label": "Agent A" }
        }
      },
      {
        "action": "update",
        "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
        "data": { "position": { "x": 300, "y": 400 } }
      },
      {
        "action": "delete",
        "id": "11223344-5566-7788-99aa-bbccddeeff00"
      }
    ]
  }'
{
  "object": "batch_result",
  "data": {
    "created": 1,
    "updated": 1,
    "deleted": 1,
    "errors": null
  }
}
boardId
string
required
Board UUID.
operations
array
required
Array of operations (1-100). Each operation is one of:Create:
  • action: "create"
  • data.type: Node type string
  • data.position: { "x": number, "y": number }
  • data.data: Optional metadata object
Update:
  • action: "update"
  • id: Node UUID
  • data.type: Optional new type
  • data.position: Optional new position
  • data.data: Optional new metadata
Delete:
  • action: "delete"
  • id: Node UUID
Operations are executed sequentially. Partial failures are reported in the errors array without rolling back successful operations.
curl -X POST "https://api.chatgrid.ai/v1/boards/a1b2c3d4-e5f6-7890-abcd-ef1234567890/nodes/batch" \
  -H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {
        "action": "create",
        "data": {
          "type": "chatNode",
          "position": { "x": 100, "y": 200 },
          "data": { "label": "Agent A" }
        }
      },
      {
        "action": "update",
        "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
        "data": { "position": { "x": 300, "y": 400 } }
      },
      {
        "action": "delete",
        "id": "11223344-5566-7788-99aa-bbccddeeff00"
      }
    ]
  }'
{
  "object": "batch_result",
  "data": {
    "created": 1,
    "updated": 1,
    "deleted": 1,
    "errors": null
  }
}