List X conversation messages
curl --request POST \
--url https://posttu.com/api/v1/twitter/conversations/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channelId": "ch_tw123",
"chatId": "<string>",
"paginationToken": "<string>"
}
'import requests
url = "https://posttu.com/api/v1/twitter/conversations/messages"
payload = {
"channelId": "ch_tw123",
"chatId": "<string>",
"paginationToken": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({channelId: 'ch_tw123', chatId: '<string>', paginationToken: '<string>'})
};
fetch('https://posttu.com/api/v1/twitter/conversations/messages', 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://posttu.com/api/v1/twitter/conversations/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => 'ch_tw123',
'chatId' => '<string>',
'paginationToken' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://posttu.com/api/v1/twitter/conversations/messages"
payload := strings.NewReader("{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posttu.com/api/v1/twitter/conversations/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/twitter/conversations/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"data": {
"data": [
{
"id": "<string>",
"text": "<string>",
"created_at": "<string>",
"sender_id": "<string>",
"dm_conversation_id": "<string>",
"participant_ids": [
"<string>"
],
"attachments": {
"media_keys": [
"<string>"
]
}
}
],
"includes": {
"media": [
{}
],
"users": [
{
"id": "<string>",
"name": "<string>",
"username": "<string>",
"created_at": "<string>",
"description": "<string>",
"profile_image_url": "<string>",
"url": "<string>",
"verified": true,
"protected": true,
"public_metrics": {
"followers_count": 123,
"following_count": 123,
"tweet_count": 123,
"listed_count": 123,
"like_count": 123
}
}
],
"tweets": [
{
"id": "<string>",
"text": "<string>",
"author_id": "<string>",
"created_at": "<string>",
"attachments": {
"media_keys": [
"<string>"
],
"poll_ids": [
"<string>"
]
},
"public_metrics": {
"retweet_count": 123,
"reply_count": 123,
"like_count": 123,
"quote_count": 123,
"impression_count": 123
},
"organic_metrics": {},
"entities": {}
}
]
},
"meta": {
"result_count": 123,
"next_token": "<string>",
"previous_token": "<string>"
}
},
"unifiedMessages": [
{}
],
"message": "<string>",
"status": 123
},
"success": true
}
}{
"error": "<string>"
}Messaging
List X conversation messages
Lists messages in a direct-message conversation, paginated via Posttu’s Twitter REST API (POST /api/v1/twitter/conversations/messages) and MCP server.
POST
/
api
/
v1
/
twitter
/
conversations
/
messages
List X conversation messages
curl --request POST \
--url https://posttu.com/api/v1/twitter/conversations/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channelId": "ch_tw123",
"chatId": "<string>",
"paginationToken": "<string>"
}
'import requests
url = "https://posttu.com/api/v1/twitter/conversations/messages"
payload = {
"channelId": "ch_tw123",
"chatId": "<string>",
"paginationToken": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({channelId: 'ch_tw123', chatId: '<string>', paginationToken: '<string>'})
};
fetch('https://posttu.com/api/v1/twitter/conversations/messages', 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://posttu.com/api/v1/twitter/conversations/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => 'ch_tw123',
'chatId' => '<string>',
'paginationToken' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://posttu.com/api/v1/twitter/conversations/messages"
payload := strings.NewReader("{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posttu.com/api/v1/twitter/conversations/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/twitter/conversations/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"channelId\": \"ch_tw123\",\n \"chatId\": \"<string>\",\n \"paginationToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"data": {
"data": [
{
"id": "<string>",
"text": "<string>",
"created_at": "<string>",
"sender_id": "<string>",
"dm_conversation_id": "<string>",
"participant_ids": [
"<string>"
],
"attachments": {
"media_keys": [
"<string>"
]
}
}
],
"includes": {
"media": [
{}
],
"users": [
{
"id": "<string>",
"name": "<string>",
"username": "<string>",
"created_at": "<string>",
"description": "<string>",
"profile_image_url": "<string>",
"url": "<string>",
"verified": true,
"protected": true,
"public_metrics": {
"followers_count": 123,
"following_count": 123,
"tweet_count": 123,
"listed_count": 123,
"like_count": 123
}
}
],
"tweets": [
{
"id": "<string>",
"text": "<string>",
"author_id": "<string>",
"created_at": "<string>",
"attachments": {
"media_keys": [
"<string>"
],
"poll_ids": [
"<string>"
]
},
"public_metrics": {
"retweet_count": 123,
"reply_count": 123,
"like_count": 123,
"quote_count": 123,
"impression_count": 123
},
"organic_metrics": {},
"entities": {}
}
]
},
"meta": {
"result_count": 123,
"next_token": "<string>",
"previous_token": "<string>"
}
},
"unifiedMessages": [
{}
],
"message": "<string>",
"status": 123
},
"success": true
}
}{
"error": "<string>"
}Looking for a unified API across all platforms? Posttu also provides a centralized Inbox API (
/api/v1/inbox/*) supporting comments, direct messages, replies, likes, and moderation in a single endpoint.Authorizations
Body
application/json
Last modified on November 23, 2026

