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

# Update git credential accessor for a User

> Update a user's git credential. Required permissions: `UpdateUser`. *Note:* This only supports updating GitHub and GitHub Enterprise PATs.



## OpenAPI

````yaml /api-specs/6.3/public-api.yaml put /api/users/v1/user/{userId}/tokenCredentials/{credentialId}
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: 6.2.2
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/users/v1/user/{userId}/tokenCredentials/{credentialId}:
    put:
      tags:
        - Users
      summary: Update git credential accessor for a User
      description: >-
        Update a user's git credential. Required permissions: `UpdateUser`.
        *Note:* This only supports updating GitHub and GitHub Enterprise PATs.
      operationId: updateUserGitCred
      parameters:
        - description: Id of the User to update credentials for
          in: path
          name: userId
          required: true
          schema:
            type: string
        - description: Id of the credential to update
          in: path
          name: credentialId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenGitCredentialV1'
        description: The new credential
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitCredentialAccessorEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    TokenGitCredentialV1:
      properties:
        domain:
          description: The domain for this git credential
          example: github.com
          type: string
        gitServiceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        name:
          description: Name for this git credential
          example: My creds
          type: string
        token:
          description: The token value
          type: string
      required:
        - name
        - gitServiceProvider
        - domain
        - token
      type: object
    GitCredentialAccessorEnvelopeV1:
      properties:
        credential:
          $ref: '#/components/schemas/GitCredentialsAccessorV1'
        metadata:
          $ref: '#/components/schemas/MetadataV1'
      required:
        - credential
        - metadata
      type: object
    GitServiceProviderV1:
      description: Git service provider
      enum:
        - bitbucket
        - bitbucketServer
        - github
        - githubEnterprise
        - gitLab
        - gitLabEnterprise
        - unknown
      type: string
    GitCredentialsAccessorV1:
      properties:
        domain:
          description: The domain these credentials apply to
          example: github.com
          type: string
        fingerprint:
          example: ba:78:09:d8:4b:3b:09:9b:43:bf:9b:5a:34:f7:3f:28
          type: string
        gitServiceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        id:
          description: Id for these git credentials
          type: string
        name:
          description: Name for these git credentials
          example: My creds
          type: string
        protocol:
          example: https
          type: string
      required:
        - id
        - name
        - gitServiceProvider
        - domain
        - fingerprint
        - protocol
      type: object
    MetadataV1:
      properties:
        notices:
          description: Notices relating to the request
          items:
            type: string
          type: array
        requestId:
          type: string
      required:
        - requestId
        - notices
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````