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

# Create Quest

> Create a new quest and add the user as a participant(owner from the quest).



## OpenAPI

````yaml post /create-quest
openapi: 3.1.0
info:
  title: DolphinFlashcardApp API
  version: '1.0'
  summary: Manage flashcards
  description: >-
    Set up user accounts, create or manage flashcards, set learning goals, and
    track performances with user's heatmap and streak data. Data is available in
    JSON format only. <br></br>**Note**: All parameters are case-sensitive.
    Request body parameters are required, but the query parameters are
    optional. 
  contact:
    name: Dolphin Flashcards
    url: https://dolphinflashcards.com/contact
    email: dolphinflashcards@outlook.com
  license:
    name: MIT
    url: https://github.com/jacob-macleod/Dolphin-Flashcard-App/blob/main/LICENSE
servers:
  - url: http://dolphinflashcards.com/api
    description: baseurl
security: []
tags:
  - name: Account
    description: Groups the endpoints required to create an account.
  - name: Card management
    description: Groups the endpoints required to create and manage flashcards.
  - name: Goal
    description: Groups the endpoints required to create and manage goals.
  - name: Statistics
    description: Groups the endpoints required to track heatmap and streak.
paths:
  /create-quest:
    post:
      tags:
        - Quests
      summary: Create Quest
      description: >-
        Create a new quest and add the user as a participant(owner from the
        quest).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jwtToken
                - deadline
                - questType
                - questSubType
                - quantity
              properties:
                jwtToken:
                  type: string
                  description: JWT token for authentication.
                deadline:
                  type: string
                  format: date-time
                  description: Deadline for the quest (ISO format).
                questType:
                  type: string
                  enum:
                    - cards_revised
                    - xp_gained
                    - time_spent
                  description: Type of quest.
                questSubType:
                  type: string
                  enum:
                    - monthly
                    - friend
                  description: Sub type of quest.
                quantity:
                  type: integer
                  description: The target quantity for the quest.
      responses:
        '200':
          description: Quest created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Quest created successfully
                  quest:
                    type: object
                    properties:
                      quest_id:
                        type: string
                      title:
                        type: string
                      deadline:
                        type: string
                        format: date-time
                      quest_type:
                        type: string
                      quest_sub_type:
                        type: string
                      quantity:
                        type: integer
                      progress:
                        type: integer
                      participants:
                        type: array
                        items:
                          type: object
                          properties:
                            user_id:
                              type: string
                            status:
                              type: string
                            progress:
                              type: integer
                            isOwner:
                              type: boolean
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Deadline datetime must not be in the past
        '422':
          description: Unprocessable Content.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'quest_type: "example" is not accepted'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string

````