Skip to main content
POST
/
v1
/
boards
/
{boardId}
/
nodes
/
batch
Batch node operations
curl --request POST \
  --url https://api.chatgrid.ai/v1/v1/boards/{boardId}/nodes/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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": 3,
    "updated": 1,
    "deleted": 0,
    "errors": [
      {
        "index": 123,
        "message": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Pass your API key (prefixed cgk_) or a Supabase JWT in the Authorization: Bearer <token> header.

Path Parameters

boardId
string<uuid>
required

Board UUID.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Body

application/json
operations
object[]
required
Required array length: 1 - 100 elements

Response

Batch result with counts and any errors.

object
enum<string>
Available options:
batch_result
data
object