curl --request POST \
--url https://api.birdeye.com/resources/v1/messenger/export \
--header 'Content-Type: application/json' \
--data '
{
"businessNumber": "755009344",
"apiKey": "abcdefgh",
"startDate": "04/06/2020",
"endDate": "05/30/2020",
"offset": "0",
"size": "100",
"contact": {
"phone": "(650)492-3456",
"email": "abc@test.com"
},
"excludeCampaignMessages": 1
}
'import requests
url = "https://api.birdeye.com/resources/v1/messenger/export"
payload = {
"businessNumber": "755009344",
"apiKey": "abcdefgh",
"startDate": "04/06/2020",
"endDate": "05/30/2020",
"offset": "0",
"size": "100",
"contact": {
"phone": "(650)492-3456",
"email": "abc@test.com"
},
"excludeCampaignMessages": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessNumber: '755009344',
apiKey: 'abcdefgh',
startDate: '04/06/2020',
endDate: '05/30/2020',
offset: '0',
size: '100',
contact: {phone: '(650)492-3456', email: 'abc@test.com'},
excludeCampaignMessages: 1
})
};
fetch('https://api.birdeye.com/resources/v1/messenger/export', 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.birdeye.com/resources/v1/messenger/export",
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([
'businessNumber' => '755009344',
'apiKey' => 'abcdefgh',
'startDate' => '04/06/2020',
'endDate' => '05/30/2020',
'offset' => '0',
'size' => '100',
'contact' => [
'phone' => '(650)492-3456',
'email' => 'abc@test.com'
],
'excludeCampaignMessages' => 1
]),
CURLOPT_HTTPHEADER => [
"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://api.birdeye.com/resources/v1/messenger/export"
payload := strings.NewReader("{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.birdeye.com/resources/v1/messenger/export")
.header("Content-Type", "application/json")
.body("{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/messenger/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}"
response = http.request(request)
puts response.read_body{
"totalConversations": 1,
"totalMessages": 2,
"conversations": [
{
"id": 127490,
"contact": {
"id": 80768826,
"name": "S G",
"firstName": "S",
"lastName": "G",
"phone": "(650) 492-3456",
"emailId": null,
"createdDate": "2020-05-04 17:20:14",
"updatedDate": "2020-05-18 15:22:57",
"team": "Harshit",
"locationId": 155911960965004
},
"messages": [
{
"sentAt": 1588612840000,
"id": "124776",
"text": "hi",
"message_date": "May 04, 2020 10:20 AM PDT",
"attachments": null,
"direction": "SEND",
"channel": "SMS"
},
{
"sentAt": 1588612814000,
"id": "124775",
"text": "Hello",
"message_date": "May 04, 2020 10:20 AM PDT",
"attachments": null,
"direction": "RECEIVE",
"channel": "LIVE_CHAT"
}
],
"conversation_start_date": "May 04, 2020 10:20 AM PDT",
"last_message_received_on": "May 04, 2020 10:20 AM PDT",
"status": "OPEN",
"last_used_channel": "SMS",
"assigned_to": {
"id": -100000,
"name": "",
"type": "T",
"emailId": null
}
}
],
"hasMore": false
}{
"code": 1246,
"message": "Customer email or phone number is required."
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}List Conversations
List Conversations retrieves conversations for a business.
curl --request POST \
--url https://api.birdeye.com/resources/v1/messenger/export \
--header 'Content-Type: application/json' \
--data '
{
"businessNumber": "755009344",
"apiKey": "abcdefgh",
"startDate": "04/06/2020",
"endDate": "05/30/2020",
"offset": "0",
"size": "100",
"contact": {
"phone": "(650)492-3456",
"email": "abc@test.com"
},
"excludeCampaignMessages": 1
}
'import requests
url = "https://api.birdeye.com/resources/v1/messenger/export"
payload = {
"businessNumber": "755009344",
"apiKey": "abcdefgh",
"startDate": "04/06/2020",
"endDate": "05/30/2020",
"offset": "0",
"size": "100",
"contact": {
"phone": "(650)492-3456",
"email": "abc@test.com"
},
"excludeCampaignMessages": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
businessNumber: '755009344',
apiKey: 'abcdefgh',
startDate: '04/06/2020',
endDate: '05/30/2020',
offset: '0',
size: '100',
contact: {phone: '(650)492-3456', email: 'abc@test.com'},
excludeCampaignMessages: 1
})
};
fetch('https://api.birdeye.com/resources/v1/messenger/export', 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.birdeye.com/resources/v1/messenger/export",
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([
'businessNumber' => '755009344',
'apiKey' => 'abcdefgh',
'startDate' => '04/06/2020',
'endDate' => '05/30/2020',
'offset' => '0',
'size' => '100',
'contact' => [
'phone' => '(650)492-3456',
'email' => 'abc@test.com'
],
'excludeCampaignMessages' => 1
]),
CURLOPT_HTTPHEADER => [
"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://api.birdeye.com/resources/v1/messenger/export"
payload := strings.NewReader("{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.birdeye.com/resources/v1/messenger/export")
.header("Content-Type", "application/json")
.body("{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/messenger/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessNumber\": \"755009344\",\n \"apiKey\": \"abcdefgh\",\n \"startDate\": \"04/06/2020\",\n \"endDate\": \"05/30/2020\",\n \"offset\": \"0\",\n \"size\": \"100\",\n \"contact\": {\n \"phone\": \"(650)492-3456\",\n \"email\": \"abc@test.com\"\n },\n \"excludeCampaignMessages\": 1\n}"
response = http.request(request)
puts response.read_body{
"totalConversations": 1,
"totalMessages": 2,
"conversations": [
{
"id": 127490,
"contact": {
"id": 80768826,
"name": "S G",
"firstName": "S",
"lastName": "G",
"phone": "(650) 492-3456",
"emailId": null,
"createdDate": "2020-05-04 17:20:14",
"updatedDate": "2020-05-18 15:22:57",
"team": "Harshit",
"locationId": 155911960965004
},
"messages": [
{
"sentAt": 1588612840000,
"id": "124776",
"text": "hi",
"message_date": "May 04, 2020 10:20 AM PDT",
"attachments": null,
"direction": "SEND",
"channel": "SMS"
},
{
"sentAt": 1588612814000,
"id": "124775",
"text": "Hello",
"message_date": "May 04, 2020 10:20 AM PDT",
"attachments": null,
"direction": "RECEIVE",
"channel": "LIVE_CHAT"
}
],
"conversation_start_date": "May 04, 2020 10:20 AM PDT",
"last_message_received_on": "May 04, 2020 10:20 AM PDT",
"status": "OPEN",
"last_used_channel": "SMS",
"assigned_to": {
"id": -100000,
"name": "",
"type": "T",
"emailId": null
}
}
],
"hasMore": false
}{
"code": 1246,
"message": "Customer email or phone number is required."
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Headers
Preferred response media type.
Media type of the JSON request body.
Body
The business number for which the details to be fetched, it can be either enterprise or location business number.
Partner specific API key provided by Birdeye for data exchange.
Start fetching messages from this date in MM/DD/YYYY format.
Fetch messages till this date in MM/DD/YYYY format.
Message offset,the start index.
Number of messages return in the response.
Contact details
Show child attributes
Show child attributes
If passed with value 1, It will exclude campaign messages from API response.
Response
OK
The number of total conversation objects that can be retrieved through pagination.
The number of total message objects that can be retrieved through pagination.
List of conversations.
Show child attributes
Show child attributes
Indicates if there are more conversations.