---
title: "POST /api/v1/auth/cli/exchange"
method: POST
path: "/api/v1/auth/cli/exchange"
tags: ["auth"]
---

# POST /api/v1/auth/cli/exchange

`POST /api/v1/auth/cli/exchange`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/auth/cli/exchange`
- Auth: HTTP bearer

## Request body

- object

## Response `200`

Approved connection

- CliLoginExchange
  - `status` 'complete', required
  - `api_token` string, required
  - `api_base_url` string, uri, required
  - `user` object, required
    - `id` string, required
    - `email` string, required
    - `commit_author_email` string, required
    - `name` string, nullable, required
    - `picture_url` string, nullable, required
  - `organization` CliLoginOrganization, required
    - `id` string, required
    - `slug` string, required
    - `name` string, required

## Other responses

- `202`: Waiting for browser approval
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable entity
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
