---
title: "Check whether this instance serves a CLI sign-in"
method: POST
path: "/v1/auth/cli/region-check"
tags: ["Auth"]
---

# Check whether this instance serves a CLI sign-in

`POST /v1/auth/cli/region-check`

## Request

- Base URL: `https://api.tessl.io`
- URL: `https://api.tessl.io/v1/auth/cli/region-check`
- Auth: none declared

WorkOS picks the organization a device-code sign-in lands on, with no way for the CLI to steer it. This route tells a freshly signed-in CLI whether this instance serves the token's organization and, if not, which of the user's organizations it does serve, so the CLI can switch to one before saving the credential. The token travels in the body because the authentication hook refuses a token for an organization this instance does not serve.

## Request body

- object
  - `accessToken` string, required

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, required
    - `type` 'cli-region-check', required
    - `attributes` object, required
      - `region` string, required
      - `served` boolean, required
      - `organizations` object[], required
        - `id` string, required
        - `name` string, required
      - `complete` boolean, required

## Other responses

- `401`: Unauthorized
- `404`: Not Found
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-08** `8cae535b1242`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tessl/apis/tessl-api/changes/v1/auth/cli/region-check/post.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) · [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/7386f1e6295b?raw)
