curl --request POST \
--url https://inboxapp.com/api/v1/threads/{threadId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"replyToMessageId": "<string>"
}
'import requests
url = "https://inboxapp.com/api/v1/threads/{threadId}/messages"
payload = {
"content": "<string>",
"replyToMessageId": "<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({content: '<string>', replyToMessageId: '<string>'})
};
fetch('https://inboxapp.com/api/v1/threads/{threadId}/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://inboxapp.com/api/v1/threads/{threadId}/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([
'content' => '<string>',
'replyToMessageId' => '<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://inboxapp.com/api/v1/threads/{threadId}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"replyToMessageId\": \"<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://inboxapp.com/api/v1/threads/{threadId}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"replyToMessageId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inboxapp.com/api/v1/threads/{threadId}/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 \"content\": \"<string>\",\n \"replyToMessageId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"platform": "twitter",
"teamId": "df6jbw4h36...",
"threadId": "df6jbw4h36...",
"id": "df6jbw4h36...",
"userId": "df6jbw4h36...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"platformId": "1234567890",
"content": "Hey, I'm reaching out from Acme Agency...",
"campaignId": "df6jbw4h36...",
"authorId": "df6jbw4h36...",
"origin": "internal",
"replyData": "<unknown>",
"forwardData": "<unknown>",
"entities": "<unknown>",
"attachment": "<unknown>",
"reactions": [
"<unknown>"
],
"isEncrypted": true,
"isEdited": true,
"failed": true,
"deletedAt": "2023-11-07T05:31:56Z",
"platformDeletedAt": "2023-11-07T05:31:56Z"
}Send message
Send a message in a thread
curl --request POST \
--url https://inboxapp.com/api/v1/threads/{threadId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"replyToMessageId": "<string>"
}
'import requests
url = "https://inboxapp.com/api/v1/threads/{threadId}/messages"
payload = {
"content": "<string>",
"replyToMessageId": "<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({content: '<string>', replyToMessageId: '<string>'})
};
fetch('https://inboxapp.com/api/v1/threads/{threadId}/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://inboxapp.com/api/v1/threads/{threadId}/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([
'content' => '<string>',
'replyToMessageId' => '<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://inboxapp.com/api/v1/threads/{threadId}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"replyToMessageId\": \"<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://inboxapp.com/api/v1/threads/{threadId}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"replyToMessageId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inboxapp.com/api/v1/threads/{threadId}/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 \"content\": \"<string>\",\n \"replyToMessageId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"platform": "twitter",
"teamId": "df6jbw4h36...",
"threadId": "df6jbw4h36...",
"id": "df6jbw4h36...",
"userId": "df6jbw4h36...",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"platformId": "1234567890",
"content": "Hey, I'm reaching out from Acme Agency...",
"campaignId": "df6jbw4h36...",
"authorId": "df6jbw4h36...",
"origin": "internal",
"replyData": "<unknown>",
"forwardData": "<unknown>",
"entities": "<unknown>",
"attachment": "<unknown>",
"reactions": [
"<unknown>"
],
"isEncrypted": true,
"isEdited": true,
"failed": true,
"deletedAt": "2023-11-07T05:31:56Z",
"platformDeletedAt": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
^[0-9a-z]+$Body
Response
OK
The platform the message was sent from.
twitter "twitter"
^[0-9a-z]+$"df6jbw4h36..."
^[0-9a-z]+$"df6jbw4h36..."
The Inbox ID of the message.
^[0-9a-z]+$"df6jbw4h36..."
The Inboxapp user who sent this message if applicable.
^[0-9a-z]+$"df6jbw4h36..."
"1234567890"
"Hey, I'm reaching out from Acme Agency..."
The Inbox campaign ID that sent this message if applicable.
^[0-9a-z]+$"df6jbw4h36..."
Will either be the accountLinkId or the externalId of the thread. May be a cuid2 or a legacy external ID.
"df6jbw4h36..."
The origin of the message. 'internal' means send from a user on Inboxapp, 'external' means synced from Twitter, 'api' means sent via the API.
internal, external, api "internal"
The reply data of the message if applicable.
The forward data of the message if applicable.
Normalized URL entities, mentions, hashtags, tweet shares.
Normalized media and card attachments.
Normalized reactions.
Whether the message is end-to-end encrypted.
Whether the message has been edited.
Whether the message failed to send / was never received by the platform.
When the message was soft-deleted in Inboxapp.
When the message was deleted on the platform.
Was this page helpful?