Creating Users

Page describing how to create Users for widget.

For getting or creating a new user for current use or future use we seem need it.

POST https://api.jelou.ai/v1/widget/user

Getting or Creating User

Headers

Name
Type
Description

Content-Type*

String

application/json

Authorization*

String

<clientId>:<clientSecret>

Request Body

Name
Type
Description

user*

Object

User

user.legalId

Integer

Legal Id of the User

user.names

String

Names of the User

user.id*

String

Unique Id value for User

{
  "message": [
    "User created successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "User": {
      "id": "<user.id>",
      "referenceId": "<user.id>",
      "botId": "<user.botId>",
      "socketId": "<user.socketId>",
      "companyId": <user.companyId>,
      "names": "<user.names>",
      "providerId": "<user.providerId>",
      "roomId": "<user.roomId>",
      "groupId": "<user.groupId>",
      "updatedAt": "<user.updatedAt>",
      "createdAt": "<user.createdAt>",
      "databaseId": <user.databaseId>,
      "groupRoomId": "<user.groupRoomId>"
    "Room": {
      "avatarUrl": "https://s3.us-west-2.amazonaws.com/cdn.devlabs.tech/default_avatar.jpeg",
      "type": "<room.type>",
      "kind": "<room.kind>",
      "members": ["<memberId>"],
      "membersInfo": [{"<memberInfo>"}],
      "messages": [],
      "tags": [],
      "deleted": false,
      "_id": "<room._id>",
      "id": "<room.id>",
      "name": "<room.name>",
      "channel": "Widget",
      "channelProvider": "Widget",
      "bot": {"<Bot_Data>"},
      "company": {"<Company_Data>"},
      "lastMessageAt": "<room_last_message_date>",
      "createdAt": "<room_created_at_date>",
      "updatedAt": "<room_updated_at_date>",
      "__v": 0
    },
    "groupRoom": {
      "avatarUrl": "https://s3.us-west-2.amazonaws.com/cdn.devlabs.tech/default_avatar.jpeg",
      "type": "<room.type>",
      "kind": "<room.kind>",
      "members": ["<memberId>"],
      "membersInfo": [{"<memberInfo>"}],
      "messages": [],
      "tags": [],
      "deleted": false,
      "_id": "<room._id>",
      "id": "<room.id>",
      "name": "<room.name>",
      "channel": "Widget",
      "channelProvider": "Widget",
      "bot": {"<Bot_Data>"},
      "company": {"<Company_Data>"},
      "lastMessageAt": "<room_last_message_date>",
      "createdAt": "<room_created_at_date>",
      "updatedAt": "<room_updated_at_date>",
      "__v": 0
    }
  }
}

Example:

curl --request POST \
  --url https://api.jelou.ai/v1/widget/user \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <clientId>:<clientSecret>' \
  --data '{
	"user": {
		"id": "11111111111",
		"names": "Tester #1111",
		"legalid": "1223334444"
		}
	}
}'

Last updated