Create communication group
curl --request POST \
--url https://api.ecomailhub.younegotiate.com/communications/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pending Members",
"creditor_profile_state": "all_pending_members",
"send_to": "company_email_only"
}
'import requests
url = "https://api.ecomailhub.younegotiate.com/communications/groups"
payload = {
"name": "Pending Members",
"creditor_profile_state": "all_pending_members",
"send_to": "company_email_only"
}
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({
name: 'Pending Members',
creditor_profile_state: 'all_pending_members',
send_to: 'company_email_only'
})
};
fetch('https://api.ecomailhub.younegotiate.com/communications/groups', 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.ecomailhub.younegotiate.com/communications/groups",
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([
'name' => 'Pending Members',
'creditor_profile_state' => 'all_pending_members',
'send_to' => 'company_email_only'
]),
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://api.ecomailhub.younegotiate.com/communications/groups"
payload := strings.NewReader("{\n \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\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://api.ecomailhub.younegotiate.com/communications/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ecomailhub.younegotiate.com/communications/groups")
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 \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Group created.",
"data": {
"id": 21,
"name": "Pending Members",
"creditor_profile_state": {
"value": "all_pending_members",
"label": "All Pending Members"
},
"send_to": {
"value": "company_email_only",
"label": "Company email only"
},
"created_at": "2026-07-05T12:00:00.000000Z",
"updated_at": "2026-07-05T12:00:00.000000Z"
}
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
}Create communication group
Create an EcoMail Hub communication group for dynamic creditor profile targeting.
POST
/
communications
/
groups
Create communication group
curl --request POST \
--url https://api.ecomailhub.younegotiate.com/communications/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pending Members",
"creditor_profile_state": "all_pending_members",
"send_to": "company_email_only"
}
'import requests
url = "https://api.ecomailhub.younegotiate.com/communications/groups"
payload = {
"name": "Pending Members",
"creditor_profile_state": "all_pending_members",
"send_to": "company_email_only"
}
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({
name: 'Pending Members',
creditor_profile_state: 'all_pending_members',
send_to: 'company_email_only'
})
};
fetch('https://api.ecomailhub.younegotiate.com/communications/groups', 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.ecomailhub.younegotiate.com/communications/groups",
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([
'name' => 'Pending Members',
'creditor_profile_state' => 'all_pending_members',
'send_to' => 'company_email_only'
]),
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://api.ecomailhub.younegotiate.com/communications/groups"
payload := strings.NewReader("{\n \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\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://api.ecomailhub.younegotiate.com/communications/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ecomailhub.younegotiate.com/communications/groups")
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 \"name\": \"Pending Members\",\n \"creditor_profile_state\": \"all_pending_members\",\n \"send_to\": \"company_email_only\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Group created.",
"data": {
"id": 21,
"name": "Pending Members",
"creditor_profile_state": {
"value": "all_pending_members",
"label": "All Pending Members"
},
"send_to": {
"value": "company_email_only",
"label": "Company email only"
},
"created_at": "2026-07-05T12:00:00.000000Z",
"updated_at": "2026-07-05T12:00:00.000000Z"
}
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Maximum string length:
255Example:
"Active Members"
Available options:
all_active_members, active_members_with_pending_notice_responses, all_pending_members, pending_members_with_pending_notice_responses, all_yn_prospects, yn_prospects_with_pending_notice_responses, all_consumer_prospects, consumer_prospects_with_pending_notice_responses, all_profiles_with_yn_closed_offer, all_profiles_with_yn_closed_offer_balances Example:
"all_active_members"
Available options:
company_email_only, contact_emails_only, company_and_contact_emails Example:
"company_email_only"
Last modified on July 19, 2026
Was this page helpful?
⌘I

