---
title: "Create Session with Session Token"
method: POST
path: "/api/v1/sessions"
tags: ["Session"]
---

# Create Session with Session Token

`POST /api/v1/sessions`

## Request

- Base URL: `https://your-subdomain.okta.com`
- URL: `https://your-subdomain.okta.com/api/v1/sessions`
- Auth: API key in header `Authorization`

Creates a new session for a user with a valid session token. Use this API if, for example, you want to set the session cookie yourself instead of allowing Okta to set it, or want to hold the session ID in order to delete a session via the API instead of visiting the logout URL.

## Request body

- CreateSessionRequest
  - `sessionToken` string

## Response `200`

Success

- Session
  - `_links` object
  - `amr` SessionAuthenticationMethod[]
  - `createdAt` string, date-time
  - `expiresAt` string, date-time
  - `id` string
  - `idp` SessionIdentityProvider
    - `id` string
    - `type` 'ACTIVE_DIRECTORY' | 'LDAP' | 'OKTA' | 'FEDERATION' | 'SOCIAL'
  - `lastFactorVerification` string, date-time
  - `lastPasswordVerification` string, date-time
  - `login` string
  - `status` 'ACTIVE' | 'MFA_ENROLL' | 'MFA_REQUIRED'
  - `userId` string

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/okta/apis/okta-api.md) - [All operations](https://skmtc.dev/okta/apis/okta-api/llms.txt) - [OpenAPI document](https://skmtc.dev/okta/apis/okta-api/revisions/7e5249c30571?raw)
