# Delete an attribute

Source: https://developers.swell.is/backend-api/attributes/delete-an-attribute

Delete an attribute.

## Arguments

- `id` (objectId, required): The id of the attribute to delete.

## Example request

`DELETE /attributes/:id`

**cURL**

```bash
$ curl https://api.swell.store/attributes/material \
  -u store-id:secret-key \
  -X DELETE
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.delete('/attributes/{id}', {
  id: 'material',
});
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->delete('/attributes/{id}', [
  'id' => 'material',
]);
```

## Example response

```json
{
  "id": "material",
  "name": "Material",
  "date_created": "2019-04-01T00:00:00.000Z",
  "date_updated": "2019-04-01T00:00:00.000Z",
  "required": true,
  "visible": true,
  "type": "dropdown",
  "values": [
    "Cotton",
    "Polyester",
    "Wool"
  ]
}
```
