9.8. Container & Channel API Reference¶
This page documents all REST API endpoints added in the NanoClaw release for container execution and multi-channel messaging. All endpoints are prefixed with /api/v1 and require authentication when enabled.
Authentication¶
Container Runtime¶
Get Runtime Status¶
Returns the detected container runtime backend.
Response:
{
"available": true,
"backend": "apple_container",
"version": "0.2.0",
"networking": {
"hostGateway": "192.168.64.1",
"extraRunArgs": []
},
"message": "Apple Container runtime detected"
}
Backend values: "apple_container" | "docker" | null
Container Image¶
Build Agent Image¶
Builds the aigo-agent-runner container image asynchronously.
Request Body:
Response:
{
"success": true,
"imageTag": "aigo-agent-runner:latest",
"message": "Build completed successfully",
"output": "..."
}
Check Image Status¶
Query Parameters: imageTag (optional, default: aigo-agent-runner:latest)
Response:
Mount Security¶
Validate Mount¶
Request Body:
{
"hostPath": "/Users/alice/projects/myapp",
"containerPath": "/workspace/extra/myapp",
"readOnly": true
}
Response:
{
"allowed": true,
"canonicalHostPath": "/Users/alice/projects/myapp",
"message": "Mount validated successfully"
}
Get Mount Allowlist¶
Response:
{
"allowedRoots": ["/Users/alice/projects"],
"blockedPatterns": [".ssh", ".gnupg", ".env", ".aws", ".azure", ".gcloud", ".docker", ".kube"]
}
Set Mount Allowlist¶
Request Body:
{
"allowedRoots": ["/Users/alice/projects", "/Users/alice/data"],
"blockedPatterns": [".ssh", ".gnupg", ".env", ".aws"]
}
Credential Proxy¶
Get Proxy Status¶
Response:
Start Proxy¶
Stop Proxy¶
Add Credential Mapping¶
Request Body:
{
"name": "Anthropic API",
"upstreamUrl": "https://api.anthropic.com",
"credentialType": "api_key",
"credential": "sk-ant-..."
}
Response:
{
"id": "mapping-uuid-...",
"name": "Anthropic API",
"placeholder": "CREDENTIAL_PROXY_PLACEHOLDER"
}
Remove Credential Mapping¶
Set Proxy Port¶
Request Body:
IPC¶
Create IPC Directories¶
Request Body:
Send Follow-Up Message¶
Writes a follow-up message to the container's IPC input directory.
Request Body:
{
"group": "telegram-support",
"sessionId": "session-abc123",
"content": "Focus on the authentication module first"
}
Send Close Signal¶
Writes the _close sentinel to request graceful container shutdown.
Request Body:
Container Queue¶
List Container Groups¶
Response:
Get Queue Counts¶
Response:
Get Group State¶
Get/Set Max Concurrent Containers¶
PUT Request Body:
Group Namespaces¶
List Namespaces¶
Create Namespace¶
Request Body:
Get Namespace¶
Update Namespace¶
Delete Namespace¶
Get/Set Group Instructions¶
GET /api/v1/container/namespaces/{name}/instructions
PUT /api/v1/container/namespaces/{name}/instructions
PUT Request Body:
Get/Set Global Instructions¶
GET /api/v1/container/namespaces/global/instructions
PUT /api/v1/container/namespaces/global/instructions
Get Merged Instructions¶
Request Body:
Response:
{
"merged": "# Global Instructions\nAlways respond in the same language...\n\n# Group Instructions\nYou are a support agent..."
}
Task Schedules¶
List Schedules¶
Create Schedule¶
Request Body:
{
"name": "Daily Report",
"group": "reporting",
"prompt": "Generate today's summary report",
"schedule": {
"type": "cron",
"value": "0 9 * * 1-5"
},
"containerConfig": {
"image": "aigo-agent-runner:latest",
"timeoutSecs": 600,
"env": []
},
"contextMode": "isolated",
"enabled": true
}
Schedule type values:
cron— value is a cron expression string (e.g.,"0 9 * * 1-5")interval— value is milliseconds as a number (e.g.,300000)once— value is an ISO 8601 datetime string (e.g.,"2026-04-01T02:00:00Z")
Get Schedule¶
Update Schedule¶
Delete Schedule¶
List Schedule Logs¶
Query Parameters:
limit(default: 20, max: 500)offset(default: 0)
Audit & Monitoring¶
Get Audit Log¶
Query Parameters:
limit(default: 50, max: 500)group— filter by group nameseverity— filter by severity (info,warning,violation,error)
Get Run History¶
Query Parameters:
limit(default: 50, max: 500)group— filter by group name
Get Metrics¶
Returns current container metrics including running count, queue depth, and security event counts.
Get Analytics¶
Returns aggregated historical analytics (runs per day, success rate, average duration).
Channels¶
List Channels¶
Response:
{
"channels": [
{"name": "telegram", "connected": true, "statusMessage": "Connected"},
{"name": "slack", "connected": false, "statusMessage": "Not configured"}
]
}
Get Channel Status¶
Send Message¶
Request Body:
List Chats¶
Query Parameters:
channel— filter by channel namelimit(default: 100)
Get Chat Messages¶
Query Parameters:
limit(default: 100, max: 1000)before— Unix timestamp, return messages before this time
Telegram Channel¶
Connect¶
Request Body:
Disconnect¶
Validate Token¶
Request Body:
Slack Channel¶
Connect¶
Request Body:
Disconnect¶
Validate Tokens¶
Request Body:
Discord Channel¶
Connect¶
Request Body:
Disconnect¶
Validate Token¶
Request Body:
WhatsApp Channel¶
Connect¶
Request Body:
{
"phoneNumberId": "123456789",
"accessToken": "your-access-token",
"webhookVerifyToken": "your-verify-token"
}
Disconnect¶
Validate Configuration¶
Webhook Verification (WhatsApp Cloud API)¶
WhatsApp sends a GET request with hub.mode=subscribe, hub.verify_token, and hub.challenge. The endpoint returns the challenge if the verify token matches.
Webhook Receive¶
WhatsApp sends incoming message events here. This endpoint is called by WhatsApp's servers, not by you directly.
Sender Allowlist¶
Get Allowlist¶
Response:
{
"enabled": true,
"entries": [
{"chatJid": "tg:123456789", "label": "Alice"},
{"chatJid": "slack:U01ABCDEF", "label": "Bob"}
]
}
Set Allowlist¶
Request Body: