---
title: "Start an authorization session"
method: POST
path: "/v1/fleet/auth-sessions"
tags: ["fleet auth"]
---

# Start an authorization session

`POST /v1/fleet/auth-sessions`

Initiates an OAuth flow for the caller. If the user is already authorized, returns a completed session that references an existing token. Otherwise, returns a pending session containing a verification URL the user must visit to complete authorization.

## Request body

- AuthCreateSessionRequest
  - `agent_id` string
  - `is_default` boolean
  - `provider_id` string
  - `scopes` string[]
  - `strategy` 'REUSE' | 'CREATE'
  - `token_id` string

## Response `200`

Existing token reused; no new session created.

- AuthCreateSessionResponse
  - `id` string
  - `metadata` object
  - `provider_id` string
  - `status` 'PENDING' | 'COMPLETED' | 'CONNECTION_REQUIRED' | 'TOKEN_EXPIRED'
  - `token` string
  - `verification_url` string

## Other responses

- `201` — New pending session created; visit verification_url to complete.
- `400` — Bad Request
- `401` — Unauthorized
- `502` — Bad Gateway

---

[API](https://skmtc.net/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
