> For a complete page index, fetch https://developer.close.com/llms.txt

# Delete a Send As Association by allowed user

DELETE https://api.close.com/api/v1/send_as/

The `allowing_user_id` must be equal to your user ID.

Supply both the `allowing_user_id` and the `allowed_user_id` to delete an association by those users.

Reference: https://developer.close.com/api/resources/send-as/delete-by-user

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required)

## Request

### Query parameters

- `allowed_user_id` (string, optional)
- `allowing_user_id` (string, optional)

## Response

### 204

No content

## Examples

**SDK Code**

```python
import requests

url = "https://api.close.com/api/v1/send_as/"

response = requests.delete(url, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript
const url = 'https://api.close.com/api/v1/send_as/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {method: 'DELETE', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.close.com/api/v1/send_as/"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.SetBasicAuth("<CLOSE_API_KEY>", "")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/send_as/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.close.com/api/v1/send_as/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.close.com/api/v1/send_as/', [
  'headers' => [
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/send_as/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.DELETE);

IRestResponse response = client.Execute(request);
```