# Delete access token


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`DELETE /v2/orgs/{org_name}/access-tokens/{access_token_id}`

Delete a specific access token for an organization. This action cannot be undone.


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "bearerAuth": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request DELETE \
  --header "Authorization: Bearer ${TOKEN}" \
  'https://hub.docker.com/v2/orgs/myorganization/access-tokens/a7a5ef25-8889-43a0-8cc7-f2a94268e861'
```

## Parameters

### org_name

Location: path. Required: yes.

Name of the organization (namespace).

```json
{
  "description": "Name of the organization (namespace).",
  "example": "myorganization",
  "in": "path",
  "name": "org_name",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1access-tokens~1{access_token_id}/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### access_token_id

Location: path. Required: yes.

The ID of the access token to retrieve

```json
{
  "description": "The ID of the access token to retrieve",
  "example": "a7a5ef25-8889-43a0-8cc7-f2a94268e861",
  "in": "path",
  "name": "access_token_id",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1access-tokens~1{access_token_id}/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 204 

Access token deleted successfully

No response content is declared.






### Response 401 application/json

Unauthorized


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "unauthorized"
}
```


### Response 403 application/json

Forbidden


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "permission denied"
}
```


### Response 404 application/json

Not Found


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "not found"
}
```


## Complete operation contract

```json
{
  "description": "Delete a specific access token for an organization. This action cannot be undone.\n",
  "operationId": "deleteV2OrgsByOrgNameAccessTokensByAccessTokenId",
  "responses": {
    "204": {
      "description": "Access token deleted successfully"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "Delete access token",
  "tags": [
    "org-access-tokens"
  ]
}
```

## Referenced schemas

- `#/components/responses/Forbidden`

- `#/components/responses/NotFound`

- `#/components/responses/Unauthorized`




