Send a direct message
curl --request POST \
--url https://posttu.com/api/v1/inbox/send-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "TWITTER",
"channelId": "ch_abc123",
"messageData": {
"text": "Hello!"
},
"chatId": "chat_xyz789",
"recipientId": "recipient_abc123",
"skipFollowUpCancellation": false
}
'import requests
url = "https://posttu.com/api/v1/inbox/send-message"
payload = {
"platform": "TWITTER",
"channelId": "ch_abc123",
"messageData": { "text": "Hello!" },
"chatId": "chat_xyz789",
"recipientId": "recipient_abc123",
"skipFollowUpCancellation": False
}
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({
platform: 'TWITTER',
channelId: 'ch_abc123',
messageData: {text: 'Hello!'},
chatId: 'chat_xyz789',
recipientId: 'recipient_abc123',
skipFollowUpCancellation: false
})
};
fetch('https://posttu.com/api/v1/inbox/send-message', 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/inbox/send-message",
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([
'platform' => 'TWITTER',
'channelId' => 'ch_abc123',
'messageData' => [
'text' => 'Hello!'
],
'chatId' => 'chat_xyz789',
'recipientId' => 'recipient_abc123',
'skipFollowUpCancellation' => false
]),
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/inbox/send-message"
payload := strings.NewReader("{\n \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\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/inbox/send-message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/inbox/send-message")
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 \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"messageId": "msg_abc123",
"platform": "TWITTER",
"timestamp": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"error": "<string>"
}Messages
Send a message
Send a direct message in an existing conversation.
POST
/
api
/
v1
/
inbox
/
send-message
Send a direct message
curl --request POST \
--url https://posttu.com/api/v1/inbox/send-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "TWITTER",
"channelId": "ch_abc123",
"messageData": {
"text": "Hello!"
},
"chatId": "chat_xyz789",
"recipientId": "recipient_abc123",
"skipFollowUpCancellation": false
}
'import requests
url = "https://posttu.com/api/v1/inbox/send-message"
payload = {
"platform": "TWITTER",
"channelId": "ch_abc123",
"messageData": { "text": "Hello!" },
"chatId": "chat_xyz789",
"recipientId": "recipient_abc123",
"skipFollowUpCancellation": False
}
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({
platform: 'TWITTER',
channelId: 'ch_abc123',
messageData: {text: 'Hello!'},
chatId: 'chat_xyz789',
recipientId: 'recipient_abc123',
skipFollowUpCancellation: false
})
};
fetch('https://posttu.com/api/v1/inbox/send-message', 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/inbox/send-message",
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([
'platform' => 'TWITTER',
'channelId' => 'ch_abc123',
'messageData' => [
'text' => 'Hello!'
],
'chatId' => 'chat_xyz789',
'recipientId' => 'recipient_abc123',
'skipFollowUpCancellation' => false
]),
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/inbox/send-message"
payload := strings.NewReader("{\n \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\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/inbox/send-message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/inbox/send-message")
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 \"platform\": \"TWITTER\",\n \"channelId\": \"ch_abc123\",\n \"messageData\": {\n \"text\": \"Hello!\"\n },\n \"chatId\": \"chat_xyz789\",\n \"recipientId\": \"recipient_abc123\",\n \"skipFollowUpCancellation\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"messageId": "msg_abc123",
"platform": "TWITTER",
"timestamp": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Last modified on April 4, 2026

