---
title: "Create a Widget session token"
method: POST
path: "/v1/bridge/initialize"
tags: ["Bridge"]
---

# Create a Widget session token

`POST /v1/bridge/initialize`

Use this endpoint to generate a session token for use in the Bridge widget.

## Headers

- `Straddle-Account-Id` string, uuid
- `Request-Id` string
- `Correlation-Id` string
- `Idempotency-Key` string

## Request body

- CreateBridgeTokenV1Request
  - `customer_id` string, uuid, required — The Straddle generated unique identifier of the `customer` to create a bridge token for.
  - `config` PaykeyConfigurationV1
    - `sandbox_outcome` 'standard' | 'active' | 'rejected' | 'review'
    - `processing_method` 'inline' | 'background' | 'skip'
  - `external_id` string, nullable — Unique identifier for the paykey in your database, used for cross-referencing between Straddle and your systems.

## Response `201`

Created

- BridgeTokenV1ItemResponse
  - `meta` ResponseMetadata, required — Metadata about the API request, including an identifier and timestamp.
    - `api_request_id` string, uuid, required — Unique identifier for this API request, useful for troubleshooting.
    - `api_request_timestamp` string, date-time, required — Timestamp for this API request, useful for troubleshooting.
  - `response_type` 'object' | 'array' | 'error' | 'none', required — Indicates the structure of the returned content. - "object" means the `data` field contains a single JSON object. - "array" means the `data` field contains an array of objects. - "error" means the `data` field contains an error object with details of the issue. - "none" means no data is returned.
  - `data` BridgeTokenV1, required
    - `bridge_token` string, required — JWT Token to use in the bridge widget.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Validation Failed
- `500` — Server Error

---

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