API Referencechevron_rightUserschevron_rightCreate user
Create user
POST
/api/v2/usersCreates a new user record in the system. Required parameters include email and password. Upon successful creation, an email verification link will be sent to the user's provided email address.
info
Authentication Required
This endpoint requires a valid API key with users:write scope.
data_objectRequest Body Parameters
emailRequiredstring (email format)The primary email address for the user. Must be unique within the system and properly formatted.
passwordRequiredstring (min: 8 chars)The user's password. Must be at least 8 characters with uppercase, lowercase, numbers, and special characters.
full_nameOptionalstringThe user's full legal name. Used for display purposes in the dashboard.
roleOptionalstring (enum)Assigns a specific RBAC role to the new user. Defaults to "viewer".
"admin""developer""viewer"metadataOptionalobjectUp to 50 key-value pairs that you can attach to an object for storing additional structured information.
outputResponses
Response Body
{
"id": "usr_9abc123def456ghi",
"object": "user",
"email": "alex.developer@example.com",
"full_name": "Alex Developer",
"role": "developer",
"metadata": {
"department": "engineering",
"employee_id": "EMP-042"
},
"created_at": 1682496000,
"updated_at": 1682496000
}codeExample Request
curl -X POST https://api.afrixtech.com/v2/users \
-H "Authorization: Bearer sk_test_12345" \
-H "Content-Type: application/json" \
-d '{
"email": "alex.developer@example.com",
"password": "SecurePassword123!",
"full_name": "Alex Developer",
"role": "developer",
"metadata": {
"department": "engineering"
}
}'terminalTry it Now
Live Sandbox
