Skip to main content
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

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

name
string
required
The display name of the suppression group. Must be between 1 and 200 characters.
description
string
An optional human-readable description of the suppression group.
isActive
boolean
Whether the suppression group is active. Defaults to true if not specified.

Response

Suppression group created successfully
success
boolean
Example: true
data
object
The created suppression group.