---
search:
  tags:
    - Challenges
    - POST
seo:
  description: >-
    Create a challenge. Reference for the POST /api/admin/challenges endpoint in
    the Athena Jeopardy Admin API.
sidebar:
  label: Create a challenge
  badge: POST
title: Create a challenge
type: openapi-operation
---
`POST /api/admin/challenges`

**Request body** (`application/json`, required)

- `title` (string, required)
- `categoryId` (string, required)
- `difficultyId` (string, required)
- `description` (string, required)
- `points` (number, required)
- `maxAttempts` (number | null, required)
- `userSolvesVisible` (boolean)
- `scoringType` (string)
- `initialPoints` (number | null)
- `minimumPoints` (number)
- `decayFactor` (number)
- `dynamicFlag` (boolean)
- `containerSpec` (object | null)
- `hints` (object[], required)
- `files` (object[], required)
- `flag` (object)
- `prerequisites` (string[], required)

Request body example:

```json
{
  "title": "string",
  "categoryId": "string",
  "difficultyId": "string",
  "description": "string",
  "points": 0,
  "maxAttempts": 0,
  "userSolvesVisible": true,
  "scoringType": "static",
  "initialPoints": 0,
  "minimumPoints": 0,
  "decayFactor": 0,
  "dynamicFlag": true,
  "containerSpec": {
    "size": "s",
    "services": [
      {
        "name": "string",
        "image": "string",
        "command": [
          "string"
        ],
        "environment": {
          "property1": "string",
          "property2": "string"
        },
        "ports": [
          {
            "port": 1,
            "kind": "web"
          }
        ]
      }
    ]
  },
  "hints": [
    {
      "content": "string",
      "penaltyPoints": 0
    }
  ],
  "files": [
    {
      "id": "string",
      "filename": "string",
      "size": 0
    }
  ],
  "flag": {
    "flagType": "static",
    "flagContent": "string",
    "caseSensitive": true
  },
  "prerequisites": [
    "string"
  ]
}
```

**Responses**

- `200` — Success
- `400` — Bad request
- `401` — Unauthorized
- `422` — Validation failed
- `429` — Too many requests
- `500` — Unhandled server error

Response example, 200:

```json
{
  "id": "string",
  "points": 0,
  "title": "string",
  "description": "string",
  "containerSpec": {
    "services": [
      {
        "name": "string",
        "image": "string",
        "command": [
          "string"
        ],
        "environment": {
          "property1": "string",
          "property2": "string"
        },
        "ports": [
          {
            "port": 0,
            "kind": "tcp"
          }
        ]
      }
    ],
    "size": "xl"
  },
  "categoryId": "string",
  "difficultyId": "string",
  "maxAttempts": 0,
  "userSolvesVisible": true,
  "scoringType": "static",
  "initialPoints": 0,
  "minimumPoints": 0,
  "decayFactor": 0,
  "dynamicFlag": true,
  "releaseAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "status": "hidden",
  "createdBy": "string"
}
```
