> ## 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.

# Delete Contact Property by Name

> Delete a contact property by name to remove it from all contacts using the AutoSend API.

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://api.autosend.com/v1/contact-properties/name/planTier \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  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())
  ```

  ```javascript JavaScript theme={null}
  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 PHP theme={null}
  <?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;
  ```

  ```go Go theme={null}
  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))
  }
  ```

  ```java Java theme={null}
  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());
    }
  }
  ```

  ```ruby Ruby theme={null}
  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
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "message": "Contact property deleted successfully"
  }
  ```
</ResponseExample>

### Authorizations

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

#### Path Parameters

<ParamField path="propertyName" type="string" required>
  The `name` of the contact property to delete.
</ParamField>

### Response

<span className="text-sm">Contact property deleted successfully</span>

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message.

  Example: `"Contact property deleted successfully"`
</ResponseField>

#### Error Responses

<ResponseField name="404 - Contact property not found" type="object">
  Returned when no contact property with the given name exists on the project.

  ```json theme={null}
  {
    "success": false,
    "error": {
      "message": "Contact property not found",
      "code": "CONTACT_PROPERTY_NOT_FOUND",
      "status": 404
    }
  }
  ```
</ResponseField>


## OpenAPI

````yaml DELETE /contact-properties/name/{propertyName}
openapi: 3.1.0
info:
  title: Contact Properties API
  description: >-
    API for managing contact properties in an Autosend project. Contact
    properties let you define dynamic attributes that are attached to every
    contact in your project. Reserved built-in property names cannot be used
    when creating contact properties. Contact properties were previously called
    custom fields; the `/custom-fields` endpoints remain available as a
    deprecated alias.
  version: 1.0.0
servers:
  - url: https://api.autosend.com/v1
security:
  - bearerAuth: []
paths:
  /contact-properties/name/{propertyName}:
    delete:
      summary: Delete Contact Property by Name
      description: >-
        Permanently deletes a contact property by its `name`. This action cannot
        be undone. Any contact data stored against this property will no longer
        be accessible via the property definition.
components: {}

````

## Related topics

- [Get Contact Property by Name](/api-reference/contact-properties/get-by-name.md)
- [Delete Custom Field by Name](/api-reference/custom-fields/delete.md)
- [Contact Properties](/marketing-emails/contacts/contact-properties.md)
- [Create Contact Property](/api-reference/contact-properties/create.md)
- [List Contact Properties](/api-reference/contact-properties/list.md)
