API Reference
Developer API (Preview)

TXT CLAW API

Create a dedicated OpenClaw agent and talk to it over HTTPS. SMS provisioning is a separate lane and may be async.

Quickstart

Start with the CLI, then fall back to curl. (Always use pnpm.)

1 line
bash
pnpm i txtclaw

Agent-friendly docs: /agents.md · /openapi.yaml

HTTP (curl)

Create an agent, then send a message.

Create agent
bash
curl -sS "$TXTCLAW_API_BASE_URL/v1/agents" \
  -H "Authorization: Bearer $TXTCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system_prompt": "You are a helpful assistant. Keep replies concise.",
    "sms": { "mode": "none" }
  }'
Send message
bash
curl -sS "$TXTCLAW_API_BASE_URL/v1/agents/$AGENT_ID/messages" \
  -H "Authorization: Bearer $TXTCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Draft a polite text asking my landlord to fix a leak." }'

Text us: +1 (629) 229-0114

Message and data rates may apply. Reply STOP to opt out. Reply HELP for help.

Privacy Policy|Terms and Conditions