---
title: "Creating Rest API session"
method: POST
path: "/sessions"
tags: ["Authentication"]
---

# Creating Rest API session

`POST /sessions`

On success server will set cookie session_handle and json with session GUID and server version. When performing subsequent requests, session GUID should be provided in `Session-Id:` field of request's header or the cookie should be passed.

## Request body

- object
  - `login` string
  - `password` string

## Response `200`

OK

- object

## Changes

- **2023-02-23** `9c09a2aad349` — 1 breaking, 4 warning, 3 info
  - request body became required
  - the optional response header `Session-Id` removed for the status `200`
  - removed the request property `attachNotificationHandler`
  - removed the optional property `session` from the response with the `200` status
  - …4 more

[Change history](https://skmtc.dev/netxms/apis/netxms-rest-api/changes/sessions/post.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-rest-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netxms/netxms-rest-api/revisions/9c09a2aad349/schema)
