api:sms:list
Table of Contents
API : Sms List
Introduction
This request will return a list of all the SMS/MMS messages sent by a customer.
The result set will always be reversed sorted (the newest messages first).
Request
| URL | https://api.telecomx.dk/sms | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER or MANAGER (cannot see content of messages), OWNER. RESELLER - can only see content of own messages. ADMIN. |
|
| Query | offset | [optional] Index of first message to return, default 0. |
| limit | [optional] Number of messages to return, default 100, max 1000. |
|
| customer | Id of customer the messages belongs to (RESELLER or ADMIN), auto-set for VIEWER, MANAGER and OWNER, defaults to self for RESELLER and ADMIN if not set. | |
| to | Number the messages was sent to, E.164 format. | |
Query examples
https://api.telecomx.dk/sms https://api.telecomx.dk/sms?customer=123457890ABCDEF12345678 https://api.telecomx.dk/sms?customer=123457890ABCDEF12345678&to=+4581808888 https://api.telecomx.dk/sms?offset=100&limit=100
Response
| JSON object | ||
|---|---|---|
| offset | Integer | Index of first message returned. |
| limit | Integer | Number of messages to return, actual count may be lower. |
| total | Integer | Total number of messages in result set. |
| messages | Array | Array of SMS/MMS messages, see below. |
| SMS/MMS message (JSON object) | ||
|---|---|---|
| _id | Id | Id |
| customer | Id | Id of customer. |
| type | String | Type of message: 'SMS' or 'MMS'. |
| message | String | The SMS message (max. 1Kb) or the MMS raw data (max. 512Kb). |
| from | String | Sender name or number (max 11 chars). |
| to | Array | List of phone numbers of the recipients, E.164 format |
| sent | Date | The date and time the message was sent, null if not yet sent. |
Note that properties holding no value may be omitted.
Response example
{ offset: 0, limit: 100, total: 10000, messages: [ { _id: '123457890ABCDEF12345678', customer: '123457890ABCDEF12345678', type: 'SMS', message: 'This is a test', from: 'Voicemail', to: ['+4581808888'], sent: '2014-01-01T12:34:56.789Z' }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | bad_request | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sms/list.txt · Last modified: 2022/08/02 13:54 by Per Møller