> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autosend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Unsuppress Emails

> Remove multiple email addresses from a suppression group in bulk using the AutoSend API.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.autosend.com/v1/suppression-groups/emails/unsuppress' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "emails": ["user@example.com"],
      "groupId": "AB12C3"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.autosend.com/v1/suppression-groups/emails/unsuppress",
      headers={
          "Authorization": "Bearer <token>",
          "Content-Type": "application/json",
      },
      json={
          "emails": ["user@example.com"],
          "groupId": "AB12C3",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.autosend.com/v1/suppression-groups/emails/unsuppress",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer <token>",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        emails: ["user@example.com"],
        groupId: "AB12C3",
      }),
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://api.autosend.com/v1/suppression-groups/emails/unsuppress");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
      "emails"  => ["user@example.com"],
      "groupId" => "AB12C3",
  ]));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "Authorization: Bearer <token>",
      "Content-Type: application/json",
  ]);
  $response = curl_exec($ch);
  curl_close($ch);
  echo $response;
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io"
      "net/http"
  )

  func main() {
      payload, _ := json.Marshal(map[string]interface{}{
          "emails":  []string{"user@example.com"},
          "groupId": "AB12C3",
      })

      req, _ := http.NewRequest("POST", "https://api.autosend.com/v1/suppression-groups/emails/unsuppress", 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))
  }
  ```

  ```java Java theme={null}
  import java.net.URI;
  import java.net.http.*;

  public class Main {
      public static void main(String[] args) throws Exception {
          String body = """
              {
                "emails": ["user@example.com"],
                "groupId": "AB12C3"
              }
              """;

          HttpRequest request = HttpRequest.newBuilder()
              .uri(URI.create("https://api.autosend.com/v1/suppression-groups/emails/unsuppress"))
              .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());
      }
  }
  ```

  ```ruby Ruby theme={null}
  require "net/http"
  require "uri"
  require "json"

  uri = URI("https://api.autosend.com/v1/suppression-groups/emails/unsuppress")
  req = Net::HTTP::Post.new(uri)
  req["Authorization"] = "Bearer <token>"
  req["Content-Type"] = "application/json"
  req.body = {
    emails:  ["user@example.com"],
    groupId: "AB12C3",
  }.to_json

  response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
  puts response.body
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "unsuppressed": 1
    }
  }
  ```
</ResponseExample>

### Authorizations

<ParamField path="Authorizations" type="string | header" required>
  Bearer authentication header of the form Bearer `<token>`, where `<token>` is your auth token.
</ParamField>

#### Body

<ParamField body="emails" type="string[]">
  An array of email addresses to remove from suppression.
</ParamField>

<ParamField body="groupId" type="string">
  Scopes the removal to a specific suppression group. When omitted, matching entries are removed from all groups.
</ParamField>

<ParamField body="isGlobal" type="boolean">
  When `true`, removes entries from the global suppression list rather than a project-specific group.
</ParamField>
