Skip to content
Get started

Create user

users.create(UserCreateParams**kwargs) -> User
POST/user

This can only be done by the logged in user.

ParametersExpand Collapse
id: Optional[int]
email: Optional[str]
first_name: Optional[str]
last_name: Optional[str]
password: Optional[str]
phone: Optional[str]
username: Optional[str]
user_status: Optional[int]

User Status

formatint32
ReturnsExpand Collapse
class User:
id: Optional[int]
email: Optional[str]
first_name: Optional[str]
last_name: Optional[str]
password: Optional[str]
phone: Optional[str]
username: Optional[str]
user_status: Optional[int]

User Status

formatint32

Create user

import os
from maxf_docs_dev_7 import MaxfDocsDev7

client = MaxfDocsDev7(
    api_key=os.environ.get("PETSTORE_API_KEY"),  # This is the default and can be omitted
)
user = client.users.create()
print(user.id)
{
  "id": 10,
  "email": "john@email.com",
  "firstName": "John",
  "lastName": "James",
  "password": "12345",
  "phone": "12345",
  "username": "theUser",
  "userStatus": 1
}
Returns Examples
{
  "id": 10,
  "email": "john@email.com",
  "firstName": "John",
  "lastName": "James",
  "password": "12345",
  "phone": "12345",
  "username": "theUser",
  "userStatus": 1
}