Usage¶
Messaging usage.
Message History¶
Retrieve a message history for all messages sent and received for your account.
URL: base/Usage/History[&page={page}]
Method: POST
{
"Limit": 10,
"Pagesize": 2,
"DateRange": { "From": "2020-02-04T11:47:33.645773+00:00", "To": "2020-02-06T11:47:33.645773+00:00" },
"Source" : "Source",
"Destination": "Destination",
"Inbound": true,
"MetaData":
[
{ "RequestID": "1234567890DEFED" },
{ "OrgID": 1010 },
{ "Instance": "ETRERT"},
{ "Campaign": 1242 },
{ "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
]
}
Parameters¶
| Name | Type | Description |
|---|---|---|
| Page | Optional (Default: 1) | Used as an optional parameter on the URL, the page of results to request. |
| Limit | Optional (Default: All messages) | The total number of messages to receive. This could be useful if you are not set up to receive the total number for any particular reason. |
| Pagesize | Optional (Default: 10) | The number of messages to return in one batch. |
| DateRange | Optional (Default: all dates) | The start date and finish date that the messages were sent and received. |
| Source | Optional (Default: all sources) | The source of the message. This is also dependent on the inbound flag. |
| Destination | Optional (Default: all destinations) | The destination of the message. This is dependent on the inbound flag. |
| MetaData | Optional (Default: all MetaData) | It is possible to filter on the metadata and any or all of the elements of the metadata. |
Returns¶
{
"Page":1,
"Messages" : [
{
"Source": "12345678901",
"Destination": "12345678901",
"Message": "message",
"Timestamp": "2020-02-04T11:47:33.645773+00:00",
"Inbound" : true,
"Lookup": true,
"Test": false,
"Status": "sent",
"Segments": 1,
"MetaData":
[
{ "RequestID": "1234567890DEFED" },
{ "OrgID": 1010 },
{ "Instance": "ETRERT"},
{ "Campaign": 1242 },
{ "TimeStamp": "2020-02-04T11:47:33.645773+00:00" }
],
"MessageID": "MS1312312312323",
"Carrier": "EE",
"Reachable": true,
"NumberType": "Mobile"
},
...
]
}