---
title: Admin Auth API
path: reference/api/admin-auth
status: published
---

# Admin Auth API

Reference for the `Admin Auth` endpoint group — 4 endpoints.

Generated from the live OpenAPI spec. Re-run `_generate_api_reference.py` after backend changes.

## Authentication

All endpoints require a Bearer JWT in the `Authorization` header unless noted otherwise. See [Concepts → Tokens and scopes](/docs/scaikey/concepts/tokens-and-scopes) and [Reference → OAuth endpoints](/docs/scaikey/reference/oauth-endpoints) for how to obtain one.

## Endpoints

### **POST** `/api/v1/admin/auth/login`

_Admin Login_

Login to the admin panel.

**Request body:**

Required.

- `application/json` → [`scaikey__api__v1__admin__auth__LoginRequest`](#schema-scaikey-api-v1-admin-auth-loginrequest)

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`scaikey__api__v1__admin__auth__LoginResponse`](#schema-scaikey-api-v1-admin-auth-loginresponse) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **POST** `/api/v1/admin/auth/logout`

_Admin Logout_

Logout from admin panel.

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → object |

---

### **GET** `/api/v1/admin/auth/me`

_Admin Me_

Get current admin user info from token.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `authorization` | header | no | `string` \| `null` |  |

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → object |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **POST** `/api/v1/admin/auth/refresh`

_Admin Refresh_

Refresh access token.

**Request body:**

Required.

- `application/json` → [`scaikey__api__v1__me__auth__RefreshRequest`](#schema-scaikey-api-v1-me-auth-refreshrequest)

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`scaikey__api__v1__me__auth__RefreshResponse`](#schema-scaikey-api-v1-me-auth-refreshresponse) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

## Schemas

Definitions for every type referenced by the endpoints above. Schema-to-schema references on this page link within the page; cross-page references would require visiting the linked page.

### `HTTPValidationError`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | array of [`ValidationError`](#schema-validationerror) | no |  |

### `ValidationError`

| Field | Type | Required | Description |
|---|---|---|---|
| `loc` | array of `string` \| `integer` | yes |  |
| `msg` | `string` | yes |  |
| `type` | `string` | yes |  |

### `scaikey__api__v1__admin__auth__LoginRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | `string` (`email`) | yes |  |
| `password` | `string` | yes |  |

### `scaikey__api__v1__admin__auth__LoginResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `access_token` | `string` | yes |  |
| `refresh_token` | `string` | yes |  |
| `user` | object | yes |  |

### `scaikey__api__v1__me__auth__RefreshRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `refresh_token` | `string` | yes |  |

### `scaikey__api__v1__me__auth__RefreshResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `access_token` | `string` | yes |  |
| `refresh_token` | `string` \| `null` | no |  |
