Contact Properties
Delete Contact Property by Name
Delete a contact property by name to remove it from all contacts using the AutoSend API.
DELETE
/
contact-properties
/
name
/
{propertyName}
curl --request DELETE \
--url https://api.autosend.com/v1/contact-properties/name/planTier \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/contact-properties/name/planTier"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/contact-properties/name/planTier",
{
method: "DELETE",
headers: {
Authorization: "Bearer <token>",
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties/name/planTier",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://api.autosend.com/v1/contact-properties/name/planTier", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties/name/planTier"))
.header("Authorization", "Bearer <token>")
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
uri = URI.parse("https://api.autosend.com/v1/contact-properties/name/planTier")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer <token>"
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property deleted successfully"
}
curl --request DELETE \
--url https://api.autosend.com/v1/contact-properties/name/planTier \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/contact-properties/name/planTier"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/contact-properties/name/planTier",
{
method: "DELETE",
headers: {
Authorization: "Bearer <token>",
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties/name/planTier",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://api.autosend.com/v1/contact-properties/name/planTier", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties/name/planTier"))
.header("Authorization", "Bearer <token>")
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
uri = URI.parse("https://api.autosend.com/v1/contact-properties/name/planTier")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer <token>"
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property deleted successfully"
}
Authorizations
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Path Parameters
The
name of the contact property to delete.Response
Contact property deleted successfullyIndicates whether the request was successful.
Confirmation message.Example:
"Contact property deleted successfully"Error Responses
Returned when no contact property with the given name exists on the project.
{
"success": false,
"error": {
"message": "Contact property not found",
"code": "CONTACT_PROPERTY_NOT_FOUND",
"status": 404
}
}
Related topics
Get Contact Property by NameDelete Custom Field by NameWas this page helpful?
⌘I
curl --request DELETE \
--url https://api.autosend.com/v1/contact-properties/name/planTier \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/contact-properties/name/planTier"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.json())
const response = await fetch(
"https://api.autosend.com/v1/contact-properties/name/planTier",
{
method: "DELETE",
headers: {
Authorization: "Bearer <token>",
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.autosend.com/v1/contact-properties/name/planTier",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://api.autosend.com/v1/contact-properties/name/planTier", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/contact-properties/name/planTier"))
.header("Authorization", "Bearer <token>")
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require "net/http"
require "uri"
uri = URI.parse("https://api.autosend.com/v1/contact-properties/name/planTier")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request["Authorization"] = "Bearer <token>"
response = http.request(request)
puts response.body
{
"success": true,
"message": "Contact property deleted successfully"
}