Telegram bot

Connect a bot with its token from @BotFather and set its webhook

POST
/v1/stores/{storeId}/telegram-bot

Authorization

AuthorizationBearer <token>

API key from Settings → API keys

In: header

Path Parameters

storeId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/stores/string/telegram-bot" \  -H "Content-Type: application/json" \  -d '{}'
{  "env": "live",  "allowed": true,  "simulatedAvailable": true,  "webhookUrl": "string",  "bot": {    "username": "string",    "name": "string",    "simulated": true,    "webhookState": "pending",    "lastError": "string",    "connectedAt": "string",    "buyerMenu": true,    "support": true,    "lowStockAt": -9007199254740991  },  "links": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",      "member": "string",      "telegramUsername": "string",      "orderAlerts": true,      "stockAlerts": true,      "createdAt": "string"    }  ],  "groups": [    {      "chatId": "string",      "title": "string",      "type": "group",      "isAdmin": true,      "canInvite": true,      "canRestrict": true,      "updatedAt": "string"    }  ],  "access": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf",      "variant": "string",      "chatId": "string",      "chatTitle": "string"    }  ],  "grants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",      "orderNumber": -9007199254740991,      "chatTitle": "string",      "state": "pending",      "simulated": true,      "lastError": "string",      "createdAt": "string"    }  ],  "variants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "label": "string"    }  ],  "messages": [    {      "key": "string",      "name": "string",      "description": "string",      "audience": "buyer",      "customised": true    }  ]}