POST

Messages.Add

Add a customer message in table client_message. The body is stored like the Biz1 dashboard (html_body_path HTML file + message/note) so Messages inbox Original message can display it. After a successful save the route runs message.created automation and emits realtime message.created.

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

  • Creates a Messages record or sends the requested data after validation.

Push Service

Pushes event message.created to users who should see this change.

Automation

Runs automation event message.created with the record id and submitted parameters after the action succeeds.

Special Instructions

  • Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
  • Send parameters as POST body fields exactly as documented.
  • Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.

Required Parameters

NameTypeSampleExplanation
customer_id
post
int123Customer id that owns the message.
message
post
stringCalled customer.Message body. You may also send body or note.

Optional Parameters

NameTypeSampleWhat it gives
subject
post
stringFollow upMessage subject.
email
post
string[email protected]Recipient email when relevant.
multiple_email
post
json|string["[email protected]"]Multiple recipients.
label_id
post
int3Optional message label.
direction
post
int1Message direction flag.
attachments
post
json|string[]Saved attachment references.

Authentication

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

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Messages.Add",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer YOUR TOKEN"
    },
    "body": {
        "customer_id": "123",
        "message": "Called customer."
    },
    "url_user": "https:\/\/{user}.bull36.com\/app\/Messages.Add",
    "url_domain": "https:\/\/{domain}\/app\/Messages.Add"
}

Endpoint

POST /app/Messages.Add
POST https://{user}.bull36.com/app/Messages.Add
POST https://{domain}/app/Messages.Add

Sample Output

{
    "success": 1,
    "message_id": "101",
    "customer_id": "123",
    "message": "Message added",
    "automation_event": "message.created",
    "socket_event": "message.created"
}

JavaScript Example

const token = 'YOUR TOKEN';
const body = new URLSearchParams({ customer_id: '123', message: 'Called customer.' });
const res = await fetch('/app/Messages.Add', { method: 'POST', headers: { Authorization: `Bearer ${token}` }, body });
const data = await res.json();

Error Example

{
    "success": "0",
    "message": "Missing required parameter: customer_id"
}