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

# Link History

> returns history data of a users account linking history



## OpenAPI

````yaml GET /database/linkhistory
openapi: 3.0.3
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://api.s15x.dev
    description: s15x api url
security: []
tags:
  - name: purchase-api
  - name: account links
  - name: users
  - name: public
paths:
  /database/linkhistory:
    get:
      tags:
        - account links
      summary: Link history for a user
      description: returns history data of a users account linking history
      operationId: linkHistoryForAUser
      parameters:
        - in: header
          name: x-type
          required: true
          style: simple
          description: which type of user id will you be passing
          explode: false
          schema:
            type: string
            enum:
              - roblox
              - discord
          allowReserved: false
        - in: header
          name: x-discord-id
          required: false
          style: simple
          description: discord id
          explode: false
          schema:
            type: string
          allowReserved: false
        - in: header
          name: x-roblox-id
          required: false
          style: simple
          description: roblox id
          explode: false
          schema:
            type: string
          allowReserved: false
      responses:
        '200':
          description: >-
            The request was successful, and the server has returned the
            requested resource in the response body.
          content:
            application/json:
              schema:
                type: object
                required:
                  - history
                properties:
                  history:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - discord_id
                        - roblox_id
                        - action
                        - timestamp
                      properties:
                        id:
                          type: string
                        discord_id:
                          type: string
                        roblox_id:
                          type: string
                        action:
                          type: string
                          enum:
                            - linked
                            - account_deleted
                            - unlinked
                        timestamp:
                          type: string
                          description: time of entry
        '400':
          description: >-
            The server could not understand the request due to invalid syntax.
            The client should modify the request and try again.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    example: 'Bad Request: Missing Roblox ID'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            The server cannot find the requested resource. The endpoint may be
            invalid or the resource may no longer exist.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    example: >-
                      Not Found: No link history found for the provided Discord
                      ID
        '500':
          description: >-
            The server encountered an unexpected condition that prevented it
            from fulfilling the request. Report the issue to the support team if
            it persists.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    example: Internal Server Error
      security:
        - API-Authorization: []
components:
  responses:
    Forbidden:
      description: >-
        The server understood the request, but refuses to authorize it. Ensure
        the client has appropriate permissions.
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
                example: 'Forbidden: Invalid API Key'
  securitySchemes:
    API-Authorization:
      type: apiKey
      name: API-Authorization
      in: header
      description: 'Required: API key to access'

````