{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/CustomCredential",
"title": "CustomCredential",
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"custom-credential"
]
},
"authenticationPlan": {
"description": "This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.",
"oneOf": [
{
"$ref": "#/components/schemas/OAuth2AuthenticationPlan"
},
{
"$ref": "#/components/schemas/HMACAuthenticationPlan"
},
{
"$ref": "#/components/schemas/BearerAuthenticationPlan"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"oauth2": "#/components/schemas/OAuth2AuthenticationPlan",
"hmac": "#/components/schemas/HMACAuthenticationPlan",
"bearer": "#/components/schemas/BearerAuthenticationPlan"
}
}
},
"encryptionPlan": {
"description": "This is the encryption plan for encrypting sensitive data. Currently supports public-key encryption.",
"oneOf": [
{
"$ref": "#/components/schemas/PublicKeyEncryptionPlan"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"public-key": "#/components/schemas/PublicKeyEncryptionPlan"
}
},
"allOf": [
{
"$ref": "#/components/schemas/PublicKeyEncryptionPlan"
}
]
},
"id": {
"type": "string",
"description": "This is the unique identifier for the credential."
},
"orgId": {
"type": "string",
"description": "This is the unique identifier for the org that this credential belongs to."
},
"createdAt": {
"format": "date-time",
"type": "string",
"description": "This is the ISO 8601 date-time string of when the credential was created."
},
"updatedAt": {
"format": "date-time",
"type": "string",
"description": "This is the ISO 8601 date-time string of when the assistant was last updated."
},
"authenticationSession": {
"description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.",
"allOf": [
{
"$ref": "#/components/schemas/Oauth2AuthenticationSession"
}
]
},
"name": {
"type": "string",
"description": "This is the name of credential. This is just for your reference.",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"provider",
"authenticationPlan",
"id",
"orgId",
"createdAt",
"updatedAt",
"authenticationSession"
]
}