Send a private reply to a fetched Meta comment
curl --request POST \
--url https://api.bundle.social/api/v1/conversations/private-reply \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"teamId": "<string>",
"fetchedCommentId": "<string>",
"content": {
"text": "<string>",
"attachments": [
{
"url": "<string>",
"externalId": "<string>",
"mimeType": "<string>",
"name": "<string>",
"captionTrackUrl": "<string>",
"captionLanguage": "<string>",
"captionLabel": "<string>"
}
]
}
}
'import requests
url = "https://api.bundle.social/api/v1/conversations/private-reply"
payload = {
"teamId": "<string>",
"fetchedCommentId": "<string>",
"content": {
"text": "<string>",
"attachments": [
{
"url": "<string>",
"externalId": "<string>",
"mimeType": "<string>",
"name": "<string>",
"captionTrackUrl": "<string>",
"captionLanguage": "<string>",
"captionLabel": "<string>"
}
]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: '<string>',
fetchedCommentId: '<string>',
content: {
text: '<string>',
attachments: [
{
url: '<string>',
externalId: '<string>',
mimeType: '<string>',
name: '<string>',
captionTrackUrl: '<string>',
captionLanguage: '<string>',
captionLabel: '<string>'
}
]
}
})
};
fetch('https://api.bundle.social/api/v1/conversations/private-reply', 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.bundle.social/api/v1/conversations/private-reply",
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([
'teamId' => '<string>',
'fetchedCommentId' => '<string>',
'content' => [
'text' => '<string>',
'attachments' => [
[
'url' => '<string>',
'externalId' => '<string>',
'mimeType' => '<string>',
'name' => '<string>',
'captionTrackUrl' => '<string>',
'captionLanguage' => '<string>',
'captionLabel' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bundle.social/api/v1/conversations/private-reply"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.bundle.social/api/v1/conversations/private-reply")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bundle.social/api/v1/conversations/private-reply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"teamId": "<string>",
"socialAccountId": "<string>",
"platform": "INSTAGRAM",
"externalParticipantId": "<string>",
"status": "OPEN",
"lastActivityAt": "2023-11-07T05:31:56Z",
"unreadCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalConversationId": "<string>",
"participantUsername": "<string>",
"participantDisplayName": "<string>",
"participantAvatarUrl": "<string>",
"lastMessageAt": "2023-11-07T05:31:56Z",
"lastMessagePreview": "<string>",
"lastReadAt": "2023-11-07T05:31:56Z",
"platformSeenAt": "2023-11-07T05:31:56Z",
"platformData": {},
"socialAccount": {
"id": "<string>",
"type": "TIKTOK",
"teamId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"username": "<string>",
"displayName": "<string>",
"bio": "<string>",
"avatarUrl": "<string>",
"externalId": "<string>",
"providerPageId": "<string>",
"userUsername": "<string>",
"userDisplayName": "<string>",
"userEmail": "<string>",
"userId": "<string>",
"channels": [
{
"id": "<string>",
"name": "<string>",
"username": "<string>",
"address": "<string>",
"avatarUrl": "<string>",
"webhook": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>",
"url": "<string>"
},
"metadata": {
"allowImages": true,
"allowVideos": true,
"allowGalleries": true,
"linkFlairEnabled": true,
"facebookPageId": "<string>"
}
}
],
"mastodonServerId": "<string>",
"instagramConnectionMethod": "FACEBOOK",
"twitterSubType": "none",
"isTiktokBusinessAccount": true,
"disconnectedCheckTryAt": "2023-11-07T05:31:56Z",
"deleteOn": "2023-11-07T05:31:56Z",
"messagingStatus": "DISABLED",
"messagingStatusUpdatedAt": "2023-11-07T05:31:56Z",
"messagingLastError": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
}
},
"message": {
"id": "<string>",
"conversationId": "<string>",
"teamId": "<string>",
"socialAccountId": "<string>",
"platform": "INSTAGRAM",
"direction": "INBOUND",
"status": "PENDING",
"source": "PRIVATE_REPLY",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalMessageId": "<string>",
"text": "<string>",
"attachments": [],
"sentAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"seenAt": "2023-11-07T05:31:56Z",
"replyTo": {
"externalMessageId": "<string>",
"isSelfReply": true,
"messageId": "<string>"
},
"privateReplyContext": {
"fetchedCommentId": "<string>",
"externalCommentId": "<string>",
"text": "<string>",
"authorName": "<string>",
"authorAvatarUrl": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"postId": "<string>",
"externalPostId": "<string>",
"postPermalink": "<string>",
"postThumbnailUrl": "<string>"
},
"platformData": {}
},
"conflict": false
}{
"message": "<string>",
"statusCode": 123,
"issues": [
{
"message": "<string>",
"code": "invalid_type",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}conversation
Send a private reply to a fetched Meta comment
Send a direct message in reply to a Facebook or Instagram comment we have already imported. Creates the conversation when none exists yet. Returns 503 while messaging sending is temporarily disabled.
POST
/
api
/
v1
/
conversations
/
private-reply
Send a private reply to a fetched Meta comment
curl --request POST \
--url https://api.bundle.social/api/v1/conversations/private-reply \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"teamId": "<string>",
"fetchedCommentId": "<string>",
"content": {
"text": "<string>",
"attachments": [
{
"url": "<string>",
"externalId": "<string>",
"mimeType": "<string>",
"name": "<string>",
"captionTrackUrl": "<string>",
"captionLanguage": "<string>",
"captionLabel": "<string>"
}
]
}
}
'import requests
url = "https://api.bundle.social/api/v1/conversations/private-reply"
payload = {
"teamId": "<string>",
"fetchedCommentId": "<string>",
"content": {
"text": "<string>",
"attachments": [
{
"url": "<string>",
"externalId": "<string>",
"mimeType": "<string>",
"name": "<string>",
"captionTrackUrl": "<string>",
"captionLanguage": "<string>",
"captionLabel": "<string>"
}
]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: '<string>',
fetchedCommentId: '<string>',
content: {
text: '<string>',
attachments: [
{
url: '<string>',
externalId: '<string>',
mimeType: '<string>',
name: '<string>',
captionTrackUrl: '<string>',
captionLanguage: '<string>',
captionLabel: '<string>'
}
]
}
})
};
fetch('https://api.bundle.social/api/v1/conversations/private-reply', 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.bundle.social/api/v1/conversations/private-reply",
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([
'teamId' => '<string>',
'fetchedCommentId' => '<string>',
'content' => [
'text' => '<string>',
'attachments' => [
[
'url' => '<string>',
'externalId' => '<string>',
'mimeType' => '<string>',
'name' => '<string>',
'captionTrackUrl' => '<string>',
'captionLanguage' => '<string>',
'captionLabel' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bundle.social/api/v1/conversations/private-reply"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.bundle.social/api/v1/conversations/private-reply")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bundle.social/api/v1/conversations/private-reply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"<string>\",\n \"fetchedCommentId\": \"<string>\",\n \"content\": {\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"externalId\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"name\": \"<string>\",\n \"captionTrackUrl\": \"<string>\",\n \"captionLanguage\": \"<string>\",\n \"captionLabel\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"teamId": "<string>",
"socialAccountId": "<string>",
"platform": "INSTAGRAM",
"externalParticipantId": "<string>",
"status": "OPEN",
"lastActivityAt": "2023-11-07T05:31:56Z",
"unreadCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalConversationId": "<string>",
"participantUsername": "<string>",
"participantDisplayName": "<string>",
"participantAvatarUrl": "<string>",
"lastMessageAt": "2023-11-07T05:31:56Z",
"lastMessagePreview": "<string>",
"lastReadAt": "2023-11-07T05:31:56Z",
"platformSeenAt": "2023-11-07T05:31:56Z",
"platformData": {},
"socialAccount": {
"id": "<string>",
"type": "TIKTOK",
"teamId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"username": "<string>",
"displayName": "<string>",
"bio": "<string>",
"avatarUrl": "<string>",
"externalId": "<string>",
"providerPageId": "<string>",
"userUsername": "<string>",
"userDisplayName": "<string>",
"userEmail": "<string>",
"userId": "<string>",
"channels": [
{
"id": "<string>",
"name": "<string>",
"username": "<string>",
"address": "<string>",
"avatarUrl": "<string>",
"webhook": {
"id": "<string>",
"name": "<string>",
"avatar": "<string>",
"url": "<string>"
},
"metadata": {
"allowImages": true,
"allowVideos": true,
"allowGalleries": true,
"linkFlairEnabled": true,
"facebookPageId": "<string>"
}
}
],
"mastodonServerId": "<string>",
"instagramConnectionMethod": "FACEBOOK",
"twitterSubType": "none",
"isTiktokBusinessAccount": true,
"disconnectedCheckTryAt": "2023-11-07T05:31:56Z",
"deleteOn": "2023-11-07T05:31:56Z",
"messagingStatus": "DISABLED",
"messagingStatusUpdatedAt": "2023-11-07T05:31:56Z",
"messagingLastError": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
}
},
"message": {
"id": "<string>",
"conversationId": "<string>",
"teamId": "<string>",
"socialAccountId": "<string>",
"platform": "INSTAGRAM",
"direction": "INBOUND",
"status": "PENDING",
"source": "PRIVATE_REPLY",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"externalMessageId": "<string>",
"text": "<string>",
"attachments": [],
"sentAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"seenAt": "2023-11-07T05:31:56Z",
"replyTo": {
"externalMessageId": "<string>",
"isSelfReply": true,
"messageId": "<string>"
},
"privateReplyContext": {
"fetchedCommentId": "<string>",
"externalCommentId": "<string>",
"text": "<string>",
"authorName": "<string>",
"authorAvatarUrl": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"postId": "<string>",
"externalPostId": "<string>",
"postPermalink": "<string>",
"postThumbnailUrl": "<string>"
},
"platformData": {}
},
"conflict": false
}{
"message": "<string>",
"statusCode": 123,
"issues": [
{
"message": "<string>",
"code": "invalid_type",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}{
"message": "<string>",
"statusCode": 123
}Was this page helpful?