API reference

Free

Endpoints, parameters and examples for the dev>nulll API.

All endpoints are under https://api.devnulll.dev/v1 and require an API key (how to get one). Send it as Authorization: Bearer dnk_… or X-API-Key: dnk_…. Errors return a JSON body like { "error": "…" } with an HTTP status.

Account

GET /v1/account

Returns the account behind the key and its subscription status.

curl https://api.devnulll.dev/v1/account -H "Authorization: Bearer dnk_…"
{ "tg_user_id": 123456789, "subscription": "active" }

Bots

GET /v1/bots

Lists the bots in your account.

curl https://api.devnulll.dev/v1/bots -H "Authorization: Bearer dnk_…"
{
  "subscription": "active",
  "bots": [
    { "id": "b_8f2…", "title": "Support bot", "status": "running", "client_ref": "" }
  ]
}

GET /v1/status?bot_id=<id>

Returns a single bot’s run status (running | stopped).

curl "https://api.devnulll.dev/v1/status?bot_id=b_8f2…" -H "Authorization: Bearer dnk_…"
{ "bot_id": "b_8f2…", "status": "running" }

POST /v1/deploy

Deploys (or redeploys) a bot and starts it 24/7. The config is a bot exported from the app (Export button) or built by you. Pass a stable client_ref to redeploy in place instead of creating a duplicate. Requires an active subscription (otherwise 402).

FieldTypeRequiredNotes
configobjectyesThe bot configuration (graph)
tokenstringyesThe bot’s Telegram token
client_refstringStable id; same ref redeploys the same bot
curl -X POST https://api.devnulll.dev/v1/deploy \
  -H "Authorization: Bearer dnk_…" -H "content-type: application/json" \
  -d '{ "config": { /* exported bot */ }, "token": "123:ABC", "client_ref": "my-bot" }'
{ "bot_id": "b_8f2…", "status": "running" }

POST /v1/stop

Stops a running bot.

curl -X POST https://api.devnulll.dev/v1/stop \
  -H "Authorization: Bearer dnk_…" -H "content-type: application/json" \
  -d '{ "bot_id": "b_8f2…" }'
{ "bot_id": "b_8f2…", "status": "stopped" }

POST /v1/delete

Stops and permanently deletes a bot.

curl -X POST https://api.devnulll.dev/v1/delete \
  -H "Authorization: Bearer dnk_…" -H "content-type: application/json" \
  -d '{ "bot_id": "b_8f2…" }'
{ "deleted": true }

Analytics

GET /v1/analytics?bot_id=<id>&days=<n>

Returns usage analytics for one bot over the last days (default 30): users, events and top commands.

curl "https://api.devnulll.dev/v1/analytics?bot_id=b_8f2…&days=7" -H "Authorization: Bearer dnk_…"

Revenue

GET /v1/revenue?days=<n>

Returns the Stars revenue across your deployed bots — the same numbers as the app’s Revenue panel and /revenue in @devnulll_bot. We only count earnings; the money is paid directly to you through Telegram (see Revenue tracking).

curl "https://api.devnulll.dev/v1/revenue?days=30" -H "Authorization: Bearer dnk_…"

Webhooks

Let an external service trigger a deployed bot’s flow. Create a webhook for a bot, hand the returned URL to the other service, and each POST to it fires the bot’s Webhook trigger. The {id} in the URL is unguessable and acts as the secret.

POST /v1/webhooks

Creates a webhook for one of your bots. Returns the public URL.

curl -X POST https://api.devnulll.dev/v1/webhooks \
  -H "Authorization: Bearer dnk_…" -H "content-type: application/json" \
  -d '{ "bot_id": "b_8f2…", "label": "CRM" }'
{ "id": "a1b2c3…", "url": "https://api.devnulll.dev/v1/hooks/a1b2c3…" }

GET /v1/webhooks

Lists your webhooks.

POST /v1/webhooks/delete

Deletes a webhook by { "id": "…" }.

POST /v1/hooks/{id} — public

The trigger URL itself. No API key — possession of the URL is the auth, so keep it secret. An external service POSTs any body; it’s delivered to the bot’s flow in the variable configured on the Webhook trigger. Add ?chat_id=<id> (or a top-level "chat_id" in a JSON body) to target a chat for messages the flow sends. The bot must be deployed.

curl -X POST "https://api.devnulll.dev/v1/hooks/a1b2c3…?chat_id=123456789" \
  -H "content-type: application/json" \
  -d '{ "order_id": 42, "total": "9.99" }'
{ "queued": true }