---
title: "Start CLI device authorization"
method: POST
path: "/cli/auth/init"
tags: ["public"]
---

# Start CLI device authorization

`POST /cli/auth/init`

## 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/init`
- Auth: none required

## Request body

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

## Response `200`

Registered, awaiting authorization

- object
  - `success` boolean, required
  - `deviceToken` string, required
  - `expiresIn` number, required
  - `interval` number, required

## Other responses

- `400`: Invalid deviceToken
- `409`: deviceToken already used

---

[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)
