---
title: 'Create a new question'
description: 'This endpoint allows you to create a new question.'
openapi: POST /api/loyalty/questions
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

`POST /api/loyalty/questions`

`POST https://admin.snagsolutions.io/api/loyalty/questions`

This endpoint allows you to create a new question.

## Authentication

- `apiKeyAuth` — apiKey in header: `X-API-KEY`

## Request body

- Content type: `application/json`
  - request body (object)
    - `loyaltyRuleId` (string, uuid, required) — UUID of the loyalty rule
    - `questionText` (string, required) — The text of the question
    - `allowMultipleAttempts` (boolean, default: false) — Whether the question allows multiple attempts
    - `loyaltyQuestionAnswers` (array, required) — Array of choices for the question
      - `items` (object)
        - `id` (string, uuid) — UUID of the choice (optional for new choices)
        - `text` (string, required) — The text of the choice
        - `isCorrect` (boolean, required) — Whether this choice is correct
        - `sortIdentifier` (number, required) — The order in which to display the choice

## Response 201

201
  - response (object) — Response returned for a question
    - `id` (string, uuid, required)
    - `text` (string, required)
    - `loyaltyQuestionChoices` (array, required)
      - `items` (object)
        - `id` (string, uuid, required)
        - `text` (string, required)
        - `sortIdentifier` (number, required)

## Response 403

403
  - response (object) — Schema for forbidden response
    - `message` (string, required) — Error message

## Response 500

500
  - response (object) — Schema for internal server error response
    - `success` (boolean, required) — Indicates operation success
    - `message` (string, required) — Error message
    - `debugInfo` (string) — Optional debug information


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.snagsolutions.io/api-specs.zip
