Skip to main content
Resend Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

Delete Contact Property

Remove an existing contact property.

The Contact Property ID.

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

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contactProperties.remove(
  'b6d24b8e-af0b-4c3c-be0c-359bbd97381e',
);
PHP
$resend = Resend::client('re_xxxxxxxxx');

$resend->contactProperties->remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381');
Python
import resend

resend.api_key = 're_xxxxxxxxx'

contact_property = resend.ContactProperties.remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381e')
Ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::ContactProperties.remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
Go
package main

import (
	"context"
	"fmt"

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

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

	property, err := client.ContactProperties.RemoveWithContext(ctx, "b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
	if err != nil {
		panic(err)
	}
	fmt.Println(property)
}
Rust
use resend_rs::{Resend, Result};

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

  let _deleted = resend
    .contacts
    .delete_property("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
    .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");

    resend.contactProperties().remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e");
  }
}
.NET
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

var resp = await resend.ContactPropDeleteAsync( new Guid( "b6d24b8e-af0b-4c3c-be0c-359bbd97381e" ) );
cURL
curl -X DELETE 'https://api.resend.com/contact-properties/b6d24b8e-af0b-4c3c-be0c-359bbd97381e' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend contact-properties delete b6d24b8e-af0b-4c3c-be0c-359bbd97381e --yes
Response
{
  "object": "contact_property",
  "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
  "deleted": true
}
Suggest an edit

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

Export
Documentation menu