Send Instagram Video
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": "video",
"media_url": "https://example.com/demo.mp4"
}
'import requests
url = "https://api.flowiq.live/send-instagram"
payload = {
"instagram_id": "17841400000000000",
"message_type": "video",
"media_url": "https://example.com/demo.mp4"
}
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: 'video',
media_url: 'https://example.com/demo.mp4'
})
};
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' => 'video',
'media_url' => 'https://example.com/demo.mp4'
]),
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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "video",
"quoted": false,
"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 Video
Send an Instagram video message to an existing contact through FlowIQ, using your organization’s API key.
POST
/
send-instagram
Send Instagram Video
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": "video",
"media_url": "https://example.com/demo.mp4"
}
'import requests
url = "https://api.flowiq.live/send-instagram"
payload = {
"instagram_id": "17841400000000000",
"message_type": "video",
"media_url": "https://example.com/demo.mp4"
}
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: 'video',
media_url: 'https://example.com/demo.mp4'
})
};
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' => 'video',
'media_url' => 'https://example.com/demo.mp4'
]),
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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\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\": \"video\",\n \"media_url\": \"https://example.com/demo.mp4\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "video",
"quoted": false,
"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 a video message to an existing Instagram contact. Use the same organization
Use a contact belonging to the API key’s organization. A username or phone number cannot replace
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": "video",
"media_url": "https://example.com/demo.mp4"
}'
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 | Yes | Must be "video" |
media_url | string | Yes | Publicly accessible HTTPS URL for the media |
reply_to_message_id | string | No | Quote an earlier message in this conversation. See Reply to a specific message |
instagram_id. If both identifiers are supplied, they must refer to the same contact. Find an ID with Instagram Conversations.
Keep the source URL available: FlowIQ stores that URL in the inbox. Send a caption separately using Send Instagram Text; a combined caption and media request is rejected.
Response
Success (200)
{
"success": true,
"message_id": "ig.message.example",
"recipient_id": "17841400000000000",
"message_type": "video",
"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
Body
application/json
- Option 1
- Option 2
Optional. Quote an earlier message in this conversation: its FlowIQ message id or its instagram_message_id (both returned by GET /instagram-conversations and by webhooks). On accounts connected directly to Instagram the customer sees the quoted message above your reply. On accounts connected through a partner inbox the message is sent without the quote (quoted: false). A message that is not in this conversation is refused with 400.
Maximum string length:
200Response
Message accepted

