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

# Sign in

> Create a new user account.



## OpenAPI

````yaml post /sign-in
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:
  /sign-in:
    post:
      tags:
        - Account
      summary: Sign in
      description: Create a new user account.
      operationId: post-sign-in
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  userID: user123
                  rawAccessToken: test
                  accessToken: duh32*£dh
                  idToken: eu26bdj7s...
              required:
                - userID
                - rawAccessToken
                - accessToken
                - idToken
              properties:
                userID:
                  type: string
                  example: user1
                  description: A unique identifier to be assigned to the new user.
                rawAccessToken:
                  type: string
                  example: test
                  description: The raw access token to use to authenticate the Alpha
                accessToken:
                  type: string
                  example: duh32*£dh
                  description: The hashed version of the rawAccessToken
                idToken:
                  type: string
                  example: eu26bdj7s...
                  description: The ID Token provided by firebase authentication
      responses:
        '200':
          description: Sign-in successful, returns a JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  token:
                    type: string
                    description: The generated JWT token for the user
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        '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: {'userID': '',
                      'rawAccessToken': '', 'accessToken': '', 'idToken': ''}
                properties:
                  error:
                    type: string
                    description: >-
                      Describes the nature of the error and provides a possible
                      solution.
                    example: >-
                      Your supplied json keys do not match the expected format.
                      The request should be in the format: {'userID': '',
                      'rawAccessToken': '', 'accessToken': '', 'idToken': ''}
        '403':
          description: Forbidden, user does not exist or token mismatch
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User ID does not match token.
        '500':
          description: Internal server error, JWT encoding failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: JWT encoding failed due to an unexpected error

````