User

This page provides APIs to manage users in Saleschat, including adding users, resetting passwords, generating magic links, and fetching user details.

Create a user and add it to the org

post
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: False

  • Partner Allowed: True

  • ask_user_to_update_password_on_login: Default value is False

  • emailConfirmed: User's email will be considered to be confirmed

  • Email to confirm email will not be sent

  • Role of the user added will be Member

  • Sometimes a user may be created without being added to the org and will have to be handled manually

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
Body
emailstring · max: 319Required
passwordstring · max: 32Required
ask_user_to_update_password_on_loginbooleanOptional
first_namestring · max: 128Required
last_namestring · max: 128Required
Responses
200

User created successfully

application/json
post
/v1/org/{orgId}/user
POST /v1/org/{orgId}/user HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 117

{
  "email": "text",
  "password": "text",
  "ask_user_to_update_password_on_login": true,
  "first_name": "text",
  "last_name": "text"
}
{
  "user_id": "text"
}

Reset a users password

post
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: True

  • Partner Allowed: True

  • User will be required to reset the password on next login

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
userIdstringRequired
Body
passwordstringRequired
ask_user_to_update_password_on_loginbooleanOptional
Responses
post
/v1/org/{orgId}/user/{userId}/password/reset
POST /v1/org/{orgId}/user/{userId}/password/reset HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63

{
  "password": "text",
  "ask_user_to_update_password_on_login": true
}

No content

get
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: False

  • Partner Allowed: True

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
userIdstringRequired
Responses
200

Successfully generated magic link

application/json
get
/v1/org/{orgId}/user/{userId}/magiclink
GET /v1/org/{orgId}/user/{userId}/magiclink HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "url": "text"
}

Get user by email

get
  • Roles Allowed: MEMBER

  • Impersonated User Allowed: True

  • Partner Allowed: True

  • Supports Partial match on email ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
Query parameters
qstringRequiredDefault: ""
offsetinteger · int32OptionalDefault: 0
sizeinteger · int32OptionalDefault: 10
Responses
200

Successfully fetched user for email ID

application/json
get
/v1/org/{orgId}/user
GET /v1/org/{orgId}/user?q= HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "items": [
    {
      "id": "text",
      "email": "text",
      "first_name": "text",
      "last_name": "text"
    }
  ],
  "has_more": true
}

Delete a user

post
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: False

  • Partner Allowed: True

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
userIdstringRequired
Responses
post
/v1/org/{orgId}/user/{userId}/delete
POST /v1/org/{orgId}/user/{userId}/delete HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Disable a user

post
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: False

  • Partner Allowed: True

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
userIdstringRequired
Responses
post
/v1/org/{orgId}/user/{userId}/disable
POST /v1/org/{orgId}/user/{userId}/disable HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Enable a user

post
  • Roles Allowed: ADMIN

  • Impersonated User Allowed: False

  • Partner Allowed: True

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
orgIdstringRequired
userIdstringRequired
Responses
post
/v1/org/{orgId}/user/{userId}/enable
POST /v1/org/{orgId}/user/{userId}/enable HTTP/1.1
Host: apis.saleschat.pro
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated