# Delete Token

To delete your token, the `registryId` and `tokenId` to be deleted must be provided.

You can get registryId through [<mark style="color:blue;">GET Registries API call</mark>](https://docs.ionos.com/sections-test/guides/containers/private-container-registry/api-howtos/registries) and [<mark style="color:blue;">Create Registry Token</mark>](https://docs.ionos.com/sections-test/guides/containers/private-container-registry/api-howtos/create_token).

Delete the information about the token using the following `curl` command:

{% hint style="info" %}
**Note:** The sample `requestID` is `779f8e3c-d5c8-4359-8f85-c200fb89e97c` and the sample `tokenID` is `4b120b87-91ab-4ec2-8952-cc771a37bd08`.
{% endhint %}

## Request

```bash
curl --location \
--request DELETE 'https://api.ionos.com/containerregistries/registries/779f8e3c-d5c8-4359-8f85-c200fb89e97c/tokens/b120b87-91ab-4ec2-8952-cc771a37bd08' \
--header 'Authorization: Bearer ${TOKEN}' \
--data-raw ''
```

### Path parameters

| **Field**      | **Type** |                 **Description**                | **Example**                            |
| -------------- | :------: | :--------------------------------------------: | -------------------------------------- |
| **registryId** |  string  |      The ID of the registry to be deleted.     | `779f8e3c-d5c8-4359-8f85-c200fb89e97c` |
| **tokenId**    |  string  | TThe associated ID of the token to be deleted. | `4b120b87-91ab-4ec2-8952-cc771a37bd08` |

## Response

**204 - No Content**

The action was successful and the response body is empty.

**400 Bad Request - The request made is invalid or corrupted**

```json
{
 "httpStatus": 400,
 "messages": [
   {
     "errorCode": "123",
     "message": "ad velit dolor dolore laboris"
   },
   {
     "errorCode": "123",
     "message": "tempor"
   }
 ]
}
```

**404 Bad Request - Not Found**

```json
{
   "msg": "Not Found"
}
```

This way you can delete a particular token.
