This section shows how to develop a bot. The information is intended for software developers.
A company can create up to 100 bots. The number of bot calls is unlimited. Payment terms for a bot account are identical to a regular employee account. But since it is a special account, it is created on the Bots tab in User Management section. It is listed as a non-activated user. Your company’s supervisor (the person who has created your organization account in Pyrus) can add and set up bots.
You choose a name for each bot. A unique invalid email address is generated as a login. API calls can be made from a bot account, but you cannot log into the system under such an account.
You need to develop a handler app for each bot and post it on your site. When a task is delivered to a bot’s Inbox, it sends a request to the event handler. After that the app starts: it can send an SMS message, an email, or perform other actions that you programmed.
A bot sends HTTPS requests using the POST method. You server must respond to a bot request with the 2XX status within 60 sec. If the server is unavailable, or responds with any other status, Pyrus sends a second request in 61 sec, and a third in 122 sec. The attempt count is included in the optional request header.
A bot configuration includes: URL address, Security Key, ClientId, and the Enabled/Disabled parameters. URL: A web page address on your site. The page contains the event handler code. When a bot receives a task, Pyrus sends a request to this address. Only HTTPS addresses are supported. Certificate Requirements: The HTTPS certificate must be verifiable. The certificate chain must be traceable to a trusted certification center. The Security Key and ClientId values are generated automatically when the bot is created. They are used for API calls. The Security Key is used to sign each request and guarantees that the requests come from Pyrus.
The POST Request
Response: HTTP 2XX The response body can also be specified if required. The response body has the same structure as the Public API CreateComment request. A header authorization is not required.