Step 6: update a persona's role
Now that we've updated our persona's details, let's try updating their role.
In this example, we're updating it to Payer
.
SandboxProduction
curl -i -X PATCH \
'https://api-sandbox.equalsmoney.com/v2/personas/{personaId}/role?accountId={accountId}' \
-H 'Authorization: ApiKey {apiKey}' \
-H 'Content-Type: application/json' \
-d '{
"roleName": "Payer"
}'
curl -i -X PATCH \
'https://api.equalsmoney.com/v2/personas/{personaId}/role?accountId={accountId}' \
-H 'Authorization: ApiKey {apiKey}' \
-H 'Content-Type: application/json' \
-d '{
"roleName": "Payer"
}'
If your request is successful, you'll receive a 200
response containing the name of the new role.
{
"name": "Payer"
}