curl --request POST \
--url https://integration.getmateo.com/api/v1/send_message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"cc": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"bcc": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"content": {},
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": [
"<string>"
],
"reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
"<string>"
],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actions": [
{
"text": "<string>",
"data": "<string>"
}
],
"footer": "<string>"
}
'import requests
url = "https://integration.getmateo.com/api/v1/send_message"
payload = {
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"cc": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"bcc": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"content": {},
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": ["<string>"],
"reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": ["<string>"],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actions": [
{
"text": "<string>",
"data": "<string>"
}
],
"footer": "<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({
from: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
cc: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
bcc: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
subject: '<string>',
html: '<string>',
text: '<string>',
content: {},
send_after: '2023-11-07T05:31:56Z',
placeholder_values: ['<string>'],
reply_to_message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachments: ['<string>'],
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
review_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
marketing_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
actions: [{text: '<string>', data: '<string>'}],
footer: '<string>'
})
};
fetch('https://integration.getmateo.com/api/v1/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://integration.getmateo.com/api/v1/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([
'from' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'cc' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'bcc' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'subject' => '<string>',
'html' => '<string>',
'text' => '<string>',
'content' => [
],
'send_after' => '2023-11-07T05:31:56Z',
'placeholder_values' => [
'<string>'
],
'reply_to_message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachments' => [
'<string>'
],
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'review_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'marketing_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'actions' => [
[
'text' => '<string>',
'data' => '<string>'
]
],
'footer' => '<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://integration.getmateo.com/api/v1/send_message"
payload := strings.NewReader("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<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://integration.getmateo.com/api/v1/send_message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.getmateo.com/api/v1/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 \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"subject": "<string>",
"assignee_id": "<string>",
"unread": true,
"channel_id": "<string>",
"contact_id": "<string>",
"external_id": "<string>",
"is_spam": true,
"inbox_id": "<string>",
"latest_message_id": "<string>",
"latest_inbound_message_id": "<string>",
"latest_message_created_at": "<string>",
"latest_inbound_message_created_at": "<string>",
"tags": [
"<string>"
],
"files": [
{}
]
},
"message": {
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"is_inbound": true,
"subject": "<string>",
"blurb": "<string>",
"author_id": "<string>",
"content": {},
"raw_content": "<string>",
"attachment_count": 123,
"reply_to_message_id": "<string>",
"external_files": {},
"external_id": "<string>",
"template_id": "<string>",
"review_channel_id": "<string>",
"forwarded": true,
"forwarded_message_text": "<string>",
"send_after": "<string>",
"footer": "<string>",
"sendout_id": "<string>",
"campaign_id": "<string>",
"sent_at": "<string>",
"timestamp": "<string>",
"location": {},
"location_metadata": {},
"contacts": {},
"files": {},
"header_media_filename": "<string>"
},
"recipients": [
{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"message_id": "<string>",
"contact_id": "<string>",
"handle": "<string>",
"full_name": "<string>",
"is_organisation": true
}
],
"actions": [
{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"message_id": "<string>",
"text": "<string>",
"data": "<string>",
"clicked": true
}
]
}{
"code": "<string>",
"message": "<string>",
"statusCode": 123,
"hint": "<string>"
}Send Message
Send a message
curl --request POST \
--url https://integration.getmateo.com/api/v1/send_message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"cc": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"bcc": [
{
"handle": "<string>",
"country_codes": [
"<string>"
],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"content": {},
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": [
"<string>"
],
"reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
"<string>"
],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actions": [
{
"text": "<string>",
"data": "<string>"
}
],
"footer": "<string>"
}
'import requests
url = "https://integration.getmateo.com/api/v1/send_message"
payload = {
"from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"cc": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"bcc": [
{
"handle": "<string>",
"country_codes": ["<string>"],
"full_name": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_contact_id": "<string>",
"secondary_external_contact_id": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"content": {},
"send_after": "2023-11-07T05:31:56Z",
"placeholder_values": ["<string>"],
"reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": ["<string>"],
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"review_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"marketing_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actions": [
{
"text": "<string>",
"data": "<string>"
}
],
"footer": "<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({
from: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
conversation_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
cc: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
bcc: [
{
handle: '<string>',
country_codes: ['<string>'],
full_name: '<string>',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_contact_id: '<string>',
secondary_external_contact_id: '<string>'
}
],
subject: '<string>',
html: '<string>',
text: '<string>',
content: {},
send_after: '2023-11-07T05:31:56Z',
placeholder_values: ['<string>'],
reply_to_message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachments: ['<string>'],
template_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
review_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
marketing_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
actions: [{text: '<string>', data: '<string>'}],
footer: '<string>'
})
};
fetch('https://integration.getmateo.com/api/v1/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://integration.getmateo.com/api/v1/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([
'from' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'conversation_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'cc' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'bcc' => [
[
'handle' => '<string>',
'country_codes' => [
'<string>'
],
'full_name' => '<string>',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_contact_id' => '<string>',
'secondary_external_contact_id' => '<string>'
]
],
'subject' => '<string>',
'html' => '<string>',
'text' => '<string>',
'content' => [
],
'send_after' => '2023-11-07T05:31:56Z',
'placeholder_values' => [
'<string>'
],
'reply_to_message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachments' => [
'<string>'
],
'template_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'review_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'marketing_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'actions' => [
[
'text' => '<string>',
'data' => '<string>'
]
],
'footer' => '<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://integration.getmateo.com/api/v1/send_message"
payload := strings.NewReader("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<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://integration.getmateo.com/api/v1/send_message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.getmateo.com/api/v1/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 \"from\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"conversation_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"cc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"bcc\": [\n {\n \"handle\": \"<string>\",\n \"country_codes\": [\n \"<string>\"\n ],\n \"full_name\": \"<string>\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_contact_id\": \"<string>\",\n \"secondary_external_contact_id\": \"<string>\"\n }\n ],\n \"subject\": \"<string>\",\n \"html\": \"<string>\",\n \"text\": \"<string>\",\n \"content\": {},\n \"send_after\": \"2023-11-07T05:31:56Z\",\n \"placeholder_values\": [\n \"<string>\"\n ],\n \"reply_to_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n \"<string>\"\n ],\n \"template_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"review_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"marketing_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"actions\": [\n {\n \"text\": \"<string>\",\n \"data\": \"<string>\"\n }\n ],\n \"footer\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"subject": "<string>",
"assignee_id": "<string>",
"unread": true,
"channel_id": "<string>",
"contact_id": "<string>",
"external_id": "<string>",
"is_spam": true,
"inbox_id": "<string>",
"latest_message_id": "<string>",
"latest_inbound_message_id": "<string>",
"latest_message_created_at": "<string>",
"latest_inbound_message_created_at": "<string>",
"tags": [
"<string>"
],
"files": [
{}
]
},
"message": {
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"is_inbound": true,
"subject": "<string>",
"blurb": "<string>",
"author_id": "<string>",
"content": {},
"raw_content": "<string>",
"attachment_count": 123,
"reply_to_message_id": "<string>",
"external_files": {},
"external_id": "<string>",
"template_id": "<string>",
"review_channel_id": "<string>",
"forwarded": true,
"forwarded_message_text": "<string>",
"send_after": "<string>",
"footer": "<string>",
"sendout_id": "<string>",
"campaign_id": "<string>",
"sent_at": "<string>",
"timestamp": "<string>",
"location": {},
"location_metadata": {},
"contacts": {},
"files": {},
"header_media_filename": "<string>"
},
"recipients": [
{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"message_id": "<string>",
"contact_id": "<string>",
"handle": "<string>",
"full_name": "<string>",
"is_organisation": true
}
],
"actions": [
{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"organisation_id": "<string>",
"conversation_id": "<string>",
"message_id": "<string>",
"text": "<string>",
"data": "<string>",
"clicked": true
}
]
}{
"code": "<string>",
"message": "<string>",
"statusCode": 123,
"hint": "<string>"
}Postal Messages
When sending a postal message, the recipient must contain thecontact_id and no handle. If the contact does not exist yet, make sure to create it first.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Channel ID from which the message will be sent
^([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)$Message ID
^([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)$Conversation ID
^([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)$Conversation Status
open, closed, archived To Recipients of the message
Show child attributes
Show child attributes
CC Recipients of the message
Show child attributes
Show child attributes
BCC Recipients of the message
Show child attributes
Show child attributes
Subject of the message
HTML content of the message
Text content of the message
Content of the message. Only use this if you know what you are doing. Prefer using html or text otherwise
Show child attributes
Show child attributes
Send the message after this time
^(?:(?:\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 for the message
Message ID to which this message is a reply
^([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 URLs to the message. Can either https:// or media_library://
Template ID
^([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
^([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)$Marketing Channel ID
^([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)$Actions for the message, e.g. quick reply buttons
Show child attributes
Show child attributes
Footer text for the message