# Block an operation token

`PATCH https://api.parklio.com/v2/operation-tokens/{id}`

Marks a token `blocked`. The only accepted body is `{"status": "blocked"}`.

**This doesn't reach the device:** a copy your app already holds keeps working until `end_time`. Keep windows short instead. See [Operation tokens for your app](/guides/mobile-app-operation-tokens#2-keep-windows-short).

**Auth:** `Authorization: Bearer <token>`

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The operation token's `id`. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string (`blocked`) | yes | Change the status of the operation token |

```json
{
  "status": "blocked"
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 9001,
    "product_id": 123,
    "start_time": "2026-03-02T08:00:00.000Z",
    "end_time": "2026-03-02T10:00:00.000Z",
    "status": "blocked",
    "used_count": 0,
    "is_unlimited": 0,
    "token_open": {
      "token": "<hex>",
      "status_key": "<hex>",
      "challenge_key": "<hex>"
    },
    "token_close": {
      "token": "<hex>",
      "status_key": "<hex>",
      "challenge_key": "<hex>"
    },
    "token_status": {
      "token": "<hex>",
      "status_key": "<hex>",
      "challenge_key": "<hex>"
    },
    "product": {
      "id": 123,
      "device_id": "B1234567"
    },
    "created_at": "2026-03-02T07:59:58.000Z",
    "updated_at": "2026-03-02T08:30:00.000Z"
  }
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 403 — User does not have permission to access requested resource.

```json
{
  "success": false,
  "errors": [
    {
      "code": 4,
      "message": "No permission."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

### 422 — Some of the provided request parameters are missing or are invalid. User should add/change them according to response message.

```json
{
  "success": false,
  "errors": [
    {
      "code": 23,
      "message": "Validation error",
      "field": "field"
    }
  ]
}
```

