ClawPing API Reference
The ClawPing REST API lets you programmatically create reminders, alerts, and recurring schedules β and receive notifications via Telegram or Email. The API follows REST conventions and returns JSON.
Base URL
All API requests are made to your ClawPing instance:
https://api.clawping.xyz
Request Format
All requests must include Content-Type: application/json. All responses return JSON.
curl -X POST https://api.clawping.xyz/pings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "type": "reminder", "message": "Hello!", "delay": "1m" }'
Authentication
ClawPing uses Bearer token authentication. Include your token in every request's Authorization header.
Request Body
| Field | Type | Description |
|---|---|---|
| secretrequired | string | Your API_SECRET_KEY from .env configuration |
| expires_in | string | Token TTL: 7d, 30d, never (default: never) |
curl -X POST https://api.clawping.xyz/auth/token \
-H "Content-Type: application/json" \
-d '{ "secret": "your-secret-key", "expires_in": "30d" }'
{
"token": "cp_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2026-03-27T00:00:00Z",
"type": "Bearer"
}
Create a Ping
Schedule a time-based reminder delivered via Telegram or Email at the specified delay.
Request Body
| Field | Type | Description |
|---|---|---|
| typerequired | string | Must be reminder |
| messagerequired | string | The notification text (max 2000 chars) |
| delayrequired | string | Time until fire: 30s 5m 2h 1d |
| channelrequired | string | telegram or email |
| chat_id | string | Telegram chat ID (required if channel=telegram) |
| string | Email address (required if channel=email) |
curl -X POST https://api.clawping.xyz/pings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "reminder",
"message": "Deploy the new version to production",
"delay": "2h",
"channel": "telegram",
"chat_id": "437734870"
}'
{
"id": "ping_7f3a9b2c",
"status": "scheduled",
"type": "reminder",
"message": "Deploy the new version to production",
"channel": "telegram",
"chat_id": "437734870",
"scheduled_at": "2026-02-25T11:31:00Z",
"created_at": "2026-02-25T09:31:00Z",
"metadata": {
"delay_parsed": "2h",
"delay_ms": 7200000
}
}
Query Parameters
| Param | Type | Description |
|---|---|---|
| status | string | scheduled fired cancelled β filter by status |
| limit | integer | Max results to return (default: 20, max: 100) |
| offset | integer | Pagination offset (default: 0) |
curl https://api.clawping.xyz/pings?status=scheduled&limit=10 \
-H "Authorization: Bearer $TOKEN"
{
"total": 3,
"limit": 10,
"offset": 0,
"pings": [
{ "id": "ping_7f3a9b2c", "status": "scheduled", "message": "Deploy...", "scheduled_at": "2026-02-25T11:31:00Z" },
{ "id": "ping_8a4b2d1e", "status": "scheduled", "message": "Standup", "scheduled_at": "2026-02-26T09:00:00Z" }
]
}
curl https://api.clawping.xyz/pings/ping_7f3a9b2c \
-H "Authorization: Bearer $TOKEN"
curl -X DELETE https://api.clawping.xyz/pings/ping_7f3a9b2c \
-H "Authorization: Bearer $TOKEN"
{ "success": true, "id": "ping_7f3a9b2c", "status": "cancelled" }
Condition Alerts
Monitor live conditions and fire notifications only when a threshold is crossed. Supports CoinGecko price data and custom webhooks.
| Field | Type | Description |
|---|---|---|
| typerequired | string | Must be condition |
| condition.assetrequired | string | CoinGecko asset ID: bitcoin ethereum |
| condition.operatorrequired | string | above or below |
| condition.thresholdrequired | number | Price threshold in USD |
| messagerequired | string | Notification text when condition fires |
| channelrequired | string | telegram or email |
| repeat | boolean | Re-arm after firing (default: false) |
curl -X POST https://api.clawping.xyz/conditions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "condition",
"condition": {
"asset": "bitcoin",
"operator": "below",
"threshold": 60000
},
"message": "BTC dropped below $60k β check positions",
"channel": "telegram",
"chat_id": "437734870",
"repeat": false
}'
Agent Webhooks
Other agents in the Claw ecosystem can send notifications directly via the webhook endpoint. Authenticate with an agent key.
Agent Auth: Use X-Agent-Key: sk_agent_... header instead of Bearer token. Register your agent first via POST /webhook/agents/register.
curl -X POST https://api.clawping.xyz/webhook/agents \
-H "X-Agent-Key: sk_agent_clawscout_abc123" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "clawscout-v1.2",
"priority": "urgent",
"recipient": {
"channel": "telegram",
"chat_id": "437734870"
},
"notification": {
"title": "π¨ Breaking: SEC approves Bitcoin ETF",
"body": "BTC price impact expected immediately.",
"source_url":"https://reuters.com/article/..."
}
}'
{
"success": true,
"ping_id": "ping_webhook_9x2b",
"delivered": true,
"channel": "telegram"
}
curl -X POST https://api.clawping.xyz/webhook/agents/register \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "clawscout-v1.2",
"name": "ClawScout",
"description": "News monitoring agent",
"allowed_channels": ["telegram", "email"]
}'
{
"agent_key": "sk_agent_clawscout_abc123def456",
"agent_id": "clawscout-v1.2",
"created_at":"2026-02-25T09:31:00Z"
}
Recurring Schedules
Create cron-based recurring pings. Set once, repeat forever. Uses standard 5-field cron syntax.
| Field | Type | Description |
|---|---|---|
| cronrequired | string | 5-field cron: 0 9 * * 1-5 = MonβFri 9am |
| messagerequired | string | Notification text |
| channelrequired | string | telegram or email |
| timezone | string | IANA timezone (default: server timezone) |
curl -X POST https://api.clawping.xyz/recurring \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cron": "0 9 * * 1-5",
"message": "Daily standup β update your Jira tickets first!",
"channel": "telegram",
"chat_id": "437734870",
"timezone": "Asia/Jakarta"
}'
Test Connections
Verify your channel configurations are working correctly.
curl -X POST https://api.clawping.xyz/test/telegram \
-H "Authorization: Bearer $TOKEN"
{ "success": true, "message": "Telegram connected β", "chat_id": "437734870" }
curl -X POST https://api.clawping.xyz/test/email \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "to": "you@example.com" }'
curl https://api.clawping.xyz/health
{
"status": "ok",
"version": "1.0.0",
"uptime": "2d 4h 31m",
"scheduler": "running",
"db": "connected",
"telegram": "connected",
"email": "connected"
}
Errors & Codes
ClawPing uses standard HTTP status codes and returns structured error objects.
{
"error": "INVALID_DELAY",
"message": "Delay format '5x' is not valid. Use: 30s, 5m, 2h, 1d",
"status": 400
}
| Code | Status | Meaning |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid Bearer token |
| INVALID_DELAY | 400 | Delay format not recognized |
| INVALID_CHANNEL | 400 | Channel must be telegram or email |
| PING_NOT_FOUND | 404 | Ping ID does not exist |
| ALREADY_FIRED | 400 | Cannot cancel a ping that already fired |
| RATE_LIMIT | 429 | Too many pings created β limit per user exceeded |
| AGENT_KEY_INVALID | 401 | Agent key not registered or revoked |
| SMTP_FAILED | 500 | Email delivery failed β check SMTP config |
| TELEGRAM_FAILED | 500 | Telegram delivery failed β check bot token |
| Resource | Default Limit | Configurable |
|---|---|---|
| Max active pings | 100 per user | MAX_PINGS_PER_USER in .env |
| API requests | 300 / 15 min | RATE_LIMIT_WINDOW in .env |
| Webhook calls | 60 / min per agent | WEBHOOK_RATE_LIMIT in .env |