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

# Register / check the terminal

> Register the device as a terminal, or fetch it if it already exists.

Requires login. Call it at app start, after login.

* If the API key is unknown, a new terminal is created for the logged-in shop (HTTP `201`).
* If it already exists, the terminal is returned (HTTP `200`).

See [Terminal API key](https://docs.tunimobile.com/basics/terminal-api-key.md) for how to generate and store the key.

## Body

**action** `string` *required*

`checkApiKey`

**apiKey** `string` *required*

The key generated and stored by your app for this device.

**type** `string`

Terminal type. Send `APP`.

> [!WARNING]
>
> Don't send `shopId`. A shop account can only create terminals for itself; sending another shop's id returns `403 access_denied`.

## Response

**id** `integer`

Terminal id.

**api-key** `string`

The API key to send in the `api-key` header on voucher and session calls.

**status** `string`

`active` or `inactive`. An inactive terminal cannot print.

**printSize** `string`

Ticket layout configured for this terminal.

## Errors

| HTTP | `error.details` | Meaning |
| - | - | - |
| `400` | `API key is Required` | `apiKey` missing |
| `400` | `Shop is not Found` | The logged-in account is not a shop |
| `403` | `access_denied` | The request sent a `shopId` of another shop |

```bash cURL theme={null}
curl -b cookies.txt -c cookies.txt \
  -H "Content-Type: application/json" \
  -d '{"action":"checkApiKey","apiKey":"6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10","type":"APP"}' \
  https://apitest.tunimobile.com/v1/terminal/do_action
```

```json 201 theme={null}
{
  "status": "success",
  "code": 200,
  "message": "OK",
  "data": {
    "id": 88,
    "api-key": "6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10",
    "name": "N/A",
    "printSize": "standard",
    "status": "active",
    "type": "app",
    "createdAt": "2026-10-28T09:12:44+01:00"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.