Create Partner Login
This request creates an additional login for a partner.
| post | /oauth/logins |
Sample
A sample POST request to create a partner sub-login:
curl -X POST \
'https://api.carrierx.com/core/v2/oauth/logins' \
-H 'Content-Type: application/json' \
--data-binary '{
"login":"carrierx_partner",
"password":"myStrongPassword123",
"email":"[email protected]",
"token_scopes":["partners.read","partners.update"]
}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200 status code with a serialized copy of the Partner Login object:
{
"email": "[email protected]",
"login": "carrierx_partner",
"login_sid": "abcf6b1f-7281-4da9-a4d6-3fb53e3a76de",
"partner_sid": "edebf627-ebce-4f77-8160-75db76154168",
"token_scopes": [
"partners.read",
"partners.update"
]
}
Required Scopes
To create a Partner Login object, the partner must have the following scope enabled:
oauth.logins.manage_all_logins
Body Arguments
JSON representation of the fields and values of the Partner Login object to be created.
Required fields to create a partner login are:
loginpassword
mfa is optional. When included, its method sub-field is required, along with email (for the email method) or phonenumber (for the sms method). Refer to the MFA Object table for details.
email is optional. If set, it must be a valid email address, or the request returns a 422 error ({"field": "email", "message": "wrong value"}).
The login attribute has the following naming conventions:
- the first part must contain the current partner login to the system (
<partner.login>); - the second part contains the sub-login used as additional login to the system (
<sub-login>); - the two parts must be separated with the underscore.
Thus, the login attribute value must look like the following:
<partner.login>_<sub-login> (e.g., carrierx_sublogin)
Refer to this table to view all fields that appear in the Partner Login object.