---
title: "CLI Auth - Initiate"
method: POST
path: "/api/cli/auth/initiate"
tags: ["Authentication"]
---

# CLI Auth - Initiate

`POST /api/cli/auth/initiate`

## Request

- Base URL: `https://flowdot.ai/api`
- URL: `https://flowdot.ai/api/api/cli/auth/initiate`
- Auth: none declared

Start the CLI device authorization flow. Returns an auth URL for the user to visit and confirm in their browser.

## Request body

- object
  - `device_name` string: Optional device identifier

## Response `200`

Successful response

- object
  - `data` object
    - `auth_url` string: URL for user to visit
    - `auth_token` string: Token to poll for completion
    - `expires_at` string, date-time
  - `success` boolean

---

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