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

# Create session

`POST /v1/sessions`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/sessions`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/sessions/post.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Create a session to use the Management API endpoints.

Use the value of the `token` property provided in the response as bearer
token in other API calls.

A token is valid for 3 months. In accordance with best pratices, use your
generated token for all your API requests. Do **not** regenerate a token for each request.

This endpoint has a rate limit of 3 to 6 requests per second per account,
depending on your setup.

> [!note]
> Instead of using a session, you can also use the <a href="https://docs.talon.one/docs/product/account/dev-tools/managing-mapi-keys">Management API key feature</a>
> in the Campaign Manager to decide which endpoints can be used with a given key.

## Request body

- LoginParams
  - `email` string, email, required: The email address associated with the user profile.
  - `password` string, required: The password for your account.

## Response `201`

Created

- Session
  - `userId` integer, required: The ID of the user of this session.
  - `token` string, required: The token to use as a bearer token to query Management API endpoints.
  - `created` string, date-time, required: Unix timestamp indicating when the session was first created.

---

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