Partner
Partner endpoints for creating end-user accounts on behalf of your customers. The caller must hold the partner role.
Table of Content:
Create user
Create a new end-user account. Request and response shape is identical to the admin create user endpoint, with two differences:
- Allowed roles: the
rolesfield accepts only["user"]. Any other role value returns400. - Authorization: caller must hold the
partnerrole rather thanusers_admin.
The notify flag works the same way — omit it (or set false) to receive API key pair credentials in the response, or set true to send an invite email and receive only {userID, email}.
Endpoint: https://apis.threatwinds.com/api/auth/v2/partners/user
Parameters
Same as admin create user, except:
| Parameter | Description |
|---|---|
| roles | Must contain exactly ["user"]. Other values return 400. |
curl -X 'POST' \
'https://apis.threatwinds.com/api/auth/v2/partners/user' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"email": "customer@example.com",
"fullName": "Customer Name",
"alias": "customer",
"roles": ["user"],
"notify": true
}'