API Reference
API Reference

Create User

Create a new user.

POST/api/v1/users/

Authentication

Syllable-API-Keyrequired

Send 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
emailstringrequired

Email address of the user

first_namestring | nulloptional

First name of the user

last_namestring | nulloptional

Last name of the user

role_idintegerrequired

ID of the role assigned to the user

utmDaoUtm | nulloptional

Optional UTM campaign attribution to record in user_metadata.

5 options
utm_sourcestring | nulloptional
Maximum length 256
utm_mediumstring | nulloptional
Maximum length 256
utm_campaignstring | nulloptional
Maximum length 256
utm_termstring | nulloptional
Maximum length 256
utm_contentstring | nulloptional
Maximum length 256
login_typeenum<string> | nulloptional

The type of login to use for the user. If not provided, defaults to google for @gmail.com email addresses, and username and password otherwise.

Allowed values ["google","username_and_password"]
skip_authbooleanoptional

Whether to skip authentication for the user.

Default false
Request 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
emailstringrequired

Email address of the user

first_namestring | nulloptional

First name of the user

last_namestring | nulloptional

Last name of the user

role_idintegerrequired

ID of the role assigned to the user

utmDaoUtm | nulloptional

Optional UTM campaign attribution to record in user_metadata.

5 options
utm_sourcestring | nulloptional
Maximum length 256
utm_mediumstring | nulloptional
Maximum length 256
utm_campaignstring | nulloptional
Maximum length 256
utm_termstring | nulloptional
Maximum length 256
utm_contentstring | nulloptional
Maximum length 256
last_updated_commentsstring | nulloptional

Comments for the most recent edit to the user.

idintegerrequired

Internal ID of the user

role_namestringrequired

Name of the role assigned to the user

email_sentbooleanrequired

Whether the welcome email has been sent to the user

activity_statusenum<string>required

The activity status of the user

Allowed values ["not_invited","invited","active"]
last_updatedstring (date-time)required

The timestamp of the most recent update to the user

last_updated_bystring | nulloptional

The email address of the user who last updated the user

last_session_atstring (date-time) | nulloptional

The 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[]optional
Item schema
itemsValidationErrorrequired
3 fields
locstring | integer[]required
Item schema
itemsstring | integerrequired
2 options
Option 1stringrequired
Option 2integerrequired
msgstringrequired
typestringrequired
Response example
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}