---
title: "Create a session ie. log in."
method: POST
path: "/sessions"
tags: ["Users"]
---

# Create a session ie. log in.

`POST /sessions`

## Request body

- object
  - `user` string
  - `password` string
  - `method` string
  - `oidc_provider` string

## Response `201`

Successfully created session.

- Session
  - `id` integer
  - `token` string

## Changes

> 50 revisions in range; 1 could not be searched.

- **2022-10-28** `20aeffef5430` — 2 info
  - added the new optional request property `method`
  - added the new optional request property `oidc_provider`
- **2021-02-04** `fabb51bb374a` — 1 info
  - endpoint added
- **2021-01-31** `6dffc3a4de00` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/kraken-ci/apis/server-api/changes/sessions/post.md)

---

[API](https://skmtc.dev/kraken-ci/apis/server-api.md) · [All operations](https://skmtc.dev/kraken-ci/apis/server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kraken-ci/server-api/revisions/1f2ae877f985/schema)
