Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Delete Event

DELETE

/

events

/

:id

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

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.remove('user.created');
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->events->remove('user.created');
Python
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Events.remove("user.created")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Events.remove("user.created")
Go
package main

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

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

	client.Events.Remove("user.created")
}
Rust
use resend_rs::{Resend, Result};

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

  let _event = resend.events.delete("user.created").await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.events.model.RemoveEventResponseSuccess;

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

        RemoveEventResponseSuccess data = resend.events().remove("user.created");
    }
}
.NET
using Resend;

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

var resp = await resend.EventDeleteAsync( "user.created" );
Console.WriteLine( "Deleted={0}", resp.Content.Deleted );
cURL
curl -X DELETE 'https://api.resend.com/events/user.created' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend events delete user.created
Response
{
  "object": "event",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "deleted": true
}
Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.events.remove('user.created');
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->events->remove('user.created');
Python
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Events.remove("user.created")
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Events.remove("user.created")
Go
package main

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

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

	client.Events.Remove("user.created")
}
Rust
use resend_rs::{Resend, Result};

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

  let _event = resend.events.delete("user.created").await?;

  Ok(())
}
Java
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.events.model.RemoveEventResponseSuccess;

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

        RemoveEventResponseSuccess data = resend.events().remove("user.created");
    }
}
.NET
using Resend;

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

var resp = await resend.EventDeleteAsync( "user.created" );
Console.WriteLine( "Deleted={0}", resp.Content.Deleted );
cURL
curl -X DELETE 'https://api.resend.com/events/user.created' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend events delete user.created
JSON
{
  "object": "event",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "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