# Delete An Entity

## Deleting an Entity

<mark style="color:red;">`DELETE`</mark> `/api/v1/{entity-type}/{id}`

#### Path Parameters

| Name                                          | Type   | Description                  |
| --------------------------------------------- | ------ | ---------------------------- |
| entity-type<mark style="color:red;">\*</mark> | String | The type of entity to modify |
| entity-id<mark style="color:red;">\*</mark>   | String | The ID of entity to modify   |

#### Headers

| Name                                           | Type   | Description                                                                               |
| ---------------------------------------------- | ------ | ----------------------------------------------------------------------------------------- |
| content-type<mark style="color:red;">\*</mark> | String | Set to `application/json`                                                                 |
| authorization                                  | String | Set to Bearer {access-token} if roles in Schema is not anonymous. Else token can be empty |

{% tabs %}
{% tab title="200: OK Entity Deleted Success Response" %}

```javascript
```

{% endtab %}
{% endtabs %}

## Usage

**cURL**

```
curl --location \
	 --request 'DELETE' \
	 --header 'content-type: application/json' \
	 --header 'authorization: Bearer {access-token}' \
	 '{registry-url}/api/v1/Teacher/{id}'
```

**HTTPie**

```
http DELETE \
	'{registry_url}/api/v1/Teacher/{id}' \
	'content-type: application/json' \
	'authorization: Bearer {access-token}'
```

> `{registry-url}` is usually [http://localhost:{port}](https://docs.sunbirdrc.dev/~/changes/ADw6FieYgLmHh8a9Loem/api-reference/registry/http:/localhost:{port}). The port can be found under the `registry` section in the `docker-compose.yml` file and is usually `8081`.
