---
title: "Create session"
method: POST
path: "/widgets/kyc/sessions"
tags: ["KYC"]
---

# Create session

`POST /widgets/kyc/sessions`

## Request

- Base URL: `https://api.enterprise.sandbox.uphold.com`
- URL: `https://api.enterprise.sandbox.uphold.com/widgets/kyc/sessions`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/core/oauth2/token` scopes: `widgets.kyc.sessions:create`
- TypeScript: <https://skmtc.dev/uphold/apis/widget-api/docs/widgets/kyc/sessions/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new session for the KYC Widget.

## Headers

- `X-On-Behalf-Of` string
- `X-Uphold-User-Ip` union
  - string, ipv4
  - string, ipv6
- `X-Uphold-User-Agent` string
- `X-Uphold-User-Origin` string
- `X-Uphold-User-Country` string
- `X-Uphold-User-Subdivision` string
- `X-Uphold-User-City` string

## Request body

- object
  - `flow` 'verify', required: The flow of the KYC widget session.
  - `processes` string[]: The KYC processes to include in the session. Defaults to all widget-supported processes with the 'uphold-verified' model.
  - `options` object: Additional options for the widget session.

## Response `201`

Session created.

- object
  - `session` KycWidgetSession, required
    - `flow` 'verify', required: The flow of the KYC widget session.
    - `data` object, required: Additional data associated with the session.
      - `processes` string[], required: The list of KYC processes included in the session.
    - `url` string, uri, required: The URL of the widget session that should be opened.
    - `token` string, required: The token identifying the authenticated user.

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `409`: Business logic error.
- `429`: Too Many Requests.

---

[API](https://skmtc.dev/uphold/apis/widget-api.md) - [All operations](https://skmtc.dev/uphold/apis/widget-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uphold/apis/widget-api/revisions/107ea0536686?raw)
