Inbox¶
The Inbox resource allows you to:
- Collect a user’s inbox via GET
Collecting the Inbox¶
To get the inbox for a user you make a GET request to the Inbox resource:
https://api.sendhub.com/v1/inbox/?username=USERNAME&api_key=APIKEY
If your request is accepted you’ll get a 200 Ok status and a data response similar to this:
{
"meta": {
"limit": 20,
"next": null,
"offset": 0,
"previous": null,
"total_count": 2
},
"objects": [
{
"contacts": [
{
"id": 1111,
"name": "John Doe"
}
],
"groups": [
{
"id": 1000,
"name": "demo"
}
{
"id": 1001,
"name": "customers"
}
],
"resource_uri": "/api/v1/threads/26/",
"sent": "2012-02-17T21:39:22.978898",
"text": "Testing multiple recipients",
"unread": null
}
{
"contacts": [
{
"id": 1111,
"name": "John Doe"
}
],
"groups": [],
"resource_uri": "/api/v1/threads/25/",
"sent": "2012-02-17T20:36:36.639968",
"text": "Testing",
"unread": null
}
]
}
Available Fields:
All fields in the Inbox resource are read only.
Name | Explanation |
---|---|
limit | The number of messages displayed on a page. |
next | The path to the next page of the inbox, if available. |
offset | The starting message for the current page. |
previous | The path to the previous page of the inbox, if available. |
total_count | The total number of threads in the inbox. |
objects | The list of threads in the inbox. The full thread of a conversation is available via ‘resource_uri’. |