---
title: "Create session"
method: POST
path: "/widgets/travel-rule/sessions"
tags: ["Travel rule"]
---

# Create session

`POST /widgets/travel-rule/sessions`

## Request

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

Create a new session for the Travel Rule 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

- union
  - object
    - `flow` 'deposit-form', required: The flow of the Travel Rule widget session.
    - `data` object, required: The data for the deposit form flow.
      - `transactionId` string, uuid: The transaction id to create the session for.
    - `options` object: Additional options for the widget session.
  - object
    - `flow` 'withdrawal-form', required: The flow of the Travel Rule widget session.
    - `data` object, required: The data for the withdrawal form flow.
      - `quoteId` string, uuid: The quote id to create the session for.
    - `options` object: Additional options for the widget session.

## Response `201`

Session created.

- object
  - `session` TravelRuleWidgetSession, required
    - `flow` 'deposit-form' | 'withdrawal-form', required: The flow of the Travel Rule widget session.
    - `url` string, uri, required: The URL of the widget session that should be opened.
    - `token` string, required: The token identifying the authenticated user.
    - `data` object, required
      - `provider` 'notabene', required: The provider of the Travel Rule service.
      - `parameters` object, required: The parameters for the Travel Rule provider.
        - `init` object, required: The configuration options.
          - `authToken` string, required: The authentication token.
          - `nodeUrl` string, required: The node URL.
        - `options` object, required: The transaction options.
        - `transaction` object, required: The transaction details.
      - `requestForInformation` object: The associated Travel Rule request for information.
        - `id` string, uuid, required: The request for information id.

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Resource not found.
- `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)
