> ## 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.

# Get A/B test results

> Retrieves the performance metrics for all variations in an A/B test broadcast.



## OpenAPI

````yaml /openapi.json get /api/broadcasts.getTestResults
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.getTestResults:
    get:
      summary: Get A/B test results
      description: >-
        Retrieves the performance metrics for all variations in an A/B test
        broadcast.
      operationId: getBroadcastTestResults
      parameters:
        - name: workspace_id
          in: query
          required: true
          schema:
            type: string
          description: The ID of the workspace
          example: ws_1234567890
        - name: id
          in: query
          required: true
          schema:
            type: string
          description: The ID of the broadcast
          example: broadcast_12345
      responses:
        '200':
          description: Test results retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestResultsResponse'
        '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 get test results
      security:
        - BearerAuth: []
components:
  schemas:
    TestResultsResponse:
      type: object
      properties:
        broadcast_id:
          type: string
          description: ID of the broadcast
          example: broadcast_12345
        status:
          type: string
          description: Current broadcast status
          example: testing
        test_started_at:
          type: string
          format: date-time
          nullable: true
          description: When the test started
        test_completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the test completed
        variation_results:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/VariationResult'
          description: Results for each variation, keyed by template_id
        recommended_winner:
          type: string
          nullable: true
          description: Recommended winning template ID based on metrics
          example: template_variant_a
        winning_template:
          type: string
          nullable: true
          description: Selected winning template ID
          example: template_variant_a
        is_auto_send_winner:
          type: boolean
          description: Whether winner will be automatically sent
          example: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    VariationResult:
      type: object
      properties:
        template_id:
          type: string
          description: Template ID for this variation
          example: template_variant_a
        template_name:
          type: string
          description: Template name
          example: Variation A
        recipients:
          type: integer
          description: Total sent emails
          example: 1000
        delivered:
          type: integer
          description: Total delivered emails
          example: 980
        opens:
          type: integer
          description: Number of opens
          example: 450
        clicks:
          type: integer
          description: Number of clicks
          example: 120
        open_rate:
          type: number
          format: float
          description: Open rate (opens / recipients)
          example: 0.45
        click_rate:
          type: number
          format: float
          description: Click rate (clicks / recipients)
          example: 0.12
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````