> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get call time windows

> Returns the company's call time window configuration: which directions
the window is enforced on, the workspace timezone, and every allowed
window grouped by day of week.


Returns the company's call time window configuration: which directions enforcement is on for, the workspace timezone, and every allowed window grouped by day of week.

Calls placed (or received) outside the configured window are gated automatically:

* **Outbound** — when `outbound_enabled` is `true` and the call falls outside any allowed window, the create-call request returns `202 Accepted` with `status: "scheduled"` and a `scheduled_for` timestamp marking the next window opening. The platform places the call automatically at that time.
* **Inbound** — when `inbound_enabled` is `true` and the call lands outside any allowed window, the call is hung up before being answered. No `call_logs` row is created and no minutes are charged.

A day with no windows is closed for whichever directions are enforced. The default schedule (seeded for every company) is Sunday through Thursday 09:00–19:00 plus Friday 09:00–11:30; Saturday is closed.

Any authenticated API key for the workspace can read this — no specific scope is required.

## Example request

```bash theme={null}
curl "https://api.goyappr.com/call-windows" \
  -H "Authorization: Bearer $YAPPR_API_KEY"
```

## Example response

```json theme={null}
{
  "timezone": "Asia/Jerusalem",
  "inbound_enabled": false,
  "outbound_enabled": true,
  "windows": [
    { "day_of_week": 0, "start_time": "09:00", "end_time": "19:00" },
    { "day_of_week": 1, "start_time": "09:00", "end_time": "19:00" },
    { "day_of_week": 2, "start_time": "09:00", "end_time": "19:00" },
    { "day_of_week": 3, "start_time": "09:00", "end_time": "19:00" },
    { "day_of_week": 4, "start_time": "09:00", "end_time": "19:00" },
    { "day_of_week": 5, "start_time": "09:00", "end_time": "11:30" }
  ]
}
```

`day_of_week` follows the standard Sunday-first convention: `0` is Sunday, `6` is Saturday. Times are `HH:MM` in 24-hour notation, evaluated in the workspace timezone (change it in the Company settings tab).

## Errors

| HTTP | Code | When                        |
| ---- | ---- | --------------------------- |
| 401  | —    | Missing or invalid API key. |


## OpenAPI

````yaml GET /call-windows
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /call-windows:
    get:
      tags:
        - Call Windows
      summary: Get call time windows
      description: |
        Returns the company's call time window configuration: which directions
        the window is enforced on, the workspace timezone, and every allowed
        window grouped by day of week.
      operationId: getCallWindows
      responses:
        '200':
          description: Current configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallWindowConfig'
components:
  schemas:
    CallWindowConfig:
      type: object
      description: |
        Company-level configuration that gates inbound and outbound calls by
        time-of-day. When `outbound_enabled` is true, outbound API requests
        placed outside any allowed window are deferred — the response is
        `202 Accepted` with `status: "scheduled"` and a `scheduled_for`
        timestamp marking the next window opening. When `inbound_enabled` is
        true, inbound calls received outside any allowed window are hung up
        before being answered (no `call_logs` row is created).

        A day with no windows is a closed day for whichever directions are
        enforced. The default schedule (seeded for every company) is Sunday
        through Thursday 09:00–19:00 plus Friday 09:00–11:30; Saturday is
        closed.
      properties:
        timezone:
          type: string
          description: >-
            IANA timezone identifier. Reflects `companies.timezone`. Edit it in
            the Company settings tab.
          example: Asia/Jerusalem
        inbound_enabled:
          type: boolean
          description: >-
            When true, inbound calls outside the window are hung up before
            answering. Default false.
        outbound_enabled:
          type: boolean
          description: >-
            When true, outbound calls outside the window are scheduled for the
            next opening. Default true.
        windows:
          type: array
          items:
            $ref: '#/components/schemas/CallWindow'
    CallWindow:
      type: object
      description: >
        A single allowed time range on one day of the week. All times are in the

        workspace's timezone (see `companies.timezone` /
        `CallWindowConfig.timezone`).

        Multiple ranges per day are allowed but must not overlap.
      required:
        - day_of_week
        - start_time
        - end_time
      properties:
        day_of_week:
          type: integer
          minimum: 0
          maximum: 6
          description: 0=Sunday, 1=Monday, …, 6=Saturday.
        start_time:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          example: '09:00'
        end_time:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          example: '19:00'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard
        under **Settings → API Keys**.

````