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

# Manually set a winner

> Sets a specific entry as the winner for this slot ("pick a winner"). The entry id comes from the entries endpoint.



## OpenAPI

````yaml /openapi/v1.yaml put /api/v1/raffles/{id}/winners/{slot}
openapi: 3.1.0
info:
  title: Rigaly Business API
  version: '1.0'
  description: |
    Public API for businesses to manage their Rigaly loyalty programs: issue
    and redeem points, manage rewards, validate redemptions, and generate mass
    codes for physical products.

    All endpoints require an API key created in the Rigaly business dashboard
    (Tools → API Management), passed as `Authorization: Bearer rgly_sk_...`.
  contact:
    email: support@rigaly.com
servers:
  - url: https://api.rigaly.com
    description: Production
security:
  - apiKey: []
paths:
  /api/v1/raffles/{id}/winners/{slot}:
    put:
      tags:
        - Raffles
      summary: Manually set a winner
      description: >-
        Sets a specific entry as the winner for this slot ("pick a winner"). The
        entry id comes from the entries endpoint.
      operationId: setRaffleWinnerManually
      parameters:
        - $ref: '#/components/parameters/ResourceId'
        - $ref: '#/components/parameters/WinnerSlot'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - entry_id
              properties:
                entry_id:
                  type: string
                  format: uuid
      responses:
        '200':
          description: Winner set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    WinnerSlot:
      name: slot
      in: path
      required: true
      description: Winner slot number (1..winners_count)
      schema:
        type: integer
        minimum: 1
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
        data:
          type: object
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
  responses:
    BadRequest:
      description: Validation or business-rule error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            error:
              message: Provide exactly one of "user_id" or "identifier"
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key from the Rigaly dashboard: `Authorization: Bearer rgly_sk_...`'

````