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

# Edit Card Goal

> Edit an existing card goal for the user.



## OpenAPI

````yaml post /edit-card-goal
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:
  /edit-card-goal:
    post:
      tags:
        - Goal
      summary: Edit Card Goal
      description: Edit an existing card goal for the user.
      operationId: post-edit-card-goal
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  jwtToken: >-
                    eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImEzMmZkZDRiMTQ2Njc3NzE5YWIyMzcyODYxYmRlZDg5In0.eyJpc3MiOiJodHRwOi8vZG9scGhpbmZsYXNoY2FyZHMuY29tIiwiYXVkIjoiYXBpIiwic3ViIjoidU5RR2lIencxdk9EaExybTVDRWtaQ1ZoTU93MSIsImFjY2Vzc190b2tlbiI6IjRiZTA2NDNmLTFkOTgtNTczYi05N2NkLWNhOThhNjUzNDdkZCIsImFjY2Vzc190b2tlbl9yYXciOiJ0ZXN0IiwiaWF0IjoxNzI2Nzc0MTYzfQ.F-fxFitPQF-gGHyhGPGxE_zj_b8XJybqe4J_iYG66BC4Dqm4LTb8RpcDLyYUhRCcpphihpWGbdp
                  goalID: >-
                    58748748168480479028433924465493243860761911102946223297681236368808083325563
                  newEndDate: 30/07/2024
                  newTitle: Updated Goal
                  newCardsToRevise: 8
              required:
                - jwtToken
                - goalID
                - newEndDate
                - newTitle
                - newCardsToRevise
              properties:
                jwtToken:
                  type: string
                  description: 'Stores the user who is editing their card goal.  '
                  example: >-
                    eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImEzMmZkZDRiMTQ2Njc3NzE5YWIyMzcyODYxYmRlZDg5In0.eyJpc3MiOiJodHRwOi8vZG9scGhpbmZsYXNoY2FyZHMuY29tIiwiYXVkIjoiYXBpIiwic3ViIjoidU5RR2lIencxdk9EaExybTVDRWtaQ1ZoTU93MSIsImFjY2Vzc190b2tlbiI6IjRiZTA2NDNmLTFkOTgtNTczYi05N2NkLWNhOThhNjUzNDdkZCIsImFjY2Vzc190b2tlbl9yYXciOiJ0ZXN0IiwiaWF0IjoxNzI2Nzc0MTYzfQ.F-fxFitPQF-gGHyhGPGxE_zj_b8XJybqe4J_iYG66BC4Dqm4LTb8RpcDLyYUhRCcpphihpWGbdp
                goalID:
                  type: string
                  description: >-
                    A unique identifier or key associated with the card goal
                    being edited.
                  example: >-
                    11110748168480479028433924465493243860761911102946223297681236368808083322222
                newEndDate:
                  type: string
                  description: 'The new end date for the card goal, in `dd/mm/yyyy` format. '
                  example: 30/07/2024
                newTitle:
                  type: string
                  description: The new title assigned to the card goal.
                  example: Updated Goal
                newCardsToRevise:
                  type: string
                  description: >-
                    Specifies the updated number of cards the user intends to
                    revise for this goal. 
                  example: '4'
            examples:
              Example 1:
                value:
                  jwtToken: >-
                    eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImEzMmZkZDRiMTQ2Njc3NzE5YWIyMzcyODYxYmRlZDg5In0.eyJpc3MiOiJodHRwOi8vZG9scGhpbmZsYXNoY2FyZHMuY29tIiwiYXVkIjoiYXBpIiwic3ViIjoidU5RR2lIencxdk9EaExybTVDRWtaQ1ZoTU93MSIsImFjY2Vzc190b2tlbiI6IjRiZTA2NDNmLTFkOTgtNTczYi05N2NkLWNhOThhNjUzNDdkZCIsImFjY2Vzc190b2tlbl9yYXciOiJ0ZXN0IiwiaWF0IjoxNzI2Nzc0MTYzfQ.F-fxFitPQF-gGHyhGPGxE_zj_b8XJybqe4J_iYG66BC4Dqm4LTb8RpcDLyYUhRCcpphihpWGbdp
                  goalID: goal1
                  newEndDate: 30/07/2024
                  newTitle: title1
                  newCardsToRevise: '4'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    success: Goal updated successfully
                properties:
                  success:
                    type: string
                    example: Goal updated successfully
                    description: >-
                      Provides additional information confirming that the
                      request was successful.
        '400':
          description: >-
            A bad request error. Returned when the request body parameters are
            not in the expected JSON format.
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    error: >-
                      Your supplied json keys do not match the expected format.
                      The request should be in the format: {'jwtToken': '',
                      'goalID': '', 'newEndDate': '', 'newTitle': '',
                      'newCardsToRevise': ''}
                properties:
                  error:
                    type: string
                    example: >-
                      Your supplied json keys do not match the expected format.
                      The request should be in the format: {'jwtToken': ' ',
                      'goalID': ' ', 'newEndDate': '', 'newTitle': ' ',
                      'newCardsToRevise': ' '}
                    description: >-
                      Describes the nature of the error and provides a possible
                      solution.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    error: Goal not found
                properties:
                  error:
                    type: string
                    example: Goal not found
                    description: Describes the nature of the error.

````