Create User
Create a new user.
/api/v1/users/Authentication
Syllable-API-KeyrequiredSend Syllable-API-Key in the header.
Need a credential? Create or manage an API token in the Syllable Console.
Parameters
This endpoint has no declared parameters.
Request body
application/json
body
UserCreateRequest
required
7 fields
emailstringrequiredEmail address of the user
first_namestring | nulloptionalFirst name of the user
last_namestring | nulloptionalLast name of the user
role_idintegerrequiredID of the role assigned to the user
utmDaoUtm | nulloptionalOptional UTM campaign attribution to record in user_metadata.
5 options
utm_sourcestring | nulloptional256utm_mediumstring | nulloptional256utm_campaignstring | nulloptional256utm_termstring | nulloptional256utm_contentstring | nulloptional256login_typeenum<string> | nulloptionalThe type of login to use for the user. If not provided, defaults to google for @gmail.com email addresses, and username and password otherwise.
["google","username_and_password"]skip_authbooleanoptionalWhether to skip authentication for the user.
falseRequest example
{
"email": "string",
"first_name": "string",
"last_name": "string",
"role_id": 0,
"utm": "string",
"login_type": "string",
"skip_auth": false
}Responses
200Successful Response
application/json
response
UserResponse
required
13 fields
emailstringrequiredEmail address of the user
first_namestring | nulloptionalFirst name of the user
last_namestring | nulloptionalLast name of the user
role_idintegerrequiredID of the role assigned to the user
utmDaoUtm | nulloptionalOptional UTM campaign attribution to record in user_metadata.
5 options
utm_sourcestring | nulloptional256utm_mediumstring | nulloptional256utm_campaignstring | nulloptional256utm_termstring | nulloptional256utm_contentstring | nulloptional256last_updated_commentsstring | nulloptionalComments for the most recent edit to the user.
idintegerrequiredInternal ID of the user
role_namestringrequiredName of the role assigned to the user
email_sentbooleanrequiredWhether the welcome email has been sent to the user
activity_statusenum<string>requiredThe activity status of the user
["not_invited","invited","active"]last_updatedstring (date-time)requiredThe timestamp of the most recent update to the user
last_updated_bystring | nulloptionalThe email address of the user who last updated the user
last_session_atstring (date-time) | nulloptionalThe timestamp of the user's last session
Response example
{
"email": "string",
"first_name": "string",
"last_name": "string",
"role_id": 0,
"utm": "string",
"last_updated_comments": "string",
"id": 0,
"role_name": "string",
"email_sent": true,
"activity_status": "string",
"last_updated": "string",
"last_updated_by": "string",
"last_session_at": "string"
}422Validation Error
application/json
response
HTTPValidationError
required
1 field
detailValidationError[]optionalItem schema
itemsValidationErrorrequired3 fields
locstring | integer[]requiredItem schema
itemsstring | integerrequired2 options
Option 1stringrequiredOption 2integerrequiredmsgstringrequiredtypestringrequiredResponse example
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
