Send Messenger Text
curl --request POST \
--url https://api.flowiq.live/send-messenger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messenger_id": "1234567890123456",
"message_type": "text",
"text": "Hello! How can we help?"
}
'import requests
url = "https://api.flowiq.live/send-messenger"
payload = {
"messenger_id": "1234567890123456",
"message_type": "text",
"text": "Hello! How can we help?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
messenger_id: '1234567890123456',
message_type: 'text',
text: 'Hello! How can we help?'
})
};
fetch('https://api.flowiq.live/send-messenger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flowiq.live/send-messenger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messenger_id' => '1234567890123456',
'message_type' => 'text',
'text' => 'Hello! How can we help?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowiq.live/send-messenger"
payload := strings.NewReader("{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flowiq.live/send-messenger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/send-messenger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "m_message.example",
"recipient_id": "1234567890123456",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Send Messages
Send Messenger Text
Send a Messenger text message to an existing contact of your Facebook Page through FlowIQ, using your organization’s API key.
POST
/
send-messenger
Send Messenger Text
curl --request POST \
--url https://api.flowiq.live/send-messenger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messenger_id": "1234567890123456",
"message_type": "text",
"text": "Hello! How can we help?"
}
'import requests
url = "https://api.flowiq.live/send-messenger"
payload = {
"messenger_id": "1234567890123456",
"message_type": "text",
"text": "Hello! How can we help?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
messenger_id: '1234567890123456',
message_type: 'text',
text: 'Hello! How can we help?'
})
};
fetch('https://api.flowiq.live/send-messenger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flowiq.live/send-messenger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'messenger_id' => '1234567890123456',
'message_type' => 'text',
'text' => 'Hello! How can we help?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowiq.live/send-messenger"
payload := strings.NewReader("{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flowiq.live/send-messenger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/send-messenger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messenger_id\": \"1234567890123456\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "m_message.example",
"recipient_id": "1234567890123456",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Send a text message to an existing Messenger contact of your Facebook Page. Use the same organization
Use a contact belonging to the API key’s organization. A name, email address or phone number cannot replace
fiq_ API key as WhatsApp.
Basic Usage
curl -X POST "https://api.flowiq.live/send-messenger" \
-H "Authorization: Bearer fiq_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messenger_id": "1234567890123456",
"message_type": "text",
"text": "Hello! How can we help?"
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
messenger_id | string | One recipient identifier | Page-scoped ID of the contact, supplied as a string |
contact_id | string | One recipient identifier | FlowIQ contact UUID, as an alternative to messenger_id |
message_type | string | No | Defaults to "text" |
text | string | Yes | Message text, 1–2000 characters |
messenger_id. If both identifiers are supplied, they must refer to the same contact. Find an ID with Messenger Conversations.
Messenger permissions and the 24-hour messaging window still apply.
Response
Success (200)
{
"success": true,
"message_id": "m_message.example",
"recipient_id": "1234567890123456",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer"
}
}
message_id is the Messenger message ID. Success means Messenger accepted the message; delivery and read receipts arrive separately when recorded.
Errors
Errors includesuccess: false and an error string. Invalid input returns 400, an invalid or expired key (or a Facebook Page that needs reconnecting) returns 401, an unknown contact returns 404, and a messaging limit returns 429.
502 or 504 can mean the send outcome is unknown. Read the conversation before retrying; the sender does not retry automatically.
Webhook Events
Registerplatform: "messenger" on Create Webhook. See Messenger event payloads, delivery authentication and signing.Authorizations
Your FlowIQ API key (from Settings → Profile → API Keys), sent as a bearer token. Format: Bearer fiq_YOUR_API_KEY
Body
application/json

