# Delete Configuration

**DELETE** `/v1/keys/{key}/configs/{config}`

Permanently deletes a configuration object.

## Example request

**curl**

```bash
curl -X DELETE 'https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret'
```

**JavaScript**

```javascript
import { createZenClient, deleteConfig } from '@addresszen/sdk';

const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });

const { data } = await deleteConfig({
  client,
  path: { key: 'ak_test', config: 'woocommerce' },
});
```

**Python**

```python
# pip install addresszen
from addresszen import AddressZen

with AddressZen("ak_test") as client:
    result = client.delete_config("ak_test", "woocommerce", user_token="uk_secret")
```

**Ruby**

```ruby
require "net/http"

uri = URI("https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret")
Net::HTTP.start(uri.host, use_ssl: true) do |http|
  http.delete(uri.request_uri)
end
```

**PHP**

```php
<?php
$ch = curl_init("https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?user_token=uk_secret");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
```

## Example response

**200 OK**

response.jsonjson

```json
{
  "result": {
    "deleted": 1
  },
  "code": 2000,
  "message": "Success"
}
```

## Path parameters

* `key` string

  **API Key**

  The API Key. Begins `ak_`.

  Example: `ak_test`

* `config` string

  **Configuration Name**

  User-provided configuration object name.

  Example: `checkout-form`

## Query parameters

* `user_token` string optional

  **Management Key**

  A secret key used to manage your account and API Keys. It was previously called the user token.

  Your management key can be retrieved and managed from your [accounts page](https://addresszen.com/account).

  Typically begins `uk_`. Prefer sending it in the `Authorization` header as `Bearer uk_...` instead of this query parameter. The `Authorization: user_token="uk_..."` header also works.

  Example: `uk_B59ScW1p1HHouf1VqclEPZUx`

## Response

Returns a `result` object with a `deleted` count (typically `1` for success, `0` if not found).

* `result` object

  * `deleted` number

    Format: `int32`

    Example: `1`

The `result` sits inside the standard `{ result, code, message }` envelope. See the [API reference](/docs/api/api-reference.md) for the wrapper format.
