---
title: "Poll CLI authorization status"
method: POST
path: "/cli/auth/poll"
tags: ["public"]
---

# Poll CLI authorization status

`POST /cli/auth/poll`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/cli/auth/poll`
- Auth: none required

Returns 202 while pending; when approved, returns apiKey and deletes the KV record once; returns 410 when expired.

## Request body

- object
  - `deviceToken` string, required: 32-128 character hexadecimal token generated by the CLI

## Response `200`

Approved (returns apiKey)

- object
  - `success` boolean, required
  - `status` string
  - `apiKey` string
  - `email` string
  - `error` string

## Other responses

- `202`: Waiting for user authorization
- `400`: Invalid deviceToken
- `410`: Authorization request not found or expired

---

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