Base URL: https://be.mica.service.staging.stmesunet.247factorynet.com
/api/v1/auth/loginLogin with email and password. Returns an access token and user info.
{
"email": "user@example.com",
"password": "secret"
}
{
"accesstoken": "JWT",
"upstreamaccesstoken": "JWT",
"usernodeid": "247fn://...",
"userid": "...",
"appsuperuser": false,
"chatnodeid": "247fn://..."
}
Use accesstoken as Authorization: Bearer <token> for all APIs.
/api/v1/chatsGet list of chats for the logged-in user (admin may see multiple).
Auth: Bearer token
/api/v1/chats/{chatNodeId}Get a single chat by node id.
Auth: Bearer token
/api/v1/chats/{chatNodeId}/messageSend a message to a chat.
{
"chatnodeid": "247fn://...",
"usernodeid": "247fn://...",
"text": "Hello",
"lang": "en",
"files": [
{
"fileid": "...",
"mimetype": "image/png",
"bucketid": "...",
"fileversion": "..."
}
]
}
Auth: Bearer token
/api/v1/admin/chatsAdmin-only: list chats with user info and unread count.
Auth: Bearer token (appsuperuser)
/api/v1/filesRequest pre-signed upload URL for attachments.
{
"count": 1,
"extensions": [
{ "nodeid": "247fn://...", "extension": "png" }
]
}
Auth: Bearer token
Base URL: same host as REST API. Client should connect with auth.token set to access token.
joinChat{ "chatNodeId": "247fn://..." }
presence.join{ "chatNodeId": "247fn://...", "firstName": "User" }
typing.start / typing.stop{ "chatNodeId": "247fn://...", "firstName": "User" }
chat.updatedPayload contains chatNodeId and last message data.
presence.update / typing.updatePresence and typing updates for the active chat.