API Reference
Users Management
Create User

User Management – Create User

Create an organization user. Requires a valid Bearer token from the API Authentication flow.

Authentication

Include the token from the auth endpoint in the Authorization header:

Authorization: Bearer <YOUR_AUTH_TOKEN>

Endpoint

POSThttps://api.samvyo.com/api/user/orgUser

Required Headers

Content-Type: application/json
Authorization: Bearer <YOUR_AUTH_TOKEN>

Request Body

{
  "admin": false,
  "displayRating": true,
  "email": "user@example.com",
  "location": "IND",
  "meetNowEnabled": false,
  "name": "Jane Doe",
  "loginUrl": "https://yourapp.example.com/login",
  "role": "moderator",
  "tags": ["hello", "hi"]
}

Field Reference

Required fields

  • email: User's email address.
  • name: User's full name.

Optional fields

  • admin: Grant admin access to this user. Optional; default is false.
  • meetNowEnabled: Allow this user to participate in MeetNow meetings. Optional; default is false.
  • tags: Labels used to identify the user in MeetNow contexts; only applicable for MeetNow meetings. Optional.
  • displayRating: Enable showing MeetNow ratings for this user. Optional.
  • location: User's location code or descriptor. Optional.
  • role: Role for the user; if not provided, defaults to moderator.
  • loginUrl: Your dashboard login URL. After user creation, an email is sent to the user with this URL and their login credentials.

Example Requests

JavaScript (fetch)

const res = await fetch('https://api.samvyo.com/api/user/orgUser', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${authToken}`
  },
  body: JSON.stringify({
    admin: false,
    displayRating: true,
    email: 'user@example.com',
    location: 'IND',
    meetNowEnabled: false,
    name: 'Jane Doe',
    loginUrl: 'https://yourapp.example.com/login',
    role: 'moderator',
    tags: ['sales', 'customer success']
  })
});
const data = await res.json();

cURL

curl -X POST \
  'https://api.samvyo.com/api/user/orgUser' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_AUTH_TOKEN>' \
  -d '{
    "admin": false,
    "displayRating": true,
    "email": "user@example.com",
    "location": "IND",
    "meetNowEnabled": false,
    "name": "Jane Doe",
    "loginUrl": "https://yourapp.example.com/login",
    "role": "moderator",
    "tags": ["sales", "customer success"]
  }'

Success Response

{
  "success": true,
  "user": {
    "id": "<USER_ID>",
    "email": "user@example.com",
    "name": "Jane Doe",
    "createdAt": "2025-08-06T01:13:39.569Z",
    "location": "IND",
    "username": "Ira94723",
    "role": "moderator",
    "accountSuspended": false,
    "accountDeleted": false,
    "meetNowEnabled": true,
    "tags": ["sales", "customer success"],
    "admin": true
  },
  "password": "<AUTO_GENERATED_PASSWORD>"
}

Failure Responses

Case 1: Agent limit reached

{
  "success": false,
  "message": "Agent creation limit reached, please upgarde your plan"
}

Case 2: Email already exists

{
  "success": false,
  "message": "Email already exists. Try again with a different email."
}

Case 3: Missing required fields (name or email)

{
  "success": false,
  "message": "Email and name are required to create a new user."
}

Case 4: Missing loginUrl

{
  "success": false,
  "message": "loginUrl is required to create a new user."
}

Notes

  • loginUrl triggers an email to the user with a login link and credentials.
  • Use placeholder values in examples; replace with your real data and token when integrating.