Events and Report

Introduction

Events are our way of letting you know when something happens on your account. When an event occurs, we create an Event object.

Verifying events

It is important to verify that an event originated from Termii. You can verify an event by validating the signature, a valid event is raised with an header X-Termii-Signature which is a HMAC SHA512 signature of the event payload signed with your secret key.

Outbound Message

An outbound message is a message routed from a client or an application and delivered to the end user's mobile phone. You can receive the outbound message status update reports directly in your application using Termii's Webhook Notiifcation. Add your webhook url in your termii developer console

Request Type : POST

Content-Type : application/json

OptionsDescription
typestring
Represents the type of message that is sent
idstring
Represents the ID of the request sent
message_idstring
Represents the ID of the message sent
receiverstring
Represents the destination phone number
senderstring
Represents a sender ID for sms or Device ID for Whatsapp which can be Alphanumeric
messagestring
Text of a message that would be sent to the destination phone number
sent_atstring
Represents the time the message was sent
coststring
Represent amount charged for the message sent
statusstring
Represents the status of the message sent.v A message can have any of the following states; DELIVERED | Message delivered to handset, DND Active on Phone Number, Message Failed
channelstring
This is the route through which the message is sent. It is either dnd, whatsapp, or generic

Device offline Notification

You can receive your device offline notification update directly in your application using Termii's Webhook Notiifcation. Add your webhook url in your termii developer console

Request Type : POST

Content-Type : application/json

OptionsDescription
typestring
Represents the type of request that is sent
statusstring
Represents the current status of the device
device_idstring
Represents the ID of the device
namestring
Represents the name of the device
{  
   "type":"device_status",
   "status":"disconnected",
   "device_id":"e0c5a9b-0136-4751-9be9-a3c9zzTc0a19",
   "name":"TermiiWh"
}           
Updated at, Tuesday, April 27, 2021