> ## Documentation Index
> Fetch the complete documentation index at: https://edenai-feat-automate-documentation-tests.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Token



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/user/openapi.json patch /user/custom_token/{name}/
openapi: 3.0.3
info:
  title: User Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run/v2
security: []
paths:
  /user/custom_token/{name}/:
    patch:
      tags:
        - User Management
      summary: Update Token
      operationId: user_root_partial_update
      parameters:
        - in: path
          name: name
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedCustomTokenUpdateRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTokenUpdate'
          description: ''
components:
  schemas:
    PatchedCustomTokenUpdateRequest:
      type: object
      properties:
        balance:
          type: number
          format: double
          maximum: 100000
          minimum: -100000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: >-
            Optional remaining credits balance for this Token, if
            `active_balance` is set to True and the balance reaches 0, this
            token will become unusable
        expire_time:
          type: string
          format: date-time
          nullable: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type: number
          format: double
          maximum: 100000
          minimum: -100000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: >-
            The amount this token's balance is reset to at the start of each
            balance_reset_period. Null when balance_reset_period is 'none'.
        balance_reset_period:
          allOf:
            - $ref: '#/components/schemas/BalanceResetPeriodEnum'
          description: >-
            How often this token's balance is reinitialized to
            balance_reset_amount. 'none' = one-time balance (default, current
            behaviour).


            * `none` - None

            * `daily` - Daily

            * `weekly` - Weekly

            * `monthly` - Monthly
    CustomTokenUpdate:
      type: object
      properties:
        name:
          type: string
          readOnly: true
          description: The token name
        token_type:
          allOf:
            - $ref: '#/components/schemas/TokenTypeEnum'
          readOnly: true
        balance:
          type: number
          format: double
          maximum: 100000
          minimum: -100000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: >-
            Optional remaining credits balance for this Token, if
            `active_balance` is set to True and the balance reaches 0, this
            token will become unusable
        expire_time:
          type: string
          format: date-time
          nullable: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance_reset_amount:
          type: number
          format: double
          maximum: 100000
          minimum: -100000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: >-
            The amount this token's balance is reset to at the start of each
            balance_reset_period. Null when balance_reset_period is 'none'.
        balance_reset_period:
          allOf:
            - $ref: '#/components/schemas/BalanceResetPeriodEnum'
          description: >-
            How often this token's balance is reinitialized to
            balance_reset_amount. 'none' = one-time balance (default, current
            behaviour).


            * `none` - None

            * `daily` - Daily

            * `weekly` - Weekly

            * `monthly` - Monthly
      required:
        - name
        - token_type
    BalanceResetPeriodEnum:
      enum:
        - none
        - daily
        - weekly
        - monthly
      type: string
      description: |-
        * `none` - None
        * `daily` - Daily
        * `weekly` - Weekly
        * `monthly` - Monthly
    TokenTypeEnum:
      enum:
        - sandbox_api_token
        - api_token
      type: string
      description: |-
        * `sandbox_api_token` - Sandbox
        * `api_token` - Back

````