---
title: "Create an account session"
method: POST
path: "/account-sessions"
tags: ["Account Sessions"]
---

# Create an account session

`POST /account-sessions`

## Request

- Base URL: `https://api-staging.fanheroapi.com`
- URL: `https://api-staging.fanheroapi.com/account-sessions`
- Auth: API key in header `apiKey`

## Request body

- CreateAccountSessionInput
  - `account` ObjectId, required
  - `id_token` string, required: The JWT token for authentication
  - `refresh_token` string, required: Refresh JWT token. By default, same as `id_token`.
  - `expires_in` number, required: Number of seconds after wich the session expires. By default, equal to 3600 seconds.
  - `auth_provider` string, required: The name of the website used to sign in if the user didn't log in through FanHero.

## Response `201`

Account session created

- object

---

[API](https://skmtc.dev/fanhero/apis/user-management-endpoints.md) - [All operations](https://skmtc.dev/fanhero/apis/user-management-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/fanhero/apis/user-management-endpoints/revisions/3f982670c057?raw)
