MyOpenClaw Developer API: Automate Your AI Infrastructure
Stop clicking buttons. Start automating.
The MyOpenClaw Developer API lets you manage your AI assistant instances programmatically — perfect for DevOps teams, platform builders, and power users who want full control.
What Can You Do With the API?
Instance Management
Create, start, stop, and restart instances without touching the dashboard:
List all your instances
curl -H "Authorization: Bearer moc_abc123_xyz789..." \
https://www.myopenclaw.cloud/api/v1/instances
Create a new instance with a custom subdomain
curl -X POST \
-H "Authorization: Bearer moc_abc123_xyz789..." \
-H "Content-Type: application/json" \
-d '{"subdomain": "my-project-bot", "label": "Project Bot"}' \
https://www.myopenclaw.cloud/api/v1/instances
API Key Management
Create and manage API keys with fine-grained scope control:
Create a read-only key for monitoring
curl -X POST \
-H "Authorization: Bearer moc_abc123_xyz789..." \
-H "Content-Type: application/json" \
-d '{"name": "monitoring-key", "scopes": ["instance:read", "operations:read"]}' \
https://www.myopenclaw.cloud/api/v1/keys
Async Operations
Long-running operations (start, restart) return immediately with an operation ID you can poll:
// Start an instance (returns 202 Accepted)
const res = await fetch(/api/v1/instances/${id}/start, {
method: 'POST',
headers: { 'Authorization': Bearer ${apiKey} },
});
const { operationId } = await res.json();
// Poll until complete
let status = 'pending';
while (status === 'pending' || status === 'in_progress') {
const op = await fetch(/api/v1/operations/${operationId}, {
headers: { 'Authorization': Bearer ${apiKey} },
}).then(r => r.json());
status = op.status;
}
Security Built In
Use Cases
CI/CD Integration
Automatically restart instances after deploying new configurations:
GitHub Actions example
name: Restart OpenClaw instance
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.MYOPENCLAW_API_KEY }}" \
-H "Idempotency-Key: deploy-${{ github.sha }}" \
https://www.myopenclaw.cloud/api/v1/instances/${{ vars.INSTANCE_ID }}/restart
Multi-Instance Management
Pro users get up to 6 instances, Business users up to 21. Manage them all from a single script:
import requests
API_KEY = "moc_abc123_xyz789..."
BASE = "https://www.myopenclaw.cloud/api/v1"
Get all instances
instances = requests.get(
f"{BASE}/instances",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
Restart all running instances
for inst in instances:
if inst["status"] == "running":
requests.post(
f"{BASE}/instances/{inst['id']}/restart",
headers={"Authorization": f"Bearer {API_KEY}"}
)
print(f"Restarting {inst['subdomain']}.myopenclaw.cloud")
Monitoring & Alerting
Build custom monitoring dashboards by polling instance status:
Check instance health (great for uptime monitoring tools)
curl -s -H "Authorization: Bearer $API_KEY" \
https://www.myopenclaw.cloud/api/v1/instances | \
jq '.[] | {subdomain, status, fly_region}'
Getting Started
API Highlights
moc_shortToken_longTokenIdempotency-Key headerReady to automate? Get started with Pro →
Full API reference: Developer API Docs →