Suppression Groups
Create Suppression Group
Create a new suppression group for managing email opt-outs by category using the AutoSend API.
POST
/
suppression-groups
curl --request POST \
--url 'https://api.autosend.com/v1/suppression-groups' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}'
import requests
response = requests.post(
"https://api.autosend.com/v1/suppression-groups",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
},
)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/suppression-groups",
{
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}),
}
);
const data = await response.json();
console.log(data);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.autosend.com/v1/suppression-groups");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"name" => "Marketing Unsubscribes",
"description" => "Users who opted out of marketing",
"isActive" => true,
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/suppression-groups", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/suppression-groups"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI("https://api.autosend.com/v1/suppression-groups")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer <token>"
req["Content-Type"] = "application/json"
req.body = {
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts response.body
{
"success": true,
"data": {
"id": "6a0c49ef6ae88a19f5a01cb1",
"groupId": "GEHYB",
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isGlobal": false,
"isActive": true,
"createdAt": "2026-05-19T11:30:55.935Z",
"updatedAt": "2026-05-19T11:30:55.935Z",
"suppressionCount": 0
}
}
curl --request POST \
--url 'https://api.autosend.com/v1/suppression-groups' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}'
import requests
response = requests.post(
"https://api.autosend.com/v1/suppression-groups",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
},
)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/suppression-groups",
{
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}),
}
);
const data = await response.json();
console.log(data);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.autosend.com/v1/suppression-groups");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"name" => "Marketing Unsubscribes",
"description" => "Users who opted out of marketing",
"isActive" => true,
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/suppression-groups", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/suppression-groups"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI("https://api.autosend.com/v1/suppression-groups")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer <token>"
req["Content-Type"] = "application/json"
req.body = {
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts response.body
{
"success": true,
"data": {
"id": "6a0c49ef6ae88a19f5a01cb1",
"groupId": "GEHYB",
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isGlobal": false,
"isActive": true,
"createdAt": "2026-05-19T11:30:55.935Z",
"updatedAt": "2026-05-19T11:30:55.935Z",
"suppressionCount": 0
}
}
Authorizations
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Body
The display name of the suppression group. Must be between 1 and 200 characters.
An optional human-readable description of the suppression group.
Whether the suppression group is active. Defaults to
true if not specified.Response
Suppression group created successfullyExample:
trueThe created suppression group.
Show child attributes
Show child attributes
Unique identifier for the suppression group.
Short code identifier used when referencing the group in campaigns and templates.Example:
"GEHYB"Display name of the suppression group.
Optional description of the suppression group.
Whether this is a global suppression group.
Whether the suppression group is active.
Number of email addresses currently suppressed in this group.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Related topics
Was this page helpful?
⌘I
curl --request POST \
--url 'https://api.autosend.com/v1/suppression-groups' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}'
import requests
response = requests.post(
"https://api.autosend.com/v1/suppression-groups",
headers={
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
},
json={
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
},
)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/suppression-groups",
{
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}),
}
);
const data = await response.json();
console.log(data);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.autosend.com/v1/suppression-groups");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"name" => "Marketing Unsubscribes",
"description" => "Users who opted out of marketing",
"isActive" => true,
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true,
})
req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/suppression-groups", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isActive": true
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/suppression-groups"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
require "json"
uri = URI("https://api.autosend.com/v1/suppression-groups")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer <token>"
req["Content-Type"] = "application/json"
req.body = {
name: "Marketing Unsubscribes",
description: "Users who opted out of marketing",
isActive: true,
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts response.body
{
"success": true,
"data": {
"id": "6a0c49ef6ae88a19f5a01cb1",
"groupId": "GEHYB",
"name": "Marketing Unsubscribes",
"description": "Users who opted out of marketing",
"isGlobal": false,
"isActive": true,
"createdAt": "2026-05-19T11:30:55.935Z",
"updatedAt": "2026-05-19T11:30:55.935Z",
"suppressionCount": 0
}
}