Webhooks

General Info

The endpoints has 15 seconds to accept the event. If a success HTTP status code has not been returned within these 15 seconds, the event will be discarded.

Authentication

The webhooks authenticate against the endpoints using API key authentication:

POST /xdr
Host: www.example.com
Content-Type: application/json
Authorization: OUR-API-KEY

The webhooks is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

XDR

Sample of Voice Data Record:

{ "time":         "2018-01-01 01:23:45",
  "type":         "voice",
  "operation":    "finalize",
  "billid":       "1234567890-1234",
  "direction":    "incoming",
  "error":        null,
  "status":       "answered",
  "caller":       "4512345678",
  "called":       "4587654321",
  "duration":     "30",
  "billtime":     "20",
  "ringtime":     "10",
  "imsi":         "238731234567890",
  "country_code": "dk" }

Sample of SMS Data Record:

{ "time":         "2018-01-01 01:23:45",
  "type":         "sms",
  "billid":       "1234567890-1234",
  "direction":    "incoming",
  "error":        null,
  "to":           "4512345678",
  "from":         "4587654321",
  "retries":      "0",
  "imsi":         "238731234567890",
  "country_code": "dk" }

Sample of Data Data Record (yes, we know it’s a pleonasm):

{ "time":         "2018-01-01 01:23:45",
  "type":         "data",
  "operation":    "finalize",
  "billid":       "1234567890-1234",
  "download":     "0",
  "upload":       "0",
  "imsi":         "238731234567890",
  "country_code": "dk" }

Country Change Approval

Sample of Country Change:

{ "time":                  "2018-01-01 01:23:45",
  "imsi":                  "238731234567890",
  "imei":                  "1234567890987654",
  "type":                  "GSM",
  "country_code":          "dk",
  "country_code_previous": "de" }

Country Change

Sample of Country Change:

{ "time":                  "2018-01-01 01:23:45",
  "imsi":                  "238731234567890",
  "imei":                  "1234567890987654",
  "type":                  "GSM",
  "country_code":          "dk",
  "country_code_previous": "de" }

Receive SMS

Sample of incoming SMS:

{ "time":         "2018-01-01 01:23:45",
  "billid":       "1234567890-1234",
  "to":           "4512345678",
  "from":         "4587654321",
  "text":         "Hello, World!",
  "imsi":         "238731234567890",
  "country_code": "dk" }