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

# End a raffle early

> Closes entries immediately and draws provisional winners (raffles left running draw automatically at `ends_at`). Review them with the winner endpoints, then confirm to complete the raffle.



## OpenAPI

````yaml /openapi/v1.yaml post /api/v1/raffles/{id}/end
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}/end:
    post:
      tags:
        - Raffles
      summary: End a raffle early
      description: >-
        Closes entries immediately and draws provisional winners (raffles left
        running draw automatically at `ends_at`). Review them with the winner
        endpoints, then confirm to complete the raffle.
      operationId: endRaffle
      parameters:
        - $ref: '#/components/parameters/ResourceId'
      responses:
        '200':
          description: Raffle ended
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope'
components:
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
        data:
          type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key from the Rigaly dashboard: `Authorization: Bearer rgly_sk_...`'

````