Bot Builder / API
API Map
Real endpoint structure for visual bot lifecycle: catalog, draft graph, publish, simulator, and executions.
Base URL
http
https://api.smsport.in/apiSave Graph Required Shape
text
Required top-level fields:
- startNodeId
- nodes[]
- edges[]
- triggers[]
- variables[]
Optional:
- schemaVersionCore Endpoints
http
GET /api/bot-builder/catalog
GET /api/bot-builder/templates
GET /api/bot-builder
POST /api/bot-builder
GET /api/bot-builder/:botId
PATCH /api/bot-builder/:botId
DELETE /api/bot-builder/:botId
PUT /api/bot-builder/:botId/draft/graph
POST /api/bot-builder/:botId/publish
POST /api/bot-builder/:botId/unpublish
POST /api/bot-builder/:botId/test/simulator
GET /api/bot-builder/:botId/executionsRuntime Ops Endpoints
http
POST /api/bot-builder/:botId/test/simulator
GET /api/bot-builder/:botId/test-scenarios
POST /api/bot-builder/:botId/test-scenarios
PATCH /api/bot-builder/:botId/test-scenarios/:scenarioId
DELETE /api/bot-builder/:botId/test-scenarios/:scenarioId
POST /api/bot-builder/:botId/test-scenarios/:scenarioId/run
GET /api/bot-builder/:botId/executions
GET /api/bot-builder/:botId/executions/:executionId
POST /api/bot-builder/:botId/executions/:executionId/actionsExample: Save Draft Graph
bash
curl -X PUT "https://api.smsport.in/api/bot-builder/<BOT_ID>/draft/graph" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"schemaVersion": 1,
"startNodeId": "node_welcome",
"nodes": [
{
"id": "node_welcome",
"type": "send_text",
"groupKey": "send_message",
"position": { "x": 160, "y": 120 },
"config": { "message": "Welcome" }
},
{
"id": "node_end",
"type": "end",
"groupKey": "logic_utilities",
"position": { "x": 460, "y": 120 },
"config": {}
}
],
"edges": [
{
"id": "edge_welcome_end",
"sourceNodeId": "node_welcome",
"targetNodeId": "node_end",
"sourceHandle": null,
"label": null,
"conditionValue": null,
"sortOrder": 0
}
],
"triggers": [
{
"id": "trigger_any_message",
"type": "any_message",
"matchValue": null,
"isEnabled": true,
"sortOrder": 0
}
],
"variables": []
}'Example: Run Simulator
bash
curl -X POST "https://api.smsport.in/api/bot-builder/<BOT_ID>/test/simulator" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"versionTarget": "draft",
"events": [
{ "eventType": "customer_text", "text": "Hi there" }
]
}'Common Validation Errors
- Using
datainstead ofconfiginside nodes. - Missing
groupKeyorpositionin node objects. - Using simulator payload as
scenario.inputsinstead ofevents[]. - Using execution action
resume(not supported). - Missing top-level
triggersorvariablesarrays in graph save payload.
Related:
Node reference|Visual builder standard|Simulator docs|Test scenarios docs|Executions docs|Global API reference