> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axle.insure/llms.txt
> Use this file to discover all available pages before exploring further.

# Start Widget

> Generate a widget session. Returns a widgetToken and widgetUri to display Axle's embeddable widget experience to the user. Currently, `validation` is the only supported widget type.



## OpenAPI

````yaml POST /widgets
openapi: 3.0.0
info:
  title: Axle API
  contact: {}
  version: '0.1'
servers:
  - description: Sandbox
    url: https://sandbox.axle.insure
  - description: Production
    url: https://api.axle.insure
    variables: {}
security:
  - ApiKeyAuth: []
paths:
  /widgets:
    post:
      tags:
        - Widgets
      summary: Start Widget
      description: >-
        Generate a widget session. Returns a widgetToken and widgetUri to
        display Axle's embeddable widget experience to the user. Currently,
        `validation` is the only supported widget type.
      operationId: StartWidget
      parameters:
        - $ref: '#/components/parameters/x-client-id'
        - $ref: '#/components/parameters/x-destination-client-id'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                validation:
                  type: object
                  description: Configuration for a validation widget session.
                  properties:
                    enabled:
                      type: boolean
                      description: Set to `true` to start a validation widget session.
                    data:
                      type: object
                      properties:
                        validationResult:
                          type: string
                          description: >-
                            The unique identifier for a validation result,
                            returned as `validationResult` from [Validate
                            Policy](/api-reference/validation/validate-policy).
                      required:
                        - validationResult
                  required:
                    - enabled
                    - data
              required:
                - validation
            example:
              validation:
                enabled: true
                data:
                  validationResult: val_abcdef123456
        required: true
      responses:
        '200':
          headers:
            x-axle-request-id:
              $ref: '#/components/headers/x-axle-request-id'
          description: ''
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/Success'
                  data:
                    type: object
                    required:
                      - widgetToken
                      - widgetUri
                    properties:
                      widgetToken:
                        type: string
                        description: The unique ID for the widget session.
                      widgetUri:
                        type: string
                        description: >-
                          The URL that hosts the widget session. Append `origin`
                          (web) or `redirectUri` (mobile) before rendering. See
                          [Widgets](/guides/widgets) for more details.
                required:
                  - success
                  - data
              example:
                success: true
                data:
                  widgetToken: ey...
                  widgetUri: https://widget.sandbox.axle.insure/?token=ey...
        '400':
          $ref: '#/components/responses/InputValidation'
        '403':
          headers:
            x-axle-request-id:
              $ref: '#/components/headers/x-axle-request-id'
          description: The client does not have access to the requested validation result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Client does not have access to validation result
                      val_abcdef123456.
        '429':
          $ref: '#/components/responses/TooManyRequests'
      deprecated: false
components:
  parameters:
    x-client-id:
      name: x-client-id
      in: header
      required: true
      schema:
        type: string
      description: Your client ID. This will be shared with you during onboarding.
    x-destination-client-id:
      name: x-destination-client-id
      in: header
      required: false
      schema:
        type: string
      description: >-
        The client ID of the destination client. This is optional and only used
        by platform clients. See the [Axle for
        Platforms](/guides/platform-integration) guide for more information.
  headers:
    x-axle-request-id:
      description: >-
        A unique identifier generated per request. Include this value when
        contacting Axle support to help us locate your exact request.
      schema:
        type: string
      example: req_V1StGXR8_Z5jdHi6B-myT
  schemas:
    Success:
      title: Success
      type: boolean
      description: Indicates whether the operation was performed successfully.
      x-internal: false
      example: true
  responses:
    InputValidation:
      headers:
        x-axle-request-id:
          $ref: '#/components/headers/x-axle-request-id'
      description: The request body is invalid. See the error message for details.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: >-
                  Input validation failed due to one or more missing or invalid
                  parameters. Review the request and try again.
    TooManyRequests:
      headers:
        x-axle-request-id:
          $ref: '#/components/headers/x-axle-request-id'
      description: >-
        Rate limit exceeded. This is only to protect Axle systems against errant
        or abnormal request volume. The limit is sufficiently high for all
        normal usage.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Too Many Requests
            required:
              - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your secret API key. This will be shared with you during onboarding and
        should be considered sensitive - it’s a password after all! Your secret
        will be matched with your client ID to authenticate your requests.

````