---
title: "Create session"
method: POST
path: "/auth/sessions"
tags: ["Sessions"]
---

# Create session

`POST /auth/sessions`

Create a new session for a given user. This will return a refresh token that can be used to impersonate the user.

## Request body

- object
  - `user_id` string, required — The ID of the user, or the special value `me` for the currently authenticated user
  - `expires_in_millis` number
  - `is_impersonation` boolean

## Response `200`

Successful response

- object
  - `refresh_token` string, required
  - `access_token` string, required

---

[API](https://skmtc.net/hexclave/apis/hexclave-rest-api-3.md) · [All operations](https://skmtc.net/hexclave/apis/hexclave-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api-3/revisions/9b9326fe08a5/schema)
