Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Remove Suppression

DELETE

/

suppressions

/

:suppression

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.suppressions.remove(
  'e169aa45-1ecf-4183-9955-b1499d5701d3', // or: 'steve.wozniak@example.com'
);
PHP
$resend = Resend::client('re_xxxxxxxxx');

// Remove by suppression id
$resend->suppressions->remove(
  'e169aa45-1ecf-4183-9955-b1499d5701d3'
);

// Remove by email
$resend->suppressions->remove(
  'steve.wozniak@example.com'
);
Python
import resend

resend.api_key = "re_xxxxxxxxx"

# Remove by suppression id
resend.Suppressions.remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

# Remove by email
resend.Suppressions.remove("steve.wozniak@example.com")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

# Remove by suppression id
Resend::Suppressions.remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

# Remove by email
Resend::Suppressions.remove("steve.wozniak@example.com")
Go
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	// Remove by suppression id
	client.Suppressions.Remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

	// Remove by email
	client.Suppressions.Remove("steve.wozniak@example.com")
}
Rust
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  // Remove by suppression id
  let _data = resend
    .suppressions
    .remove("e169aa45-1ecf-4183-9955-b1499d5701d3")
    .await?;

  // Remove by email
  let _data = resend
    .suppressions
    .remove("steve.wozniak@example.com")
    .await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        // Remove by suppression id
        resend.suppressions().remove("e169aa45-1ecf-4183-9955-b1499d5701d3");

        // Remove by email
        resend.suppressions().remove("steve.wozniak@example.com");
    }
}
.NET
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" );

// Remove by suppression id
await resend.SuppressionRemoveAsync( "e169aa45-1ecf-4183-9955-b1499d5701d3" );

// Remove by email
await resend.SuppressionRemoveAsync( "steve.wozniak@example.com" );
cURL
# Remove by suppression id
curl -X DELETE 'https://api.resend.com/suppressions/e169aa45-1ecf-4183-9955-b1499d5701d3' \
     -H 'Authorization: Bearer re_xxxxxxxxx'

# Remove by email
curl -X DELETE 'https://api.resend.com/suppressions/steve.wozniak@example.com' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
# Remove by suppression id
resend suppressions delete e169aa45-1ecf-4183-9955-b1499d5701d3

# Remove by email
resend suppressions delete steve.wozniak@example.com
Response
{
  "object": "suppression",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
  "deleted": true
}

email | id

required

The Suppression ID or email address.

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.suppressions.remove(
  'e169aa45-1ecf-4183-9955-b1499d5701d3', // or: 'steve.wozniak@example.com'
);
PHP
$resend = Resend::client('re_xxxxxxxxx');

// Remove by suppression id
$resend->suppressions->remove(
  'e169aa45-1ecf-4183-9955-b1499d5701d3'
);

// Remove by email
$resend->suppressions->remove(
  'steve.wozniak@example.com'
);
Python
import resend

resend.api_key = "re_xxxxxxxxx"

# Remove by suppression id
resend.Suppressions.remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

# Remove by email
resend.Suppressions.remove("steve.wozniak@example.com")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

# Remove by suppression id
Resend::Suppressions.remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

# Remove by email
Resend::Suppressions.remove("steve.wozniak@example.com")
Go
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	// Remove by suppression id
	client.Suppressions.Remove("e169aa45-1ecf-4183-9955-b1499d5701d3")

	// Remove by email
	client.Suppressions.Remove("steve.wozniak@example.com")
}
Rust
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  // Remove by suppression id
  let _data = resend
    .suppressions
    .remove("e169aa45-1ecf-4183-9955-b1499d5701d3")
    .await?;

  // Remove by email
  let _data = resend
    .suppressions
    .remove("steve.wozniak@example.com")
    .await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        // Remove by suppression id
        resend.suppressions().remove("e169aa45-1ecf-4183-9955-b1499d5701d3");

        // Remove by email
        resend.suppressions().remove("steve.wozniak@example.com");
    }
}
.NET
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" );

// Remove by suppression id
await resend.SuppressionRemoveAsync( "e169aa45-1ecf-4183-9955-b1499d5701d3" );

// Remove by email
await resend.SuppressionRemoveAsync( "steve.wozniak@example.com" );
cURL
# Remove by suppression id
curl -X DELETE 'https://api.resend.com/suppressions/e169aa45-1ecf-4183-9955-b1499d5701d3' \
     -H 'Authorization: Bearer re_xxxxxxxxx'

# Remove by email
curl -X DELETE 'https://api.resend.com/suppressions/steve.wozniak@example.com' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
# Remove by suppression id
resend suppressions delete e169aa45-1ecf-4183-9955-b1499d5701d3

# Remove by email
resend suppressions delete steve.wozniak@example.com
JSON
{
  "object": "suppression",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
  "deleted": true
}

Was this page helpful?

⌘I

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu