Send Instagram Text
curl --request POST \
--url https://api.flowiq.live/send-instagram \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instagram_id": "17841400000000000",
"message_type": "text",
"text": "Hello! How can we help?"
}
'import requests
url = "https://api.flowiq.live/send-instagram"
payload = {
"instagram_id": "17841400000000000",
"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({
instagram_id: '17841400000000000',
message_type: 'text',
text: 'Hello! How can we help?'
})
};
fetch('https://api.flowiq.live/send-instagram', 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-instagram",
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([
'instagram_id' => '17841400000000000',
'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-instagram"
payload := strings.NewReader("{\n \"instagram_id\": \"17841400000000000\",\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-instagram")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instagram_id\": \"17841400000000000\",\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-instagram")
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 \"instagram_id\": \"17841400000000000\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer",
"instagram_username": "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>"
}Send Messages
Send Instagram Text
Send an Instagram text message to an existing contact through FlowIQ, using your organization’s API key.
POST
/
send-instagram
Send Instagram Text
curl --request POST \
--url https://api.flowiq.live/send-instagram \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instagram_id": "17841400000000000",
"message_type": "text",
"text": "Hello! How can we help?"
}
'import requests
url = "https://api.flowiq.live/send-instagram"
payload = {
"instagram_id": "17841400000000000",
"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({
instagram_id: '17841400000000000',
message_type: 'text',
text: 'Hello! How can we help?'
})
};
fetch('https://api.flowiq.live/send-instagram', 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-instagram",
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([
'instagram_id' => '17841400000000000',
'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-instagram"
payload := strings.NewReader("{\n \"instagram_id\": \"17841400000000000\",\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-instagram")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instagram_id\": \"17841400000000000\",\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-instagram")
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 \"instagram_id\": \"17841400000000000\",\n \"message_type\": \"text\",\n \"text\": \"Hello! How can we help?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer",
"instagram_username": "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>"
}These Instagram endpoints are prepared for rollout and are not yet deployed.
fiq_ API key as WhatsApp.
Basic Usage
curl -X POST "https://api.flowiq.live/send-instagram" \
-H "Authorization: Bearer fiq_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instagram_id": "17841400000000000",
"message_type": "text",
"text": "Hello! How can we help?"
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
instagram_id | string | One recipient identifier | Instagram-scoped ID, supplied as a string |
contact_id | string | One recipient identifier | FlowIQ contact UUID, as an alternative to instagram_id |
message_type | string | No | Defaults to "text" |
text | string | Yes | Message text, 1–1000 characters |
instagram_id. If both identifiers are supplied, they must refer to the same contact. Find an ID with Instagram Conversations.
Instagram permissions and messaging windows still apply. Eligible replies to a recent comment can use the inbox sender’s private-reply fallback.
Response
Success (200)
{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "text",
"contact": {
"id": "00000000-0000-4000-8000-000000000003",
"name": "Customer",
"instagram_username": "customer"
}
}
message_id is the Instagram message ID. Success means Instagram 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 returns 401, and an unknown contact returns 404.
502 or 504 can mean the send outcome is unknown. Read the conversation before retrying; the sender does not retry automatically.
Webhook Events
Registerplatform: "instagram" on Create Webhook. See Instagram 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

