Make POST call to endpoint (/services/data/v58.0/named-credentials/external-credentials/) with below JSON body to create external credential.
{
"authenticationProtocol": "Custom",
"customHeaders": [],
"developerName": "Test2",
"masterLabel": "Test",
"parameters": [],
"principals": [
{
"parameters": [],
"principalName": "Test Principal",
"principalType": "NamedPrincipal",
"sequenceNumber": 1
}
]
}
The above step creates external credential as below:
Make POST call to endpoint (/services/data/v58.0/named-credentials/credential/) with below JSON body to create external credential.
{
"externalCredential": "Test2",
"authenticationProtocol": "Custom",
"principalName": "Test Principal",
"principalType": "NamedPrincipal",
"credentials": {
"username": {
"value": "00000000000",
"encrypted": true
}
}
}
This creates a auth param named username under Test Principal







