Query messages
Queries messages within the given project.
Note: To be notified of new incoming messages as they are received, use the Webhook API.
Request
- Base URL: https://api.telerivet.com
- URL: https://api.telerivet.com/v1/projects/{project_id}/messages
- Auth: one of:
- HTTP basic
- OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)
Path parameters
ID of the Project
Query parameters
ID of Label
Filter messages with a label
Filter messages by direction
Filter messages by message_type
Filter messages by source
Filter messages by starred/unstarred
Filter messages by status
Unix timestamp in seconds
Filter messages created on or after a particular time
Unix timestamp in seconds
Filter messages created before a particular time
Filter messages by ID from an external provider
ID of Contact
ID of the contact who sent/received the message
ID of Phone
ID of the phone (basic route) that sent/received the message
ID of Broadcast
ID of the broadcast containing the message
ID of ScheduledMessage
ID of the scheduled message that created this message
ID of Group
Filter messages sent or received by contacts in a particular group. The group must be a normal group, not a dynamic group.
Sort the results based on a field
Sort the results in ascending or descending order
Number of results returned per page (max 500)
Number of items to skip from beginning of result set
'next_marker' property returned by a previous call to this API method, indicating where the next page of results should start.
If true, the API will return the count of items matching the filter, instead of the items themselves
Response
Successful response. When count=1 parameter is provided, returns {"count": N} instead.
Example response
{
"data": [
{
"id": "SM1629708e59c5c781",
"direction": "outgoing",
"status": "sent",
"message_type": "sms",
"source": "service",
"time_created": 1390347812,
"time_sent": 1390347814,
"time_updated": 1390347818,
"from_number": "+16505550001",
"to_number": "+16505550123",
"content": "Thank you for registering!",
"starred": true,
"priority": 1,
"send_attempts": 1,
"external_id": "142092393",
"num_parts": 1,
"price": 0.01,
"price_currency": "USD",
"service_id": "SV3d246818d0e3d1fb",
"phone_id": "PN4d246818d0ecd1fa",
"contact_id": "CTa1299c3d0e371023",
"route_id": "RT2a586298d3412adf",
"broadcast_id": "MB98918598dab29800",
"scheduled_id": "SEa502e6f9d23f1cb6",
"user_id": "URba3e403e98f49735",
"project_id": "PJ2ad0100821a98bea",
"url": "https://telerivet.com/p/asdf/message/SM1629708e59c5c781"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.