Add New User
POST/api/users
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| first_name | string | Mandatory User first name |
| last_name | string | Mandatory User last name |
| string | Mandatory User email | |
| user_type | string | Mandatory User type (staff, client, lead) |
| password | string | optional Optional User password |
| phone | string | optional Optional User phone |
| job_title | string | optional Optional Job title |
| gender | string | optional Optional Gender (male, female, other) |
| client_id | number | optional Optional Client ID (required for client user_type) |
| role_id | number | optional Optional Role ID (for staff) |
| status | string | optional Optional Status (active, inactive) default: active |
| address | string | optional Optional Address |
| skype | string | optional Optional Skype ID |
curl -X POST "https://yoursite.com/api/users" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "first_name": "...", "last_name": "...", "email": "...", "user_type": "..." }' Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "User add successful."
}