# Tabs Auto-Close Settings

When open tabs close automatically

## GET /api/v1/locations/{locationId}/tabs-auto-close-settings

Get auto-close-tabs settings

Get the location's auto-close rules for open tabs. Both fields are null when opted out.

**Permissions:** 🔵 `settings.read`

Path parameters:
- `locationId` (string, required) — Location ID

Response 200 — Default Response

```ts
{
  status: "success"
  data: {
    locationId: number
    afterHours: integer | null
    atTime: string | null
  }
  meta: {
    requestId: string
    timestamp: string // date-time
    executionTimeMs: number
  }
}
```

## PUT /api/v1/locations/{locationId}/tabs-auto-close-settings

Update auto-close-tabs settings

Update the location's auto-close rules. Omit a field to leave it unchanged; pass null to clear it.

**Permissions:** 🟠 `settings.update`

Path parameters:
- `locationId` (string, required) — Location ID

Request body:

```ts
{
  afterHours?: integer | null
  atTime?: string | null
}
```

Response 200 — Default Response

```ts
{
  status: "success"
  data: {
    locationId: number
    afterHours: integer | null
    atTime: string | null
  }
  meta: {
    requestId: string
    timestamp: string // date-time
    executionTimeMs: number
  }
}
```
