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

# Devices

> Get a list of available devices for emulation.

It’s simple to use: you only need to submit your `access_key`. The API will return a list of available devices for emulation.

<Note>Requests to this endpoint are **not counted against your usage quota,** but they are **still subject to rate limiting.** This ensures fair use and stability of the platform. If you exceed the rate limit, your requests may be temporarily blocked.</Note>

## Getting started

### REST

The Device API, like all of ScreenshotMAX’s APIs, is organized around REST. It is designed to use predictable, resource-oriented URL’s and to use HTTP status codes to indicate errors.

### HTTPS

The Device API requires all communications to be secured TLS 1.2 or greater.

### API Versions

All of ScreenshotMAX’s APIs are versioned. The Device API is currently on Version 1.

### Your Access Key

Your access key is your unique authentication key to be used to access ScreenshotMAX APIs.
To authenticate your requests, you will need to append your access key to the base URL as a query parameter for GET requests.
For POST requests, you can include your access key in the request body as a JSON object.
You can also use the `X-Access-Key` header to pass your access key.
You can find your access key in your [account dashboard](https://app.screenshotmax.com/access).

### Base URL

```
https://api.screenshotmax.com/v1/devices
```

### Validation endpoint

ScreenshotMAX’s Device API simply requires your unique access key. The API will return a list of available devices for emulation.

```
https://api.screenshotmax.com/v1/devices
? access_key=YOUR_ACCESS_KEY
```

This was a successful request, so the API returned a 200 OK response with the list of available devices for emulation.

```json theme={null}
{
    "devices": [
        {
            "id": "blackberry_playbook",
            "name": "Blackberry PlayBook",
            "viewport": {
                "width": 600,
                "height": 1024,
                "device_scale_factor": 1,
                "mobile": true,
                "landscape": false,
                "has_touch": true
            }
        },
        {
            "id": "blackberry_playbook_landscape",
            "name": "Blackberry PlayBook landscape",
            "viewport": {
                "width": 1024,
                "height": 600,
                "device_scale_factor": 1,
                "mobile": true,
                "landscape": true,
                "has_touch": true
            }
        },
        ...
    ]
}
```

### Request parameters

<ParamField query="access_key" type="string" required>
  Your unique access key. You can find your access key in your [account dashboard](https://app.screenshotmax.com/access).
</ParamField>

### Response parameters

The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).

<ResponseField name="devices" type="object[]">
  List of available devices for emulation.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Device ID. Name of the device in snake\_case format.
    </ResponseField>

    <ResponseField name="name" type="string">
      Device name.
    </ResponseField>

    <ResponseField name="user_agent" type="string">
      Device user agent.
    </ResponseField>

    <ResponseField name="viewport" type="object">
      Device viewport.

      <Expandable title="properties">
        <ResponseField name="width" type="number">
          Viewport width.
        </ResponseField>

        <ResponseField name="height" type="number">
          Viewport height.
        </ResponseField>

        <ResponseField name="device_scale_factor" type="number">
          Device scale factor.
        </ResponseField>

        <ResponseField name="mobile" type="boolean">
          Whether the `meta viewport` tag is taken into account.
        </ResponseField>

        <ResponseField name="landscape" type="boolean">
          Specifies if the viewport is in landscape mode.
        </ResponseField>

        <ResponseField name="has_touch" type="boolean">
          Specify if the viewport supports touch events.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Error Codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.

| Code | Type                  | Details                                                |
| ---- | --------------------- | ------------------------------------------------------ |
| 200  | OK                    | The request was successful.                            |
| 401  | Unauthorized          | The request was rejected due to an invalid access key. |
| 500  | Internal server error | The request failed due to an internal server error.    |
