# Send the open signal to the camera

`POST https://api.parklio.com/v2/lpr-cameras/{id}/state`

This enpoint sends a OPEN operation to the camera. The open
      operation will trigger a signal on the LPR Camera output which can be
      used as input into any supported hardware, triggering an operation on the
      device. For example, if the LPR Cameras output is connected to a Gate
      input, it will trigger a change of state on the Gate.

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

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string (`open`, `close`) | no | The signal we want to send to the camera |
| `duration` | number | no | The duration of the signal |

```json
{
  "operation": "open",
  "duration": 1
}
```

## Responses

### 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."
    }
  ]
}
```

### 503 — LPR camera is not connected.

```json
{
  "success": false,
  "errors": [
    {
      "code": 802,
      "message": "LPR camera is offline."
    }
  ]
}
```

