User State

Page describing the user state API

Get user state

GET https://api.jelou.ai/v1/users/:userId/state

This endpoint retrieve a specific user state.

Path Parameters

NameTypeDescription

userId

string

User phone number. (Without the "+" sign)

{
    "id": "<userId>",
    "names": "<userNames>",
    "botId": "<botId>",
    "groupId": "<groupId>",
    "state": "<state>"
}

Change user state

POST https://api.jelou.ai/v1/users/state

This endpoint allows you to change the state of the user from manual to automatic or the other way around.

Request Body

NameTypeDescription

ttl

number

Manual state expiration time

botId

string

Bot id

userId

string

User phone number. (Without the "+" sign)

state

string

State of the user that we want to change it for. (Option: "manual" or "auto")

{
    "id": "<userId>",
    "names": "<userNames>",
    "botId": "<botId>",
    "groupId": "<groupId>",
    "state": "<state>"
}

Take to account that when the bot is set to manual, answers won't be replied and sent by the bot to the chatbot user. To answer in manual state is up to you. The sending messages endpoints must be used for answering when the user is in manual state.

Last updated