Skip to main content
POST
/
api
/
v1
/
users
Python (SDK)
import os
from syllable_sdk import SyllableSDK, models


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.v1.create(request={
        "email": "[email protected]",
        "first_name": "Jane",
        "last_name": "Smith",
        "role_id": 1,
        "login_type": models.LoginType.USERNAME_AND_PASSWORD,
    })

    # Handle response
    print(res)
{
  "email": "<string>",
  "role_id": 123,
  "id": 123,
  "role_name": "<string>",
  "email_sent": true,
  "activity_status": "not_invited",
  "last_updated": "2023-11-07T05:31:56Z",
  "first_name": "Jane",
  "last_name": "Smith",
  "last_updated_comments": "Updated to change which role was assigned",
  "last_updated_by": "[email protected]",
  "last_session_at": "2025-01-01T12:00:00Z"
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json

Request model to create a user.

email
string
required

Email address of the user

role_id
integer
required

ID of the role assigned to the user

first_name
string | null

First name of the user

Example:

"Jane"

last_name
string | null

Last name of the user

Example:

"Smith"

login_type
enum<string> | null

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.

Available options:
google,
username_and_password
Example:

"username_and_password"

skip_auth
boolean
default:false

Whether to skip authentication for the user.

Response

Successful Response

Information about a user.

email
string
required

Email address of the user

role_id
integer
required

ID of the role assigned to the user

id
integer
required

Internal ID of the user

role_name
string
required

Name of the role assigned to the user

email_sent
boolean
required

Whether the welcome email has been sent to the user

activity_status
enum<string>
required

The activity status of the user

Available options:
not_invited,
invited,
active
last_updated
string<date-time>
required

The timestamp of the most recent update to the user

first_name
string | null

First name of the user

Example:

"Jane"

last_name
string | null

Last name of the user

Example:

"Smith"

last_updated_comments
string | null

Comments for the most recent edit to the user.

Example:

"Updated to change which role was assigned"

last_updated_by
string | null

The email address of the user who last updated the user

last_session_at
string<date-time> | null

The timestamp of the user's last session

Example:

"2025-01-01T12:00:00Z"