API Integration/Webhooks

Advanced Users

App Portal>Menu>Automatic>API

SEND API

API Key: Your_API_Key_Found_Here

SEND API URL:  https://api.smsgatez.com/index.php/SendApi

Params (method GET/POST):

  • apiKeyYour_API_Key (required)
  • from: Your Gatez phone number or ‘rotatePhoneNumbers’ to use smart rotator (required)
  • to: receiver phone number (required)
  • message: the body (required)
  • showInbox: {true|false} default is false

Example:

Gatez Phone
https://api.smsgatez.com/index.php/SendApi?apiKey=Your_API_Key&from=%2B12223334444&to=%2B15556667777&message=Hello%20How%20are%20you

rotatePhoneNumbers
https://api.smsgatez.com/index.php/SendApi?apiKey=Your_API_Key&from=rotatePhoneNumbers&to=%2B15556667777&message=Hello%20How%20are%20you

The response is in JSON format: {“status”:”success|fail”,”reason”:”ERROR_DETAILS”,”from”:”FROM_PHONE”,”to”:”TO_PHONE”,”message”:”MESSAGE”}

Post back delivery receipt URL:  the URL you want to receive delivery receipt

Method: GET or POST

SMSGatez will post back to the URL you have input with these params: from, to, and status={DELIVERED, SENT, FAILED, DELIVERABLE, UNDELIVERED, REJECTED, QUEUED}

ALWAYS SAVE YOUR CHANGES BY CLICKING ON UPDATE!

CONTACT API

Add Contact API URL:  https://api.smsgatez.com/index.php/ContactController/createContact

Params (method GET/POST):

  • apiKey: Your_API_Key (required)
  • group: group name (required)
  • phone: phone number of the contact
  • email: email of the contact
  • firstname: first name
  • lastname: last name
  • address: address
  • city: city
  • state: state
  • zip: zip code
  • country: country (default US)
  • optedIn: true|false (default false)

Example:
https://api.smsgatez.com/index.php/ContactController/createContact?apiKey=Your_API_Key&phone=%2B12223334444&group=Test_Group&optedIn=true

The response is in JSON format: {“status”:”success|fail”,”reason”:”ERROR_DETAILS”}

WEBHOOKS

Syntax:
<your_url.com><?|&><EXT_PHONE_NUMBER_PARAM_NAME>=[SG_PHONE_NUMBER]&<EXT_VIRTUAL_NUMBER_PARAM_NAME>=[SG_VIRTUAL_NUMBER]&<EXT_FIRST_NAME_PARAM_NAME>=[SG_FIRST_NAME]&<EXT_LAST_NAME_PARAM_NAME>=[SG_LAST_NAME]&<EXT_MESSAGE_PARAM_NAME>=[SG_MESSAGE]&<EXT_TIMESTAMP_PARAM_NAME>=[SG_TIMESTAMP]&<EXT_ADDRESS_PARAM_NAME>=[SG_ADDRESS]&<EXT_CITY_PARAM_NAME>=[SG_CITY]&<EXT_STATE_PARAM_NAME>=[SG_STATE]&<EXT_ZIP_PARAM_NAME>=[SG_ZIP]&<EXT_CARRIER_PARAM_NAME>=[SG_CARRIER]&<EXT_EMAIL_PARAM_NAME>=[SG_EMAIL]

  • Replace <EXT_…> with your API params/info, update <?|&>, don’t change [SG_…] params.
  • SG_PHONE_NUMBER: the recipient phone number(don’t change).
  • SG_VIRTUAL_NUMBER: the virtual number that receives the incoming message.
  • First name, last name, EXT_VIRTUAL_NUMBER and message are optional.

Important: Global webhook will be overwritten by auto reply webhook!

INCOMING WEBHOOKS

Incoming Webhooks can be found under Automatic>Replies

Incoming Webhook

GLOBAL WEBHOOKS

Global Webhooks are found under Settings>Advanced Settings

Advance Setting