Skip to main content

Create Node

Create a new node in the tree structure.

Endpoint: POST /api/v1/integration/nodes

Authentication: Required (Bearer token)

Required Headers:

Authorization: Bearer <access_token>
X-Target-Server: integration

Request Body

{
"parent_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Node",
"type": 1
}

Request Parameters

FieldTypeRequiredDescription
parent_idstring (UUID)NoParent node ID. Omit for root nodes.
namestringYesNode name (1-255 characters)
typeintegerYesNode type: 1=Apex, 2=Account, 3=SubAccount

Response

Status: 201 Created

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"parent_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Node",
"type": 1,
"path": "1.2.3",
"int_id": 3,
"created_at": "2025-01-03T10:00:00Z",
"updated_at": "2025-01-03T10:00:00Z"
}

Example cURL Request

curl -X POST https://<base-url>/api/v1/integration/nodes \
-H "Authorization: Bearer <access_token>" \
-H "X-Target-Server: integration" \
-H "Content-Type: application/json" \
-d '{
"parent_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Node",
"type": 1
}'