# outside_calling_hours

- HTTP status: 422
- Retry: No
- Execution: not started
- Admin needed: yes

> **A compliance outcome, not an error to fix:** This refusal protects the person you tried to call. Record it and do not call them now. Never resend the request, remove a do-not-call entry or record consent just to make a call go through. See [Consent and DNC](/guides/consent-and-dnc).

**Outside calling hours.** The workspace has a calling window (curfew) switched on in its compliance settings. Calls and campaign dialling are refused outside it. The window is evaluated in the timezone of the workspace's region (`details.timezone`), not the contact's.

## What it means

The API returns HTTP 422 with `error.code` set to `outside_calling_hours`. The default message is: "This is outside the permitted calling window for this workspace. Nothing was dialled."

## Common causes

- The request arrived outside the calling window, so it is refused for compliance.
- The calling window is switched on but no hours are set, which blocks every call.

## How to identify it

Check the response status (`422`) and `error.code` (`outside_calling_hours`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## What to do

- Do not retry now: the same request is refused until the window opens. Send it again inside the window in `details` (a new request; the refusal was not stored).
- Only a workspace admin can change the window, in the console compliance settings, and only to hours that are permitted for the people being called.

## Retry guidance

Do not resend the request, and do not change settings, to get around this refusal. A new request is appropriate only when the rule genuinely no longer applies: the person asked to be called or gave consent, or the permitted calling window has started.

## Did anything happen?

This request was refused before any call was placed and before anything was charged.

## Idempotency

No call was placed. If you sent an Idempotency-Key, the refusal is not stored under it. If the rule later stops applying (for example the person gives consent), place a new call (with a new key, if you use one).

## Who can fix it

Nobody should change data to make this call go through. Remove a do-not-call entry or record consent only when the person asked you to, and keep a record of who asked and when; these changes are audited. See [Consent and DNC](/guides/consent-and-dnc).

## When to contact support

If the error persists after the steps above, contact [support@relationsai.com](mailto:support@relationsai.com). See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "outside_calling_hours",
    "message": "This is outside the permitted calling window for this workspace. Nothing was dialled.",
    "details": {
      "window": "09:00-21:00",
      "timezone": "Asia/Kolkata"
    },
    "request_id": "req_swm247x6e63nqf3j3t4c3ash",
    "retry": "no",
    "doc_url": "https://docs.relationsai.com/errors/outside_calling_hours"
  }
}
```

## Operations that can return this error

- [`POST /calls`](/api/calls#place-a-call): Place a call
- [`POST /campaigns/{campaign_id}/start`](/api/campaigns#start-a-campaign): Start a campaign
- [`POST /campaigns/{campaign_id}/resume`](/api/campaigns#resume-a-campaign): Resume a campaign

See all codes in the [error-code reference](/fundamentals/error-codes).
