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

# Create session

`POST /v1/sessions`

Create a temporary session to delegate permissions to a third-party.

## Parameters

- `#/paths/~1v1~1api_keys/get/parameters/0` — unresolved $ref

## Request body

- Data — unresolved $ref

## Response `200`

OK

- object
  - `status` Status — unresolved $ref
  - `data` object
    - `session_id` string — The unique session identifier. Prefix is "ses" in production and "sbx_ses" in sandbox.
    - `session_key` string — The Session Key to be passed to the API
    - `statements` object[] — Array of valid statements. See the [session guide](https://docs.rainforestpay.com/docs/component-sessions) on how to define statements.
      - `permissions` string[], required — Array of valid permissions, defined by a `group` or `resource:action`
      - `constraints` object, required — Restrictions on actions allowed based on specific context of a resource.
    - `ttl` number — The number of seconds before the session expires.
    - `expires_at` string — The timestamp the session expires.
  - `errors` Errors — unresolved $ref

## Other responses

- `400` — unresolved $ref
- `401` — unresolved $ref
- `403` — unresolved $ref
- `5XX` — unresolved $ref

---

[API](https://skmtc.dev/rainforestpay/apis/authentication.md) · [All operations](https://skmtc.dev/rainforestpay/apis/authentication/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rainforestpay/authentication/revisions/529a0dab0f90/schema)
