Widgets

Create Widget Session

Creates a new widget session that can be used to authenticate and interact with Accrue widgets. The session token returned should be passed to the widget for authentication.

post/api/v1/widgets/session

Request

Headers

Client-IDstring uuid required

The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.

Example:123e4567-e89b-12d3-a456-426614174000
Authorizationstring uuid required

Secure secret to access privileged endpoints.

Example:Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef

Request body

Example request

{
  "data": {
    "attributes": {
      "widgetType": "PaymentMethods"
    }
  }
}

Response

Widget session created successfully

Example response

{
  "data": {
    "attributes": {
      "sessionToken": "wgt_session_1234567890abcdef",
      "createdAt": "2025-01-15T10:30:00.000Z"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.