---
title: "Initialize session"
method: POST
path: "/api/v1/sessions"
tags: ["User Token"]
---

# Initialize session

`POST /api/v1/sessions`

Create a new session and receive a JWT for authenticated API requests.

## Headers

- `x-connect-client-id` string, required
- `Signature` string, required
- `timestamp` string, required

## Request body

- StartSessionRequest
  - `request_id` string — Optional request ID. If not provided, a UUID will be generated automatically
  - `account` Account, required
    - `reference_id` string, required — External reference ID for the account
  - `session` Session, required
    - `metadata` object — Additional session metadata as key-value pairs
    - `withdrawal_details` WithdrawalDetails — Required when scope includes 'user:withdrawal:request'
      - `asset` string, required — The asset to withdraw
      - `network` string, required — The blockchain network for the withdrawal
      - `amount` string, required — The amount to withdraw
      - `account_label` string — Optional label to identify the account
    - `deposit_details` DepositDetails — Optional when scope includes 'user:deposit:send'
      - `account_label` string — Optional label to identify the account
  - `scopes` 'user:deposit:send' | 'user:recovery:send' | 'user:withdrawal:request' — List of scopes for the session

## Response `200`

Session created successfully

- StartSessionResponse
  - `jwt` string, required — JWT token for the created session
  - `expires_in` integer, required — Token expiration time in seconds

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing JWT token
- `403` — Forbidden - Invalid scopes or signature validation failed
- `500` — Internal Server Error

---

[API](https://skmtc.net/zerohash/apis/zerohash-api.md) · [All operations](https://skmtc.net/zerohash/apis/zerohash-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zerohash/zerohash-api/revisions/8b647d934363/schema)
