roleIds must contain at least one role ID from Role → Listing. An unrecognised ID is rejected with 422, so fetch the list once and cache it.201 as soon as the user is stored, while the sign-in directory is updated asynchronously. In practice this is a second or two. If a caller reports that a brand-new account cannot sign in, re-read it with Detail and retry the login rather than creating the user again.422.curl --location 'https://apigw.klinkcx.com/api/v1/users' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"email": "string",
"password": "string",
"roleIds": [
"string"
],
"phone": "string",
"address": "string",
"globalAgentCapacity": 0
}'{
"requestId": "string",
"data": {
"id": "string",
"name": "string",
"email": "string",
"phone": "string",
"address": "string",
"globalAgentCapacity": 0,
"roles": [
{
"id": "string",
"systemName": "string",
"displayName": "string",
"description": "string"
}
],
"createdAt": "string",
"updatedAt": "string"
}
}