The Callback API allows to integrate callback functionality to your project. It has following URLs:
Initialize a callback:
A method to initialize a callback. Uses the HTTP-POST method.
POST | https://api.tenios.com/callback/init |
Request Parameter:
access_key String Obligatorisch | The api access key. It can be found in the menu item General Settings, section API in the customer portal. |
callback_config_id String Obligatorisch | The callback config id. You find it at the Callback Configurations page of the TENIOS portal. |
callback_number String Obligatorisch | This is the phone number which should receive a call. |
delay String Obligatorisch | Delay (seconds) before calling. |
Example for a successful request:
Request:
{ "access_key": "XXXXX-XXXX-XXXXXX", "callback_config_id": "XXXXX-XXXX-XXXXXX", "callback_number": "+491234567890", "delay": 30 }
API Response:
HTTP Status Code: 200 (OK)
{ "id": 10 }
Example for invalid requests:
API Response:
HTTP Status Code: 400 (Bad Request)
{ "error_code": "BAD_CREDENTIALS", "error_message": "Bad credentials", "fields": [] }
Status of an existing callback:
A method to query the status of an existing callback. Uses the HTTP-GET method.
POST | https://api.tenios.com/callback/status |
Request Parameter:
access_key String Obligatorisch | The api access key. It can be found in the menu item General Settings, section API in the customer portal. |
id String Obligatorisch | The id of a callback request. This id was sent in the response body of the related init callback request |
REQUESTED | Callback requested. |
ACCEPTED | Callback request accepted. |
CALLING_A | PartnerA is being called. |
CALL_A_FAILED | Call to partner A not successful. |
CALLING_B | Partner B is being called. |
CALL_B_FAILED | Call to partner B not successful. |
CONNECTED | Call connected (between partner A and B) |
DISCONNECTED | Call disconnected (after successful call between partner A and B) |
Example of a successful request:
Request:
{ "access_key": "XXXXX-XXXX-XXXXXX", "id": 10 }
API Response:
HTTP Status Code: 200 (OK)
{ "status": "REQUESTED" }
Example of unsuccessful requests: