Send a message
Goal: send a message into a dialogue yourself (an operator note or an automation).
# Scheduled send — respects working hours, typing delay, and the debounce guard
curl -s https://api.sance.ai/v1/messages/ \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "dialogue_id": 9001, "message": "Hi Jane! Following up — is now a good time?" }'
# Immediate send — bypasses scheduler filters and working hours
curl -s https://api.sance.ai/v1/messages/instant \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "product_id": 42, "contact_id": 5001, "dialogue_id": 9001, "message": "Confirmed for 15:00." }'
The scheduled endpoint returns the created message part(s) and supports attribution and
scheduling options (send_not_before, reply_on_msg_id, delay_enabled,
schedule_enabled, split, debounce_guard). To edit or reschedule a bot message
afterwards, use PATCH /v1/messages/{message_id} (set force_send_now: true to send now).
See: POST /v1/messages/, POST /v1/messages/instant, PATCH /v1/messages/{message_id}.