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

# Update Credential



## OpenAPI

````yaml /openapi/groundforge-openapi-v1.json put /v1/credentials/{credential_id}
openapi: 3.1.0
info:
  title: GroundForge REST API
  version: 86Y.5p.6v.6aq
  description: >-
    Current GroundForge SaaS administration, Agent, Channel, MCP, governance,
    observability, and LangChain integration endpoints.
servers:
  - url: https://platform.groundforge.ai
    description: GroundForge SaaS
security: []
paths:
  /v1/credentials/{credential_id}:
    put:
      summary: Update Credential
      operationId: update_credential_v1_credentials__credential_id__put
      parameters:
        - name: credential_id
          in: path
          required: true
          schema:
            type: string
            title: Credential Id
        - name: tenant_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Tenant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCredentialRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    UpdateCredentialRequest:
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/CredentialStatus'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/CredentialSubject'
            - type: 'null'
        scope:
          anyOf:
            - $ref: '#/components/schemas/CredentialScope'
            - type: 'null'
        expiresAtMs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expiresatms
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      title: UpdateCredentialRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CredentialStatus:
      type: string
      enum:
        - active
        - revoked
        - expired
        - disabled
        - archived
      title: CredentialStatus
    CredentialSubject:
      properties:
        type:
          $ref: '#/components/schemas/CredentialSubjectType'
        ref:
          type: string
          title: Ref
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
      type: object
      required:
        - type
        - ref
      title: CredentialSubject
    CredentialScope:
      properties:
        environments:
          items:
            type: string
          type: array
          title: Environments
        targets:
          items:
            $ref: '#/components/schemas/CredentialScopeTarget'
          type: array
          title: Targets
        maxDataClassification:
          anyOf:
            - $ref: '#/components/schemas/DataClassification'
            - type: 'null'
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      title: CredentialScope
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CredentialSubjectType:
      type: string
      enum:
        - user
        - group
        - serviceAccount
        - agent
      title: CredentialSubjectType
    CredentialScopeTarget:
      properties:
        kind:
          type: string
          title: Kind
        ref:
          type: string
          title: Ref
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - kind
        - ref
      title: CredentialScopeTarget
    DataClassification:
      type: string
      enum:
        - public
        - internal
        - confidential
        - restricted
      title: DataClassification
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OIDC access token for users and CLI clients.
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Scoped service-account API key for external Agents and runtime clients.

````

## Related topics

- [Credentials](/administration/credentials.md)
- [Update Channel](/api-reference/endpoints/channels/update-channel.md)
- [Update Agent](/api-reference/endpoints/agents/update-agent.md)
- [Update Tenant](/api-reference/endpoints/tenants/update-tenant.md)
