1. Home
  2. Docs
  3. ​IVR​ ​integration​

​IVR​ ​integration​

Instaply makes it very easy for your organization to integrate our texting software into your existing infrastructure.

While each integration can be a bit unique, here is a basic overview of how the IVR integration work:

 

Instaply​ ​IVR​ ​integration​ ​documentation

Your organization will need to modify your IVR code to call the Instaply API. Once the IVR is pointed to the Instaply API, this will trigger the sending of a welcome SMS message to the caller.

The following API endpoint should be called using the GET HTTP Method:

https://hooks.instaply.com/v1/ivr?key=[ORG_KEY]&from=[CUSTOMER_PHONE]&to=[BUSINESS_PHONE] Where:

● ORG_KEY: the key we provided you for your customer organization (ask us when you need a new key)

● CUSTOMER_PHONE: the caller phone number (E.164 format)

● BUSINESS_PHONE: the provided business phone number on Instaply (E.164 format)

API call example:

https://hooks.instaply.com/v1/ivr?key=a73d5034210f702515128ac61193cd21&from=%2B14151234560&to=%2B14151234567

POST​ ​HTTP​ ​method​ ​is​ ​also​ ​available:

Inside the body you need to provide JSON with following fields:

{“key”:”[ORG_KEY]”,”from”:”[CUSTOMER_PHONE]”,”to”:”[BUSINESS_PHONE]”}

Example

curl -XPOST "https://hooks.instaply.com/v1/ivr" \
-H 'Content-Type: application/json' -d'
{
    "key": "[ORG_KEY]",
    "from": "[CUSTOMER_PHONE]",
    "to": "[BUSINESS_PHONE]" 
}
'

Response

HTTP Response Code | Response

Request successful: Response code 200, Response text depending on internal Instaply setup.

200 OK | <Response><Dial>[FWD_BUSINESS_PHONE]</Dial></Response>

200 OK | <Response><Say language=”en”>Sorry, this store did not define voice call forwarding</Say><Say language=”fr”>Désolé, ce magasin n’a pas défini de numéro vocal</Say></Response>

 

Request fail because the “to” phone number is not linked to any store at Instaply

200 OK | <Response><Say language=”en”>Sorry, this number is not linked to any store</Say><Say language=”fr”>Désolé, ce numéro n’est lié à aucun magasin</Say></Response>

 

Request fail because invalid API Key

403 Forbidden | {“key”: “Invalid API Key”}

 

Request fail because missing parameters

400 Bad Request | {“query”: [  {

      “message”: “is missing and not optional”,

      “property”: “@.to”

    }

]

TCPA​ ​Compliance:

We always have to keep in mind that the organization must have the express consent of the caller before sending a SMS. Our solution to obtaining consent, is to prompt the caller to input their mobile number, to trigger the SMS.