# Toggle Linked Discord Token

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/discord/token/{id}:
    put:
      summary: Toggle Linked Discord Token
      deprecated: false
      description: >-
        The API only works for user with DIY plan, and have linked their Discord
        account.


        The API will return the updated token details.
      tags:
        - DIY Plan Endpoints
      parameters:
        - name: id
          in: path
          description: >-
            The token ID from the /tokens endpoint, for the specific Discord
            account.
          required: true
          example: '123'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                isActive:
                  type: boolean
                  description: true to activate the token, and false to disable the token.
              x-apifox-orders:
                - isActive
              required:
                - isActive
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                      description: The linked Discord token id in our system.
                    token:
                      type: string
                      description: The linked Discord token.
                    channelId:
                      type: string
                      description: The linked Discord channel id.
                    serverId:
                      type: string
                      description: The linked Discord server id.
                    isActive:
                      type: boolean
                      description: The token is active or not.
                    status:
                      type: string
                      description: >-
                        The status of the token, can be FAST or RELAX or
                        VERIFYING.
                      enum:
                        - FAST
                        - RELAX
                        - VERIFYING
                        - BANNED
                      x-apifox:
                        enumDescriptions:
                          FAST: The Midjourney account is in the fast mode.
                          RELAX: The Midjourney account is in the relax mode.
                          VERIFYING: >-
                            Our system is checking your provided Discord
                            details.
                          BANNED: The Midjourney account has been banned.
                    info:
                      type: object
                      properties:
                        jobMode:
                          type: string
                        runningJobs:
                          type: string
                          description: Number of running jobs in Midjourney.
                        relaxedUsuage:
                          type: string
                          description: Number of images generated in the relax mode.
                        subscription:
                          type: string
                          description: The Midjourney plan name with the Discord account.
                        lifetimeUsage:
                          type: string
                          description: Number of images generated in lifetime.
                        queuedJobsFast:
                          type: string
                          description: Number of queued jobs in the fast mode.
                        visibilityMode:
                          type: string
                          description: If the image generated public visiable or not.
                        queuedJobsRelax:
                          type: string
                          description: Number of queued jobs in the relax mode.
                        fastTimeRemaining:
                          type: string
                          description: >-
                            The number of GPU minutes left in the fast mode
                            generation.
                      x-apifox-orders:
                        - jobMode
                        - runningJobs
                        - relaxedUsuage
                        - subscription
                        - lifetimeUsage
                        - queuedJobsFast
                        - visibilityMode
                        - queuedJobsRelax
                        - fastTimeRemaining
                      description: The linked Discord account details.
                      required:
                        - jobMode
                        - runningJobs
                        - relaxedUsuage
                        - subscription
                        - lifetimeUsage
                        - queuedJobsFast
                        - visibilityMode
                        - queuedJobsRelax
                        - fastTimeRemaining
                    concurrency:
                      type: number
                      description: The concurrent limiting for the token.
                  x-apifox-orders:
                    - id
                    - token
                    - channelId
                    - serverId
                    - isActive
                    - status
                    - info
                    - concurrency
                  description: The linked Discord token details.
                  required:
                    - id
                    - token
                    - channelId
                    - serverId
                    - isActive
                    - status
                    - info
                    - concurrency
                description: The list of linked Discord tokens.
              example:
                - id: 198
                  token: >-
                    MTE2OTc1Nzg5NjEwNDQ4NDkxOA.GRXmdc.YD02mkT1NkOGeDTJa8CT98m5QaC41EERSDFAS
                  channelId: '1169758569336333381'
                  serverId: '1169758569336478123'
                  isActive: true
                  status: FAST
                  info:
                    jobMode: ''
                    runningJobs: None
                    relaxedUsage: 0 images
                    subscription: Basic (Active monthly, renews next on <t:1709417882>)
                    lifetimeUsage: 674 images
                    queuedJobsFast: '0'
                    visibilityMode: Public
                    queuedJobsRelax: '0'
                    fastTimeRemaining: 199.00/200.0 minutes (99.50%)
                  concurrency: 2
          headers: {}
          x-apifox-name: Success
      security:
        - bearer: []
      x-apifox-folder: DIY Plan Endpoints
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5160896/apis/api-216009769-run
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.imaginepro.ai
    description: Prod Env
security: []

```
