# Revoke a device

`GET https://api.cryptohopper.com/v1/device/{device}/revoke`

Part of [Devices](https://www.cryptohopper.com/api-documentation/api-reference/devices.md) in the Cryptohopper API reference.

Revokes the authorization of one of your devices, so it has to be authorized again with an emailed code. The calling device must itself be authorized.

The handler checks no OAuth scope. The device record is kept with state 0 and a revokedAt time.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | no | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `device` | string | yes | The deviceId string of the device to revoke, as returned in the deviceId field of List your devices. The numeric id is not accepted. |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `secret` | string | no | Optional two factor authentication code. When sent, it must be valid for the account or the request fails with 404 Wrong 2FA. |

## Example request

```bash
curl "https://api.cryptohopper.com/v1/device/DEVICE/revoke" \
  -H "access-token: YOUR_ACCESS_TOKEN"
```

## Response

Example response (illustrative values):

```json
{
    "data": "ok"
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
