# Add a source zones to an rgb display

`POST https://api.parklio.com/v2/rgb-displays/{id}/source-zones`

This endpoint allows the user to add source zones to an existing rgb display.

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

## Path parameters

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | number[] | yes | The list of zone ids to assign to this RGB display as source zones. |

```json
{
  "ids": [
    1,
    2,
    3
  ]
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 1,
    "name": "RGB Display name",
    "status": "online",
    "last_seen": "2026-01-15T09:30:00.000Z",
    "total_occupied_count": 12,
    "total_spot_count": 20,
    "serial_number": "RGB Display serial number",
    "default_message": "{free} FREE",
    "zone_id": 1,
    "lot_id": 1,
    "rules": [
      {
        "id": 1,
        "name": "Low availability",
        "operator": "gt",
        "occupied_value": 5,
        "occupied_value_to": 10,
        "display_text": "{free} FREE",
        "order": 0,
        "start_time": "2026-01-15T09:30:00.000Z",
        "end_time": "2026-01-15T09:30:00.000Z"
      }
    ],
    "source_zones": [
      {
        "id": 1,
        "name": "Low availability",
        "operator": "gt",
        "occupied_value": 5,
        "occupied_value_to": 10,
        "display_text": "{free} FREE",
        "order": 0,
        "start_time": "2026-01-15T09:30:00.000Z",
        "end_time": "2026-01-15T09:30:00.000Z"
      }
    ],
    "created_at": "2026-01-15T09:30:00.000Z",
    "updated_at": "2026-01-15T09: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"
    }
  ]
}
```

