curl --request GET \
--url https://api.relayapp.im/v1/messages/{messageId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.relayapp.im/v1/messages/{messageId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.relayapp.im/v1/messages/{messageId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.relayapp.im/v1/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.relayapp.im/v1/messages/{messageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.relayapp.im/v1/messages/{messageId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.relayapp.im/v1/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"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",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"type": "love",
"custom_emoji": "<string>"
}
],
"mention": "<string>",
"mention_range": "<array>"
}
],
"reply_to": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"part_index": 1
},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"deliveries": [
{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"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>",
"is_active": true,
"handle": "<string>",
"kind": "user"
}
}
}{
"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>"
}{
"error": {
"status": 123,
"code": 123,
"message": "<string>",
"doc_url": "<string>",
"retry_after": 123
},
"success": true,
"trace_id": "<string>"
}Get a message by ID
Retrieve one visible Message.
curl --request GET \
--url https://api.relayapp.im/v1/messages/{messageId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.relayapp.im/v1/messages/{messageId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.relayapp.im/v1/messages/{messageId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.relayapp.im/v1/messages/{messageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.relayapp.im/v1/messages/{messageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.relayapp.im/v1/messages/{messageId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.relayapp.im/v1/messages/{messageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"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",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"type": "love",
"custom_emoji": "<string>"
}
],
"mention": "<string>",
"mention_range": "<array>"
}
],
"reply_to": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"part_index": 1
},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"deliveries": [
{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handle": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"status": "active",
"left_at": "2023-11-07T05:31:56Z",
"is_me": true,
"kind": "user",
"display_name": "<string>",
"avatar_url": "<string>"
},
"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>",
"is_active": true,
"handle": "<string>",
"kind": "user"
}
}
}{
"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>"
}{
"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
Unique identifier of the message to retrieve
Response
Message found and returned successfully
Unique identifier for the message
ID of the chat this message belongs to
Whether this message was sent by the authenticated user
Current delivery status of a message
sent, delivered, read When the message was created
When the message was last updated
Whether this timeline item is a visible Chat event.
Sender Relay Handle.
The sender of this message as a full handle object
Show child attributes
Show child attributes
Message parts in order (text, media, and link)
A text message part
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Indicates this message is a threaded reply to another message
Show child attributes
Show child attributes
When the message was sent
When the message was delivered
When the message was read
Per-recipient Delivered and Read truth for direct and group Chats. Relay derives this because it controls every recipient endpoint.
Show child attributes
Show child attributes
Show child attributes
Show child attributes

