PUT
/
organisations
/
{organisationId}
/
credentials
/
{credentialId}

Authorizations

Authorization
string
header
required

Path Parameters

organisationId
string
required
credentialId
string
required

Body

application/json

UpdateCredentialRequestBody is the request body to update a credential. The ID and OrganisationID fields are taken from the URL path.

data
object
required

Data is a map of string keys to string base64 encoded values for the actual credential data.

name
string
required

Name is the credential name.

type
string
required

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.
expiresAt
string

ExpiresAt allows the user to specify when Switchboard should automatically delete the credential.

redactFields
string[]

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.

Response

200 - application/json

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.

data
object
required

Data is a map of string keys to string base64 encoded values for the actual credential data.

id
string
required

ID is the identifier for the credential.

name
string
required

Name is the credential name.

organisationID
any
required

OrganisationID is the ID of the organisation which owns this credential.

type
string
required

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.
expiresAt
string

ExpiresAt allows the user to specify when Switchboard should automatically delete the credential.

redactFields
string[]

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.