Update Communication Group
curl --request PATCH \
--url https://api.embedreach.com/api/communication-groups/{id} \
--header 'Content-Type: application/json' \
--data '
{
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCompiledHtml": "<string>",
"emailCss": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsMessageBody": "<string>",
"smsChannelSenderId": "<string>",
"textMessageCompanyName": "<string>",
"extraMergeFields": [
{
"id": "<string>",
"type": "static",
"templateName": "<string>",
"displayName": "<string>",
"staticValue": "<string>"
}
],
"textMessageMedia": [
"<string>"
],
"textMessageMediaUrls": [
"<string>"
]
}
'import requests
url = "https://api.embedreach.com/api/communication-groups/{id}"
payload = {
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCompiledHtml": "<string>",
"emailCss": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsMessageBody": "<string>",
"smsChannelSenderId": "<string>",
"textMessageCompanyName": "<string>",
"extraMergeFields": [
{
"id": "<string>",
"type": "static",
"templateName": "<string>",
"displayName": "<string>",
"staticValue": "<string>"
}
],
"textMessageMedia": ["<string>"],
"textMessageMediaUrls": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
emailChannelSenderId: '<string>',
emailHtmlBody: '<string>',
emailCompiledHtml: '<string>',
emailCss: '<string>',
emailTextBody: '<string>',
emailSubject: '<string>',
emailPreviewText: '<string>',
smsMessageBody: '<string>',
smsChannelSenderId: '<string>',
textMessageCompanyName: '<string>',
extraMergeFields: [
{
id: '<string>',
type: 'static',
templateName: '<string>',
displayName: '<string>',
staticValue: '<string>'
}
],
textMessageMedia: ['<string>'],
textMessageMediaUrls: ['<string>']
})
};
fetch('https://api.embedreach.com/api/communication-groups/{id}', 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.embedreach.com/api/communication-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'emailChannelSenderId' => '<string>',
'emailHtmlBody' => '<string>',
'emailCompiledHtml' => '<string>',
'emailCss' => '<string>',
'emailTextBody' => '<string>',
'emailSubject' => '<string>',
'emailPreviewText' => '<string>',
'smsMessageBody' => '<string>',
'smsChannelSenderId' => '<string>',
'textMessageCompanyName' => '<string>',
'extraMergeFields' => [
[
'id' => '<string>',
'type' => 'static',
'templateName' => '<string>',
'displayName' => '<string>',
'staticValue' => '<string>'
]
],
'textMessageMedia' => [
'<string>'
],
'textMessageMediaUrls' => [
'<string>'
]
]),
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.embedreach.com/api/communication-groups/{id}"
payload := strings.NewReader("{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.embedreach.com/api/communication-groups/{id}")
.header("Content-Type", "application/json")
.body("{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.embedreach.com/api/communication-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCss": "<string>",
"emailCompiledHtml": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsChannelSenderId": "<string>",
"smsMessageBody": "<string>",
"textMessageCompanyName": "<string>",
"textMessageMediaUrls": [
"<string>"
]
}
}{
"message": "<string>",
"success": false,
"errors": [
"<string>"
]
}Communication Groups
Update Communication Group
Update a communication group
PATCH
/
api
/
communication-groups
/
{id}
Update Communication Group
curl --request PATCH \
--url https://api.embedreach.com/api/communication-groups/{id} \
--header 'Content-Type: application/json' \
--data '
{
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCompiledHtml": "<string>",
"emailCss": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsMessageBody": "<string>",
"smsChannelSenderId": "<string>",
"textMessageCompanyName": "<string>",
"extraMergeFields": [
{
"id": "<string>",
"type": "static",
"templateName": "<string>",
"displayName": "<string>",
"staticValue": "<string>"
}
],
"textMessageMedia": [
"<string>"
],
"textMessageMediaUrls": [
"<string>"
]
}
'import requests
url = "https://api.embedreach.com/api/communication-groups/{id}"
payload = {
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCompiledHtml": "<string>",
"emailCss": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsMessageBody": "<string>",
"smsChannelSenderId": "<string>",
"textMessageCompanyName": "<string>",
"extraMergeFields": [
{
"id": "<string>",
"type": "static",
"templateName": "<string>",
"displayName": "<string>",
"staticValue": "<string>"
}
],
"textMessageMedia": ["<string>"],
"textMessageMediaUrls": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
emailChannelSenderId: '<string>',
emailHtmlBody: '<string>',
emailCompiledHtml: '<string>',
emailCss: '<string>',
emailTextBody: '<string>',
emailSubject: '<string>',
emailPreviewText: '<string>',
smsMessageBody: '<string>',
smsChannelSenderId: '<string>',
textMessageCompanyName: '<string>',
extraMergeFields: [
{
id: '<string>',
type: 'static',
templateName: '<string>',
displayName: '<string>',
staticValue: '<string>'
}
],
textMessageMedia: ['<string>'],
textMessageMediaUrls: ['<string>']
})
};
fetch('https://api.embedreach.com/api/communication-groups/{id}', 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.embedreach.com/api/communication-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'emailChannelSenderId' => '<string>',
'emailHtmlBody' => '<string>',
'emailCompiledHtml' => '<string>',
'emailCss' => '<string>',
'emailTextBody' => '<string>',
'emailSubject' => '<string>',
'emailPreviewText' => '<string>',
'smsMessageBody' => '<string>',
'smsChannelSenderId' => '<string>',
'textMessageCompanyName' => '<string>',
'extraMergeFields' => [
[
'id' => '<string>',
'type' => 'static',
'templateName' => '<string>',
'displayName' => '<string>',
'staticValue' => '<string>'
]
],
'textMessageMedia' => [
'<string>'
],
'textMessageMediaUrls' => [
'<string>'
]
]),
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.embedreach.com/api/communication-groups/{id}"
payload := strings.NewReader("{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.embedreach.com/api/communication-groups/{id}")
.header("Content-Type", "application/json")
.body("{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.embedreach.com/api/communication-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"emailChannelSenderId\": \"<string>\",\n \"emailHtmlBody\": \"<string>\",\n \"emailCompiledHtml\": \"<string>\",\n \"emailCss\": \"<string>\",\n \"emailTextBody\": \"<string>\",\n \"emailSubject\": \"<string>\",\n \"emailPreviewText\": \"<string>\",\n \"smsMessageBody\": \"<string>\",\n \"smsChannelSenderId\": \"<string>\",\n \"textMessageCompanyName\": \"<string>\",\n \"extraMergeFields\": [\n {\n \"id\": \"<string>\",\n \"type\": \"static\",\n \"templateName\": \"<string>\",\n \"displayName\": \"<string>\",\n \"staticValue\": \"<string>\"\n }\n ],\n \"textMessageMedia\": [\n \"<string>\"\n ],\n \"textMessageMediaUrls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"emailChannelSenderId": "<string>",
"emailHtmlBody": "<string>",
"emailCss": "<string>",
"emailCompiledHtml": "<string>",
"emailTextBody": "<string>",
"emailSubject": "<string>",
"emailPreviewText": "<string>",
"smsChannelSenderId": "<string>",
"smsMessageBody": "<string>",
"textMessageCompanyName": "<string>",
"textMessageMediaUrls": [
"<string>"
]
}
}{
"message": "<string>",
"success": false,
"errors": [
"<string>"
]
}Headers
If using a platform scoped JWT, you can pass in a header to impersonate a specific tenant to impersonate the request as.
Path Parameters
The id of the communication group
Body
application/json
The id of the email channel sender
The html body of the email
The compiled html body of the email
The css body of the email
The text body of the email
The subject of the email
The preview text of the email
The body of the sms message
The id of the sms channel sender
The company name to prefix the text message
The extra merge fields to include in the communication group
- Option 1
- Option 2
Show child attributes
Show child attributes
Base64 encoded png images to include in the text message
The urls of the media to include in the text message
⌘I