MessageWithHistory
Fields
idstringRequiredThe message ID:
msg_followed by 26 characters.- Matches ^msg_[0-9A-HJKMNP-TV-Z]{26}$
objectstringRequiredAlways
message.- Always message
amountstringor nullRequiredWhat you were charged: the segments times
unit_price, never more thanheld_amount.nulluntil the message is sent;0.0000when it was rejected, failed or cancelled.- Matches ^\d+\.\d{4}$
bodystringRequiredThe message text, exactly as sent.
campaign_idstringor nullRequiredThe campaign the message belongs to, for messages sent from the dashboard.
- Matches ^cmp_[0-9A-HJKMNP-TV-Z]{26}$
channelstringRequiredAlways
sms.- One of: sms
client_referencestringor nullRequiredYour own reference for the message, as you sent it.
completed_atstring (date-time)or nullRequiredWhen the message reached its current final status;
nullbefore that.created_atstring (date-time)RequiredWhen the message was accepted.
currencystringRequiredAlways
NGN. Amounts are strings with four decimal places.- Always NGN
directionstringRequiredAlways
outbound.- One of: outbound
encodingstringRequiredgsm7, orucs2when the body has a character outside the GSM 7-bit alphabet, such as the naira sign.- One of: gsm7, ucs2
Why the message was rejected, failed, cancelled, undelivered or expired; otherwise
null.fromstringRequiredThe sender ID the message is sent from.
held_amountstringRequiredThe most this message can cost, held from your balance when it was accepted;
0.0000for a rejected message.- Matches ^\d+\.\d{4}$
modestringRequiredlivefor a live key. Alwayslivetoday: test keys are not available yet.- One of: live, test
scheduled_atstring (date-time)or nullRequiredThe
send_attime you asked for;nullwhen you sent it straight away.segmentsintegerRequiredHow many SMS parts the body takes, from 1 to 10. Prices are per segment.
- At least 1
sent_atstring (date-time)or nullRequiredWhen a route accepted the message;
nullbefore that.sourcestringRequiredHow the message was sent:
api,campaign,quick_sendortest_send.- One of: api, campaign, quick_send, test_send
statusstringRequiredWhere the message is now.
scheduled,queuedandsentare in progress.delivered,undelivered,expired,rejected,failedandcancelledare final, andcompleted_atis set when the message reaches one. A late delivery receipt can still move anundeliveredorexpiredmessage todelivered, and anexpiredone toundelivered.- One of: scheduled, queued, sent, delivered, undelivered, expired, rejected, failed, cancelled
tostringRequiredThe recipient in E.164 format; the value you sent when it could not be read.
unit_pricestringor nullRequiredThe price per segment of the route that carried the message;
nulluntil it is sent.- Matches ^\d+\.\d{4}$
updated_atstring (date-time)RequiredWhen the message last changed.
Every status the message has had, oldest first.