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

# Select winning A/B test variation

> Manually selects the winning variation for an A/B test broadcast. The winning variation will be sent to the remaining audience. This endpoint is restricted in demo mode.



## OpenAPI

````yaml /openapi.json post /api/broadcasts.selectWinner
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/broadcasts.selectWinner:
    post:
      summary: Select winning A/B test variation
      description: >-
        Manually selects the winning variation for an A/B test broadcast. The
        winning variation will be sent to the remaining audience. This endpoint
        is restricted in demo mode.
      operationId: selectBroadcastWinner
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectWinnerRequest'
      responses:
        '200':
          description: Winner selected successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
        '400':
          description: Bad request - validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Failed to select winner
      security:
        - BearerAuth: []
components:
  schemas:
    SelectWinnerRequest:
      type: object
      required:
        - workspace_id
        - id
        - template_id
      properties:
        workspace_id:
          type: string
          description: The ID of the workspace
          example: ws_1234567890
        id:
          type: string
          description: ID of the broadcast
          example: broadcast_12345
        template_id:
          type: string
          description: Template ID of the winning variation
          example: template_variant_a
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````