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

# Update Discord ID

> Updates the Discord ID linked to a Roblox account in a specific guild.



## OpenAPI

````yaml /api/openapi.json put /api/v1/link/update-discord
openapi: 3.1.0
info:
  title: Dock API
  description: >-
    API for managing links between Roblox and Discord accounts, including
    mapping, updating, removing links, and resetting the custom database.
  version: 1.0.0
servers:
  - url: https://api.docksys.xyz
security:
  - bearerAuth: []
paths:
  /api/v1/link/update-discord:
    put:
      summary: Update Discord ID
      description: Updates the Discord ID linked to a Roblox account in a specific guild.
      parameters:
        - name: oldDiscordId
          in: query
          required: true
          schema:
            type: string
          description: The old Discord user ID.
        - name: newDiscordId
          in: query
          required: true
          schema:
            type: string
          description: The new Discord user ID.
        - name: guildId
          in: query
          required: true
          schema:
            type: string
          description: The Discord guild ID.
      responses:
        '200':
          description: Discord ID updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateResponse'
              example:
                status: 200
                message: Discord ID updated successfully
                data:
                  discordId: '67890'
                  robloxId: '12345'
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                requestsRemaining: 499
                ipRequestsRemaining: 499
        '400':
          description: Missing required parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 400
                error: >-
                  Missing required parameters: oldDiscordId, newDiscordId,
                  guildId
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                requestsRemaining: 499
                ipRequestsRemaining: 499
        '401':
          description: 'Unauthorized: Missing or invalid Bearer token or API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 401
                error: 'Unauthorized: Invalid API key'
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                requestsRemaining: null
                ipRequestsRemaining: null
        '403':
          description: Bot or new user not in the specified guild.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 403
                error: New user is not in the specified guild
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                requestsRemaining: 499
                ipRequestsRemaining: 499
        '429':
          description: 'Too Many Requests: Rate limit exceeded or requests too frequent.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
              example:
                status: 429
                error: 'Too Many Requests: Daily request limit of 500 exceeded'
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                retryAfter: 3600
                requestsRemaining: 0
                ipRequestsRemaining: 0
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 500
                error: Internal server error
                timestamp: '2025-09-27T20:12:56Z'
                version: 1.0.0
                requestsRemaining: 499
                ipRequestsRemaining: 499
components:
  schemas:
    UpdateResponse:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
          description: The HTTP status code of the response.
        message:
          type: string
          description: A message describing the result.
        data:
          type: object
          properties:
            discordId:
              type: string
              description: The Discord user ID.
            robloxId:
              type: string
              description: The linked Roblox user ID.
        timestamp:
          type: string
          format: date-time
          description: The timestamp of the response in ISO 8601 format.
        version:
          type: string
          example: 1.0.0
          description: The API version.
        requestsRemaining:
          type: integer
          nullable: true
          description: Number of requests remaining in the daily quota.
        ipRequestsRemaining:
          type: integer
          nullable: true
          description: >-
            Remaining IP-linked quota shared across API keys detected on the
            same IP.
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 400
            - 401
            - 403
            - 404
            - 500
          description: The HTTP status code of the error response.
        error:
          type: string
          description: A message describing the error.
        timestamp:
          type: string
          format: date-time
          description: The timestamp of the response in ISO 8601 format.
        version:
          type: string
          example: 1.0.0
          description: The API version.
        requestsRemaining:
          type: integer
          nullable: true
          description: Number of requests remaining in the daily quota.
        ipRequestsRemaining:
          type: integer
          nullable: true
          description: >-
            Remaining IP-linked quota shared across API keys detected on the
            same IP.
    RateLimitErrorResponse:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 429
          description: The HTTP status code of the rate limit error response.
        error:
          type: string
          description: A message describing the rate limit error.
        timestamp:
          type: string
          format: date-time
          description: The timestamp of the response in ISO 8601 format.
        version:
          type: string
          example: 1.0.0
          description: The API version.
        retryAfter:
          type: integer
          description: Seconds until the rate limit resets or the next request can be made.
        requestsRemaining:
          type: integer
          nullable: true
          description: Number of requests remaining in the daily quota.
        ipRequestsRemaining:
          type: integer
          nullable: true
          description: >-
            Remaining IP-linked quota shared across API keys detected on the
            same IP.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````