Send Broadcast Message
curl --request POST \
--url https://integration.getmateo.com/api/v1/send_broadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": "<string>",
"require_marketing_opt_in": true,
"to_recipients": [
{
"contact_id": "<string>",
"full_name": "<string>",
"handle": "<string>",
"placeholder_values": [
"<string>"
],
"contact_external_id": "<string>",
"contact_secondary_external_id": "<string>"
}
],
"to_segments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": [
"<string>"
],
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://integration.getmateo.com/api/v1/send_broadcast"
payload = {
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": "<string>",
"require_marketing_opt_in": True,
"to_recipients": [
{
"contact_id": "<string>",
"full_name": "<string>",
"handle": "<string>",
"placeholder_values": ["<string>"],
"contact_external_id": "<string>",
"contact_secondary_external_id": "<string>"
}
],
"to_segments": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": ["<string>"],
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
from: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachment: '<string>',
require_marketing_opt_in: true,
to_recipients: [
{
contact_id: '<string>',
full_name: '<string>',
handle: '<string>',
placeholder_values: ['<string>'],
contact_external_id: '<string>',
contact_secondary_external_id: '<string>'
}
],
to_segments: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
send_after: '2023-11-07T05:31:56Z',
placeholder_values: ['<string>'],
marketing_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
review_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://integration.getmateo.com/api/v1/send_broadcast', 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://integration.getmateo.com/api/v1/send_broadcast",
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([
'from' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachment' => '<string>',
'require_marketing_opt_in' => true,
'to_recipients' => [
[
'contact_id' => '<string>',
'full_name' => '<string>',
'handle' => '<string>',
'placeholder_values' => [
'<string>'
],
'contact_external_id' => '<string>',
'contact_secondary_external_id' => '<string>'
]
],
'to_segments' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'send_after' => '2023-11-07T05:31:56Z',
'placeholder_values' => [
'<string>'
],
'marketing_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'review_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://integration.getmateo.com/api/v1/send_broadcast"
payload := strings.NewReader("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://integration.getmateo.com/api/v1/send_broadcast")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.getmateo.com/api/v1/send_broadcast")
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 \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"sendout_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"message": "<string>",
"statusCode": 123,
"hint": "<string>"
}Send Broadcast
Send Broadcast Message
Send a Broadcast message to a list of recipients and / or segments
Send Broadcast Message
curl --request POST \
--url https://integration.getmateo.com/api/v1/send_broadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": "<string>",
"require_marketing_opt_in": true,
"to_recipients": [
{
"contact_id": "<string>",
"full_name": "<string>",
"handle": "<string>",
"placeholder_values": [
"<string>"
],
"contact_external_id": "<string>",
"contact_secondary_external_id": "<string>"
}
],
"to_segments": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": [
"<string>"
],
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://integration.getmateo.com/api/v1/send_broadcast"
payload = {
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachment": "<string>",
"require_marketing_opt_in": True,
"to_recipients": [
{
"contact_id": "<string>",
"full_name": "<string>",
"handle": "<string>",
"placeholder_values": ["<string>"],
"contact_external_id": "<string>",
"contact_secondary_external_id": "<string>"
}
],
"to_segments": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": ["<string>"],
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
from: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachment: '<string>',
require_marketing_opt_in: true,
to_recipients: [
{
contact_id: '<string>',
full_name: '<string>',
handle: '<string>',
placeholder_values: ['<string>'],
contact_external_id: '<string>',
contact_secondary_external_id: '<string>'
}
],
to_segments: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
send_after: '2023-11-07T05:31:56Z',
placeholder_values: ['<string>'],
marketing_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
review_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://integration.getmateo.com/api/v1/send_broadcast', 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://integration.getmateo.com/api/v1/send_broadcast",
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([
'from' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachment' => '<string>',
'require_marketing_opt_in' => true,
'to_recipients' => [
[
'contact_id' => '<string>',
'full_name' => '<string>',
'handle' => '<string>',
'placeholder_values' => [
'<string>'
],
'contact_external_id' => '<string>',
'contact_secondary_external_id' => '<string>'
]
],
'to_segments' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'send_after' => '2023-11-07T05:31:56Z',
'placeholder_values' => [
'<string>'
],
'marketing_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'review_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://integration.getmateo.com/api/v1/send_broadcast"
payload := strings.NewReader("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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://integration.getmateo.com/api/v1/send_broadcast")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.getmateo.com/api/v1/send_broadcast")
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 \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachment\": \"<string>\",\n \"require_marketing_opt_in\": true,\n \"to_recipients\": [\n {\n \"contact_id\": \"<string>\",\n \"full_name\": \"<string>\",\n \"handle\": \"<string>\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"contact_external_id\": \"<string>\",\n \"contact_secondary_external_id\": \"<string>\"\n }\n ],\n \"to_segments\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"sendout_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"message": "<string>",
"statusCode": 123,
"hint": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The channel the broadcast is sent from
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The template to use for the broadcast
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Attachment URL. Can either https:// or media_library://
Whether the recipients must have opted in to marketing messages
The list of recipients to send the broadcast to
Show child attributes
Show child attributes
The list of segments to send the broadcast to
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The time to send the broadcast after
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Placeholder values
Marketing Channel ID
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Review Channel ID
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
The broadcast was sent successfully
The ID of the sendout that has been sent
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$⌘I