---
title: "Approve CLI authorization from the web app"
method: POST
path: "/cli/auth/approve"
tags: ["public"]
---

# Approve CLI authorization from the web app

`POST /cli/auth/approve`

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

Requires a Better Auth session cookie (not an API key).

## Request body

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

## Response `200`

Approved

- object
  - `success` boolean, required
  - `email` string, required

## Other responses

- `400`: Invalid request body or deviceToken
- `401`: Not signed in
- `403`: Your email address is not verified yet
- `409`: This authorization request was already handled
- `410`: Authorization request not found or expired
- `500`: This account does not have an API key yet

---

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