GET/api/v2/telegram-bots
List Telegram bots
Returns your Telegram bots. Use accountId (Mongo id) as conversationContext.accountId. Bot tokens and webhook secrets are never returned.
When to use it. To get botId/accountId before listing subscribers.
Code example
Correct: Bot list
curl --location 'https://raselsms.com/api/v2/telegram-bots' \--header 'X-API-Key: YOUR_API_KEY'Response example
200 — Bot list
{ "success": true, "data": { "bots": [ { "accountId": "64f1a2b3c4d5e6f7a8b9c0d1", "name": "Support bot", "botUsername": "mysupportbot", "displayName": "Support", "isActive": true, "moduleType": "telegram_bot" } ] }}401 — Missing or invalid API key.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "UNAUTHORIZED", "error": "Missing or invalid API key"}403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "FORBIDDEN", "error": "Phone not verified or missing permission"}429 — Rate limit exceeded. Honor Retry-After when present.
{ "success": false, "requestId": "msgreq_1739012345678_abc123", "code": "RATE_LIMITED", "error": "Rate limit exceeded", "retryAfterSeconds": 30}HTTP request
GET /api/v2/telegram-bots
Request Headers
| Header | Type | Description |
|---|---|---|
| X-API-Key | string | Your Rasel API key. Send it on every documented request except inbound webhooks. * |
Response Fields
| Field | Type | Description | Example |
|---|---|---|---|
| success | boolean | True when the operation succeeded, or when at least one batch recipient succeeded. | |
| data | json | Primary payload for list and snapshot endpoints. |
Status Codes
| Status | Description |
|---|---|
| 200 | Success. |
| 401 | Missing or invalid API key. |
| 403 | Phone not verified, missing permission, or the account cannot perform this action. |
| 429 | Rate limit exceeded, or the maximum number of verification attempts was reached. |
Try it
Request
GET /api/v2/telegram-botsResponse
Send a request to see the response.