Creating/Updating an User
Create a new or update an existing User. These endpoints allow you to manage user accounts by creating new users or modifying existing ones. When creating a user, you'll need to provide their first name, last name, email address, and user type (Admin, Normal, or Restricted). For existing users, you can update their information using either PUT or POST requests with their User ID. Upon user creation, an automated email will be sent to the user with their password.
Creating an UserPOST /api/v1/users/
Updating an UserPUT /api/v1/users/[USER ID]/
or
POST /api/v1/users/[USER ID]/
Required fields:
first_name | String for first name. |
last_name | String for last name. |
String for email address (an email will be sent to the user with their password). | |
user_type | The user type (Admin/Normal/Restricted). Possible values "A","N", and "R" correspondingly. |
Creating a user example
curl 'https://acmeinc.datareportive.com/api/v1/users/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"first_name":"John", "last_name":"Smith", "email":"john@smith.com", "user_type":"A"}'