This documentation helps you implement the RESTful MyOperator API. This API uses a JSON format for output. The API is stateless – all requests are validated against an API token. The API token can be obtained manually from the MyOperator app.
It is very simple to get an authentication token. Login to your MyOperator panel. Go to Manage -> API integration -> Public API token
The API uses a straight-forward URL naming convention. Each request must be made to the API endpoint (https://developers.myoperator.co). API token must be provided as part of the query string for all requests, using the 'token' variable, e.g. https://developers.myoperator.co?token=tS5adsXC6V2nH991
Each response sent from the API made in json format contains the 'status' and status response parameters.
When the 'status' is 'success', the status response parameters contain the 'code' and an array of data, if request is POST or GET. The status response parameter contains the success message if it is a PUT request.
In case the 'status' is 'error', the response always contains the error 'code' and 'message' in the status response parameter.
Example for framing filters :
If you need to filter for all incoming missed calls,
Step 1 : Get List of filter from filters API.
Step 2 : fetch appropriate ids for the filter names (incoming - 5, missed - 13, call - 8)
Step 3 : Relate ids with logical operators (AND, OR only) - ‘5 AND 13 AND 8’
Step 4 : Place it against filters key in input - filters = ‘5 AND 13 AND 8’
Note
parent_id = 0, denotes that it is a type of filter but the filter itself (please find the picture)
In the below Image (replicates the filters response array), Source of Logs, Event of Logs & Type of Logs are embedded in the array and given with parent_id = 0.
In order to pass the filters to access logs, you need to pick filters which are only with parent is not equals to 0.
From below image, if you try to select filters incoming & outgoing, you need to relate them with OR operator (as parent id is same for those filters, use OR)
From below image, if you try to select Mobile & incoming, you need to relate them with AND operator (as parent id is different for those filters, use AND)
Note :
User will be able to add other users based on the permissions defined on his role. SuperAdmin (id = 1) & Admin (id = 2) will be able to add users by default.
Extension should be a unique integer value
Contact number should be unique in your company. How ever it can be assigned as an alternate number of other users and a verification will be triggered from MyOperator.
alternate_cc is a required field only with alternate_contact_number