Introduction

Make sure to learn more about the use cases behind this API by reading the Use case.

The /request API aims to solve the following use cases:

  • Generation of 2FA codes
  • Delivery of 2FA codes

An example request toward /request is:

{
  "to": "447916123456",
  "template_id": "11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "parameters": {
    "firstName": "John",
    "lastName": "Doe"
  }
}

Where:

  • to is the recipient receiving the 2FA message
  • template_id is the id of the template you want to deliver to the recipient (template endpoint)
  • parameters is a freeform key value object used in interpolating the keys and values against the template referenced via template_id

API responses

The following responses and error codes are being returned as a part of the API response.

Error codes

When sending the message using the /request endpoint the following errors can appear within the error field:

HTTP STATUS 200

statuserror_messagedescription
ACCEPTEDOKThe request has been successfully processed
REJECTEDCLIENT_COUNTRY_FORBIDDENThe country has been forbidden
REJECTEDROUTING_FILTER_INVALID_LENGTHThe "to" number doesn't have the valid length
REJECTEDROUTING_PREFIX_FILTER_INVALID_NUMBERThe "to" number doesn't have the valid prefix
REJECTEDTEMPLATE_NOT_FOUNDThe template which has been referenced wasn't found
REJECTEDDESTINATION_ADDRESS_INVALIDThe "to" number doesn't have a valid value. Minimum 9, maximum: 15
REJECTEDOUT_OF_BALANCEThe client is out of balance
REJECTEDGENERAL_ERRORA general error has been encountered

HTTP STATUS 401 Unauthorized

statuserror_messagedescription
REJECTEDCLIENT_DISABLEDThe client is not enabled
REJECTEDPRODUCT_DISABLEDThe product has been disabled
REJECTEDACCOUNT_DISABLEDThe client account has been disabled
REJECTEDCONNECTION_DISABLEDThe client HTTP connection is disabled
REJECTEDIP_NOT_ALLOWEDThe request to the HTTP API has been made from an unauthorized IP
REJECTEDUNAUTHORIZEDThe request was not authorized as the API key is not valid
REJECTEDGENERAL_ERRORA general error has been encountered
Language
Authorization
Header
Click Try It! to start a request and see the response here!