The Operator API is organized around REST. Our API has accepts multipart/form-data request body, returns JSON-encoded response, and uses standard HTTP response codes.
The Operator API uses token to authenticate requests. You can obtain a token from the administrator. The token must be sent with each request in the ‘token’ parameter. API requests without authentication will fail.
Send message to control panel
ENDPOINT
Attributes
action (string) - message_sent
user_id (integer) - Unique identifier for sender (user)
contact_id (integer) - Unique identifier for recipient (bot)
message (string) - Message text
attaches (array) - Photo objects (If photo is available to the public)
attach (binary) - File object (If photo is not available to the public)
Photo object
file_url - url to original photo
big - url to normal thumbnail (dimensions can be any, usually 200x200)
Webhooks
Webhooks are used when you need to transfer an event from the operator panel to the site. For each site, administrator specifies POST endpoints that will be called when a specific event occurs. Each webhook passes a token parameter.
Send message from control panel
POST admin-defined
Attributes
user_id (integer) - Unique identifier for sender (bot)
contact_id (integer) - Unique identifier for recipient (user)
message (string) - Message text
attach (binary) - File object
Get user info from site
POST admin-defined
Attributes
user_id (integer) - Unique identifier for sender (bot)
Response JSON-encoded
id (integer) - Unique identifier for user
name (string) - Name
gender (string) - Gender
avatar (string) - Avatar url
balance (string) - Balance
location (string) - Location
about (string) - About info
custom (array) - Custom data (гser attributes in the form of name/value pairs)
Get user private media from site
POST admin-defined
Attributes
user_id (integer) - Unique identifier for sender (bot)
Response JSON-encoded
media (array) - Media objects
Media object
url (string) - url to original photo
big (string) - url to normal thumbnail (dimensions can be any, usually 200x200)