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

# Put organisations credentials

> Updates an existing Credential by ID in the current organisation.




## OpenAPI

````yaml put /organisations/{organisationId}/credentials/{credentialId}
openapi: 3.0.3
info:
  title: Switchboard API
  description: >-
    The Switchboard API provides users the ability to manage their Apps,
    Integrations and Workflows
  version: 0.0.1-alpha.0
servers:
  - url: https://platform.versori.com/api/switchboard/v1alpha1/
    description: Production server
  - url: http://localhost:8080/v1alpha1/
    description: Localhost
security:
  - apiKey: []
paths:
  /organisations/{organisationId}/credentials/{credentialId}:
    put:
      tags:
        - credentials
        - not-implemented
      description: |
        Updates an existing Credential by ID in the current organisation.
      operationId: UpdateCredential
      parameters:
        - name: organisationId
          in: path
          required: true
          schema:
            type: string
          example: '101'
        - name: credentialId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/UpdateCredentialRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateCredentialResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  requestBodies:
    UpdateCredentialRequest:
      description: >
        UpdateCredentialRequest is the request definition for updating an
        existing credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCredentialRequestBody'
  responses:
    UpdateCredentialResponse:
      description: >
        UpdateCredentialResponse is the response containing the updated
        credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Credential'
    ErrorResponse:
      description: The default error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    UpdateCredentialRequestBody:
      description: >
        UpdateCredentialRequestBody is the request body to update a credential.
        The ID and OrganisationID fields are

        taken from the URL path.
      properties:
        name:
          description: Name is the credential name.
          type: string
        data:
          description: >-
            Data is a map of string keys to string base64 encoded values for the
            actual credential data.
          type: object
        type:
          $ref: '#/components/schemas/CredentialType'
        redactFields:
          description: >
            RedactFields is a list of fields within data which once created
            should not be returned to the user. This

            property is only applicable for "Default" credential types.
            Credentials of other types have their own

            redaction list internally and this field will be ignored.
          type: array
          items:
            type: string
        expiresAt:
          description: >
            ExpiresAt allows the user to specify when Switchboard should
            automatically delete the credential.
          type: string
          format: date-time
      required:
        - name
        - data
        - type
    Credential:
      description: >
        Credential holds sensitive data not owned by Versori. Users can create
        credentials so that Versori systems can

        authenticate to external services on behalf of the user.
      properties:
        id:
          description: ID is the identifier for the credential.
          type: string
        organisationID:
          description: >-
            OrganisationID is the ID of the organisation which owns this
            credential.
        name:
          description: Name is the credential name.
          type: string
        data:
          description: >-
            Data is a map of string keys to string base64 encoded values for the
            actual credential data.
          type: object
        type:
          $ref: '#/components/schemas/CredentialType'
        redactFields:
          description: >
            RedactFields is a list of fields within data which once created
            should not be returned to the user. This

            property is only applicable for "Default" credential types.
            Credentials of other types have their own

            redaction list internally and this field will be ignored.
          type: array
          items:
            type: string
        expiresAt:
          description: >
            ExpiresAt allows the user to specify when Switchboard should
            automatically delete the credential.
          type: string
          format: date-time
      required:
        - id
        - organisationID
        - name
        - data
        - type
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        extensions:
          type: object
      required:
        - code
        - message
    CredentialType:
      description: >
        Type provides additional context to what data the credential contains.
        Certain types dictate that certain fields

        must be set in order for the credential to be considered valid:


        - "Default" is the default type for a Credential. Data may contain
        arbitrary properties and will always be
          considered valid.
        - "OAuth2Refresh" signifies the credential is to be used for issuing
        OAuth 2.0 access tokens based on a refresh
          token. The credential data must json-marshal into a CredentialDataOAuth2Refresh in order to be valid.
          Credentials of this type may only be created or updated via the connections APIs, not by the credentials APIs.
        - "Raw" signifies the credential contains a value which can be used
        until the credential expires (or never if
          the credential has no expiry). The credential data must json-marshal into a CredentialDataRaw in order to be
          valid.
        - "BasicAuth" signifies the credential contains credentials to be used
        in HTTP Basic authentication schemes. The
          credential data must json-marshal into a CredentialDataBasicAuth in order to be valid.
      type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization

````