Messages
Get all messages in a thread
List a Message and its replies.
GET
/
v1
/
messages
/
{messageId}
/
thread
Get all messages in a thread
curl --request GET \
--url https://api.relayapp.im/v1/messages/{messageId}/thread \
--header 'Authorization: Bearer <token>'{
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_from_me": true,
"delivery_status": "sent",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_system_message": true,
"from": "<string>",
"from_handle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"parts": [
{
"type": "text",
"value": "<string>",
"reactions": [
{
"is_me": true,
"handle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"type": "love",
"custom_emoji": "<string>"
}
],
"mentions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"is_me": true,
"range": [
1
]
}
],
"mention": "<string>",
"mention_range": "<array>"
}
],
"reply_to": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"part_index": 1
},
"thread": {
"originator_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originator_part_index": 1
},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"unsent_at": "2023-11-07T05:31:56Z",
"silent": true,
"deliveries": [
{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z"
}
],
"system_event": {
"type": "chat_created",
"actor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"kind": "user"
},
"subject": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"kind": "user"
},
"value": "<string>",
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_card": {
"first_name": "<string>",
"last_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"is_active": true,
"handle": "<string>",
"kind": "user"
}
}
}
],
"next_cursor": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Authorizations
Bearer token authentication. Include your API token in the Authorization header.
Format: Authorization: Bearer <your-token>
Path Parameters
ID of any message in the thread (can be originator or any reply)
Query Parameters
Pagination cursor from previous next_cursor response
Maximum number of messages to return
Required range:
1 <= x <= 100Sort order for messages (asc = oldest first, desc = newest first)
Available options:
asc, desc ⌘I
Get all messages in a thread
curl --request GET \
--url https://api.relayapp.im/v1/messages/{messageId}/thread \
--header 'Authorization: Bearer <token>'{
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_from_me": true,
"delivery_status": "sent",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_system_message": true,
"from": "<string>",
"from_handle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"parts": [
{
"type": "text",
"value": "<string>",
"reactions": [
{
"is_me": true,
"handle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"type": "love",
"custom_emoji": "<string>"
}
],
"mentions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"is_me": true,
"range": [
1
]
}
],
"mention": "<string>",
"mention_range": "<array>"
}
],
"reply_to": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"part_index": 1
},
"thread": {
"originator_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"originator_part_index": 1
},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"unsent_at": "2023-11-07T05:31:56Z",
"silent": true,
"deliveries": [
{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"kind": "user",
"display_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"about": "<string>",
"verified": true,
"is_contact": true,
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true
},
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z"
}
],
"system_event": {
"type": "chat_created",
"actor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"kind": "user"
},
"subject": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"kind": "user"
},
"value": "<string>",
"icon_attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_card": {
"first_name": "<string>",
"last_name": "<string>",
"image_url": "<string>",
"image_color": "<string>",
"is_active": true,
"handle": "<string>",
"kind": "user"
}
}
}
],
"next_cursor": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}
