Prime Bot
Home Docs Docs FAQ

Docs FAQ

Answers to the questions that come up most often when integrating with Prime Bot.

This is a developer-focused FAQ. For product and billing questions see the main FAQ.

What are the API rate limits?

Each Sanctum token gets 120 requests per minute, burstable to 240. The current window is reported in standard headers:

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1714000000

Exceeding the limit returns 429 Too Many Requests. Back off until the Retry-After header's seconds have elapsed.

How do I paginate?

All list endpoints return a meta.pagination block with current_page, per_page, total, and last_page. Pass ?page=N and ?per_page=M to control it. per_page is capped per endpoint — see the individual reference pages.

Is there a sandbox environment?

Not yet. For now, create a separate Prime Bot account and connect a test Telegram number to it. All data is isolated per user so you can experiment without touching production.

Do webhooks come from a fixed IP range?

Currently our egress pool rotates, so we don't publish IPs. Verify deliveries via the HMAC signature (see Verifying the signature) rather than IP allowlisting.

What Telegram-side limits should I know about?

  • Roughly 30 messages per second across an entire account.
  • DMs to users who haven't messaged you first are subject to privacy settings and anti-spam checks.
  • Fresh accounts (under 24 hours old) should stay under ~20 sends per hour.

Prime Bot enforces all of the above automatically; if you see PEER_FLOOD errors in your logs it means we've detected Telegram pushing back and are backing off.

Can I generate a client?

Yes. Point your favourite generator at /docs/openapi.json. The spec is kept in sync with the live router at build time.

npx @openapitools/openapi-generator-cli generate \
  -i https://prime-bot.live/docs/openapi.json \
  -g typescript-fetch \
  -o ./primebot-client

Where do I file bugs?

Email support@prime-bot.live or open an issue on our public tracker. Include the request ID from the X-Request-Id response header — that's all we need to trace it server-side.

Edit this page on GitHub