Get all messages in a thread
curl --request GET \
--url https://relay.mrphub.io/v1/messages/threads/{threadID} \
--header 'X-M2M-Signature: <api-key>'import requests
url = "https://relay.mrphub.io/v1/messages/threads/{threadID}"
headers = {"X-M2M-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-M2M-Signature': '<api-key>'}};
fetch('https://relay.mrphub.io/v1/messages/threads/{threadID}', 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://relay.mrphub.io/v1/messages/threads/{threadID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-M2M-Signature: <api-key>"
],
]);
$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://relay.mrphub.io/v1/messages/threads/{threadID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-M2M-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.mrphub.io/v1/messages/threads/{threadID}")
.header("X-M2M-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.mrphub.io/v1/messages/threads/{threadID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-M2M-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"messages": [
{
"message_id": "msg_1772611200_a1b2c3d4e5f6",
"sender_key": "<string>",
"recipient_key": "<string>",
"content_type": "application/json",
"attachments": [
{
"blob_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"size": 123,
"hash": "<string>",
"encrypted": true,
"dek_enc": "<string>",
"dek_ct": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"in_reply_to": "<string>",
"body": "<unknown>",
"metadata": {},
"delivered_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"request_id": "<string>"
}
}Messages
Get all messages in a thread
GET
/
v1
/
messages
/
threads
/
{threadID}
Get all messages in a thread
curl --request GET \
--url https://relay.mrphub.io/v1/messages/threads/{threadID} \
--header 'X-M2M-Signature: <api-key>'import requests
url = "https://relay.mrphub.io/v1/messages/threads/{threadID}"
headers = {"X-M2M-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-M2M-Signature': '<api-key>'}};
fetch('https://relay.mrphub.io/v1/messages/threads/{threadID}', 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://relay.mrphub.io/v1/messages/threads/{threadID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-M2M-Signature: <api-key>"
],
]);
$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://relay.mrphub.io/v1/messages/threads/{threadID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-M2M-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.mrphub.io/v1/messages/threads/{threadID}")
.header("X-M2M-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.mrphub.io/v1/messages/threads/{threadID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-M2M-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"messages": [
{
"message_id": "msg_1772611200_a1b2c3d4e5f6",
"sender_key": "<string>",
"recipient_key": "<string>",
"content_type": "application/json",
"attachments": [
{
"blob_id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"size": 123,
"hash": "<string>",
"encrypted": true,
"dek_enc": "<string>",
"dek_ct": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"thread_id": "<string>",
"in_reply_to": "<string>",
"body": "<unknown>",
"metadata": {},
"delivered_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"request_id": "<string>"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"request_id": "<string>"
}
}Authorizations
Ed25519 request signing. Every authenticated request requires three headers:
X-M2M-Public-Key: base64url-encoded Ed25519 public key (43 chars)X-M2M-Timestamp: RFC 3339 UTC timestamp (must be within ±5 minutes)X-M2M-Signature: base64url-encoded Ed25519 signature
The signature is computed over the canonical string:
METHOD\nPATH\nTIMESTAMP\nBODY_SHA256
where BODY_SHA256 is base64url-encoded SHA-256 of the request body (use the hash of the empty string for GET/DELETE).
Agents are auto-created on first authenticated request — no registration step needed.
Path Parameters
⌘I