{"openapi":"3.0.0","info":{"title":"Chatbots service API","description":"Using the API for Chatbots, you can integrate your system with SendPulse\u2019s chatbots service and get detailed information about your account, bots, dialogs.\n\n            \nOn the right, there is a button for authorizing requests made on this page. Click \u201cAuthorize,\u201d then insert the ID and Secret from your account.\n\n            \nTo perform a request directly from the page, click the \"Try it out\" button within each method block. Then fill in input fields if any (for URL parameters, the description is right below the URL request; for body parameters, the description is under the \u201cScheme\u201d button to the right of the example), and click \u201cRun.\u201d You'll find the server response and description of received parameters below.\n        ","version":"0.0.1"},"servers":[{"url":"https:\/\/api.sendpulse.com\/chatbots","description":""}],"tags":[{"name":"dialogs","description":""},{"name":"account","description":""},{"name":"bots","description":""}],"paths":{"\/dialogs":{"get":{"summary":"Get dialogs list info","description":"Returns information about your dialogs from all channels","security":[{"Authorization by API key":[]}],"tags":["dialogs"],"parameters":[{"in":"query","name":"size","description":"The limit of pagination items that will be returned","schema":{"type":"integer"}},{"in":"query","name":"skip","description":"The offset of pagination items, indicating where the current batch starts","schema":{"type":"integer"}},{"in":"query","name":"search_after","description":"The ID of the last_inbox_message element after which elements will be returned","schema":{"type":"string"}},{"in":"query","name":"order","description":"Sort order ASC or DESC","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Operation successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/Dialog"}},"sort":{"type":"object"},"total":{"type":"integer"},"size":{"type":"integer"},"search_after":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]}}}},"type":"object"}}}}}}},"\/account":{"get":{"summary":"Get account info","description":"Returns information about your current account pricing plan, the number of messages in your plan, bots, contacts, list of tags, and variables","security":[{"Authorization by API key":[]}],"tags":["account"],"responses":{"200":{"description":"Operation successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"$ref":"#\/components\/schemas\/Account"}},"type":"object"}}}}}}},"\/bots":{"get":{"summary":"Get a list of connected bots","description":"Returns lists of bots with information about each: bot ID, channel information, number of received and unread messages, bot status, and creation date","security":[{"Authorization by API key":[]}],"tags":["bots"],"responses":{"200":{"description":"Operation successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Bot"}}},"type":"object"}}}}}}}},"components":{"securitySchemes":{"Authorization by API key":{"type":"http","scheme":"bearer","description":"Paste your API key in the format sp_apikey_*** from the https:\/\/login.sendpulse.com\/settings\/api section"}},"schemas":{"SuccessResponse":{"properties":{"success":{"type":"boolean"},"data":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"object"},{"type":"boolean"}]}},"type":"object"},"Dialog":{"properties":{"_id":{"type":"string"},"bot_id":{"type":"string"},"contact":{"type":"object","properties":{"id":{"type":"string"},"full_name":{"type":"string"},"profile_pic":{"type":"string"}}},"last_inbox_message":{"type":"object","properties":{"text":{"type":"string"},"date":{"type":"string","example":"2020-12-12T00:00:00+03:00"}}},"last_outbox_message":{"type":"object","properties":{"text":{"type":"string"},"date":{"type":"string","example":"2020-12-12T00:00:00+03:00"}}},"service":{"type":"integer"},"user_id":{"type":"integer"},"inbox_unread_count":{"type":"integer"},"is_chat_opened":{"type":"boolean"},"created_at":{"type":"string","example":"2020-12-12T00:00:00+03:00"},"updated_at":{"type":"string","example":"2020-12-12T00:00:00+03:00"}}},"Account":{"properties":{"tariff":{"type":"object","description":"`-1` - unlimited","properties":{"code":{"type":"string","example":"messengers500"},"max_bots":{"type":"integer","example":-1},"max_contacts":{"type":"integer","example":500},"max_messages":{"type":"integer","example":-1},"max_tags":{"type":"integer","example":-1},"max_variables":{"type":"integer","example":-1},"branding":{"type":"boolean","example":false},"is_exceeded":{"type":"boolean","example":false},"is_expired":{"type":"boolean"},"expired_at":{"type":"string","example":"2026-01-15T11:11:11+00:00"}}},"statistics":{"type":"object","description":"","properties":{"messages":{"type":"integer"},"bots":{"type":"integer"},"contacts":{"type":"integer"},"variables":{"type":"integer"},"active_count_by_last_month":{"type":"integer"},"active_count_by_current_tariff_period":{"type":"integer"}}},"services":{"type":"array","description":"\n                    * `1` - Messenger\n\n                    * `3` - Telegram\n\n                    * `4` - WhatsApp\n\n                    * `5` - Instagram\n\n                    * `6` - Viber\n\n                    * `7` - Livechat\n\n                    * `8` - TikTok\n\n                    * `1000` - Bridge\n\n                    * `1001` - Telegram personal\n\n                ","items":{"type":"integer"},"example":[1,3,5]}}},"Bot":{"properties":{"id":{"type":"string"},"channel_data":{"type":"object","properties":{"access_token":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"username":{"type":"string"}}},"inbox":{"type":"object","properties":{"total":{"type":"integer"},"unread":{"type":"integer"}}},"status":{"type":"integer","enum":[3,4],"description":"\n                    * `3` - active\n\n                    * `4` - inactive\n\n                "},"created_at":{"type":"string","example":"2020-12-12T00:00:00+03:00"}}}}},"security":[{"Authorization by API key":[]}]}