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

# Get Available Timezones

> Returns the list of PHP-supported timezone identifiers.

<Badge color="green">GET</Badge> `https://api.revreply.com/v1/timezones`

<Note>
  This endpoint requires authentication.
</Note>

## Try it

Use the following request to retrieve the available timezone identifiers. You can optionally use the `zapier` query parameter to request the Zapier-compatible response format.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X GET "https://api.revreply.com/v1/timezones" \
      -H "Authorization: Bearer <YOUR_JWT>" \
      -H "Accept: application/json" \
      -H "Content-Type: application/json"
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const response = await fetch(
      "https://api.revreply.com/v1/timezones",
      {
        method: "GET",
        headers: {
          "Authorization": "Bearer <YOUR_JWT>",
          "Accept": "application/json",
          "Content-Type": "application/json"
        }
      }
    );
    const data = await response.json();
    console.log(data);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests
    response = requests.get(
        "https://api.revreply.com/v1/timezones",
        headers={
            "Authorization": "Bearer <YOUR_JWT>",
            "Accept": "application/json",
            "Content-Type": "application/json",
        },
    )
    data = response.json()
    print(data)
    ```
  </Tab>

  <Tab title="PHP">
    ```php theme={null}
    <?php
    $ch = curl_init("https://api.revreply.com/v1/timezones");
    curl_setopt_array($ch, [
        CURLOPT_HTTPGET => true,
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer <YOUR_JWT>",
            "Accept: application/json",
            "Content-Type: application/json",
        ],
        CURLOPT_RETURNTRANSFER => true,
    ]);
    $response = curl_exec($ch);
    curl_close($ch);
    echo $response;
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    package main
    import (
        "fmt"
        "net/http"
    )
    func main() {
        req, _ := http.NewRequest(
            "GET",
            "https://api.revreply.com/v1/timezones",
            nil,
        )

        req.Header.Set("Authorization", "Bearer <YOUR_JWT>")
        req.Header.Set("Accept", "application/json")
        req.Header.Set("Content-Type", "application/json")

        client := &http.Client{}
        response, _ := client.Do(req)
        fmt.Println(response.Status)
    }
    ```
  </Tab>
</Tabs>

## Authentication

This endpoint uses Bearer authentication with a JWT.

## Request

### Headers

| Header          | Type     | Required | Description                                                    |
| --------------- | -------- | -------- | -------------------------------------------------------------- |
| `Authorization` | `string` | Yes      | Bearer token used to authenticate the request.                 |
| `Accept`        | `string` | Yes      | Specifies that the client expects the response in JSON format. |
| `Content-Type`  | `string` | Yes      | Specifies that the request body is formatted as JSON.          |

```http theme={null}
Authorization: Bearer <YOUR_JWT>
Accept: application/json
Content-Type: application/json
```

### Query parameters

| Parameter | Type      | Required | Description                                                          |
| --------- | --------- | -------- | -------------------------------------------------------------------- |
| `zapier`  | `integer` | No       | Return the Zapier-compatible format. Accepted values are `0` or `1`. |

### Request structure

This endpoint does not require a request body. The optional `zapier` query parameter changes the response format when set to `1`.

### Request examples

The request is a `GET` request to:

```text theme={null}
https://api.revreply.com/v1/timezones
```

To request the Zapier-compatible format:

```text theme={null}
https://api.revreply.com/v1/timezones?zapier=1
```

## Response

### Response structure

A successful request returns the list of PHP-supported timezone identifiers. By default, the response is an object containing a success indicator and an array of timezone identifiers.

| Field     | Type       | Required | Description                                                    |
| --------- | ---------- | -------- | -------------------------------------------------------------- |
| `success` | `integer`  | No       | Indicates that the request was successful. Success equals `1`. |
| `data`    | `string[]` | No       | Array of PHP-supported timezone identifiers.                   |

When `zapier=1` is supplied, the response changes to an array of timezone objects. Each object contains an `id` and `name` field.

| Field  | Type     | Required | Description                                      |
| ------ | -------- | -------- | ------------------------------------------------ |
| `id`   | `string` | Yes      | Timezone identifier, such as `America/New_York`. |
| `name` | `string` | Yes      | Display name of the timezone.                    |

### Response example

Default response:

```json theme={null}
{
  "success": 1,
  "data": [
    "UTC",
    "America/New_York",
    "America/Los_Angeles",
    "Europe/London"
  ]
}
```

Zapier-compatible response (`zapier=1`):

```json theme={null}
[
  {
    "id": "America/New_York",
    "name": "America/New_York"
  },
  {
    "id": "America/Los_Angeles",
    "name": "America/Los_Angeles"
  }
]
```
