POST

Chat.Conversations

Return recent messenger conversations from MongoDB messenger_meta for the logged-in account owner, ordered by last_update desc.

Permissions

  • User must be logged in with a valid bearer token.
  • Returned or changed records are limited by the user permissions, team access, folder access, and account settings.

Action

  • Runs the Chat.Conversations function and returns JSON.

Push Service

No push is sent because this function only reads data or returns helper information.

Automation

No automation is run for this function.

Special Instructions

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.

Required Parameters

No body parameters are required for this function.

Optional Parameters

NameTypeSampleWhat it gives
page
post
int1Page number (1-based). Ignored when start/offset is sent.
limit
post
int25Maximum conversations to return. Values above 25 are capped to 25.
per_page
post
int25Alias for limit.
start
post
int0Optional row offset. When set, overrides page-based skip.
sort
post
stringlast_update_descSort hint for the UI. Backend always sorts by last_update descending.

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Chat.Conversations",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "page": "1",
        "limit": "25"
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Chat.Conversations",
    "url_domain": "https:\/\/{domain}\/app\/Chat.Conversations"
}

Endpoint

POST /app/Chat.Conversations
POST https://{user}.bull36.com/app/Chat.Conversations
POST https://{domain}/app/Chat.Conversations

Sample Output

{
    "success": 1,
    "owner": 14,
    "page": 1,
    "limit": 25,
    "total": 120,
    "count": 25,
    "source": "mongo.messenger_meta",
    "data": [
        {
            "id": "69e704aa3541bea180392e5f",
            "messenger_meta_id": "69e704aa3541bea180392e5f",
            "customer_id": 123,
            "contactus_id": 123,
            "cust_name": "Customer Name",
            "last_message": "Latest message preview",
            "last_update": "2026-07-20 10:17:00"
        }
    ]
}

Count Only

Use the matching count route with the same filters when the UI only needs total rows for paging.

{
    "url": "\/app\/Chat.Conversations",
    "url_user": "https:\/\/{user}.bull36.com\/app\/Chat.Conversations",
    "url_domain": "https:\/\/{domain}\/app\/Chat.Conversations",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": [],
    "sample_output": {
        "success": 1,
        "count": 123
    },
    "notes": {
        "total": "Total matching conversations.",
        "count": "Conversations in this page.",
        "total_pages": "Pages available at this limit."
    }
}

Count JavaScript

const token = 'YOUR TOKEN';
const body = new URLSearchParams();

const res = await fetch('https://{domain}/app/Chat.Conversations', {
  method: 'POST',
  headers: { Authorization: `Bearer ${token}` },
  body
});
const data = await res.json();
console.log(data.count);

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('page', '1');
body.set('limit', '25');
const res = await fetch('/app/Chat.Conversations', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
const data = await res.json();
console.log(data);

Error Example

{
    "success": "0",
    "error": "bearer_token_required",
    "message": "Authorization bearer token is required. Send header: Authorization: Bearer YOUR TOKEN"
}