[{"data":1,"prerenderedAt":561},["ShallowReactive",2],{"doc-article-messaging-send-media":3,"doc-siblings-messaging":550},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"code_curl":16,"code_node":17,"code_python":18,"code_go":19,"body":20,"_type":544,"_id":545,"_source":546,"_file":547,"_stem":548,"_extension":549},"\u002Fdeveloper\u002Fmessaging\u002Fsend-media","messaging",false,"","Send Media Messages","Send images, videos, documents, and audio files via remote URLs.",2,"beginner","4 minutes",[14,15],"\u002Fdocs\u002Fmessaging\u002Fsend-text","\u002Fdocs\u002Fmessaging\u002Fsend-template","# Send Image via remote URL\ncurl -X POST \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fmessages\" \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"to\": \"918856879188\",\n    \"type\": \"image\",\n    \"image\": {\n      \"link\": \"https:\u002F\u002Faisoule.com\u002Fimages\u002Fhome\u002Fcalling-feature.webp\",\n      \"caption\": \"Check out our latest WebRTC feature dashboard! 📞\"\n    }\n  }'\n","\u002F\u002F Dispatch media image via Node.js\nconst axios = require('axios');\n\naxios.post('https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fmessages', {\n  to: '918856879188',\n  type: 'image',\n  image: {\n    link: 'https:\u002F\u002Faisoule.com\u002Fimages\u002Fhome\u002Fcalling-feature.webp',\n    caption: 'Check out our latest WebRTC feature!'\n  }\n}, {\n  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }\n})\n.then(res => console.log('Image sent:', res.data.message_id))\n.catch(err => console.error('Media Error:', err.message));\n","# Send media image in Python\nimport requests\n\npayload = {\n    \"to\": \"918856879188\",\n    \"type\": \"image\",\n    \"image\": {\n        \"link\": \"https:\u002F\u002Faisoule.com\u002Fimages\u002Fhome\u002Fcalling-feature.webp\",\n        \"caption\": \"Check out our latest WebRTC feature!\"\n    }\n}\nheaders = {\n    \"Authorization\": \"Bearer YOUR_API_KEY\",\n    \"Content-Type\": \"application\u002Fjson\"\n}\nres = requests.post(\"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fmessages\", json=payload, headers=headers)\nprint(\"Response:\", res.json())\n","\u002F\u002F Send media image in Go\npackage main\n\nimport (\n    \"bytes\"\n    \"fmt\"\n    \"net\u002Fhttp\"\n    \"io\"\n)\n\nfunc main() {\n    jsonStr := []byte(`{\n        \"to\": \"918856879188\",\n        \"type\": \"image\",\n        \"image\": {\n            \"link\": \"https:\u002F\u002Faisoule.com\u002Fimages\u002Fhome\u002Fcalling-feature.webp\",\n            \"caption\": \"Check out our latest WebRTC feature!\"\n        }\n    }`)\n    req, _ := http.NewRequest(\"POST\", \"https:\u002F\u002Fapi.aisoule.com\u002Fv1\u002Fmessages\", bytes.NewBuffer(jsonStr))\n    req.Header.Set(\"Authorization\", \"Bearer YOUR_API_KEY\")\n    req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n    \n    client := &http.Client{}\n    resp, _ := client.Do(req)\n    defer resp.Body.Close()\n    \n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(\"Sent:\", string(body))\n}\n",{"type":21,"children":22,"toc":539},"root",[23,31,37,44,57,63,272,278],{"type":24,"tag":25,"props":26,"children":28},"element","h1",{"id":27},"send-media-messages",[29],{"type":30,"value":8},"text",{"type":24,"tag":32,"props":33,"children":34},"p",{},[35],{"type":30,"value":36},"Send images, video clips, invoice PDFs, or audio guides directly by providing remote HTTP links. The AISoule engine downloads and encodes these files seamlessly for Meta's servers.",{"type":24,"tag":38,"props":39,"children":41},"h2",{"id":40},"endpoint",[42],{"type":30,"value":43},"Endpoint",{"type":24,"tag":45,"props":46,"children":51},"pre",{"className":47,"code":49,"language":50,"meta":7},[48],"language-http","POST \u002Fv1\u002Fmessages\n","http",[52],{"type":24,"tag":53,"props":54,"children":55},"code",{"__ignoreMap":7},[56],{"type":30,"value":49},{"type":24,"tag":38,"props":58,"children":60},{"id":59},"supported-media-types-constraints",[61],{"type":30,"value":62},"Supported Media Types & Constraints",{"type":24,"tag":64,"props":65,"children":66},"table",{},[67,92],{"type":24,"tag":68,"props":69,"children":70},"thead",{},[71],{"type":24,"tag":72,"props":73,"children":74},"tr",{},[75,82,87],{"type":24,"tag":76,"props":77,"children":79},"th",{"align":78},"left",[80],{"type":30,"value":81},"Type",{"type":24,"tag":76,"props":83,"children":84},{"align":78},[85],{"type":30,"value":86},"Formats Supported",{"type":24,"tag":76,"props":88,"children":89},{"align":78},[90],{"type":30,"value":91},"Max File Size",{"type":24,"tag":93,"props":94,"children":95},"tbody",{},[96,142,180,230],{"type":24,"tag":72,"props":97,"children":98},{},[99,109,133],{"type":24,"tag":100,"props":101,"children":102},"td",{"align":78},[103],{"type":24,"tag":53,"props":104,"children":106},{"className":105},[],[107],{"type":30,"value":108},"image",{"type":24,"tag":100,"props":110,"children":111},{"align":78},[112,118,120,126,127],{"type":24,"tag":53,"props":113,"children":115},{"className":114},[],[116],{"type":30,"value":117},".png",{"type":30,"value":119},", ",{"type":24,"tag":53,"props":121,"children":123},{"className":122},[],[124],{"type":30,"value":125},".jpeg",{"type":30,"value":119},{"type":24,"tag":53,"props":128,"children":130},{"className":129},[],[131],{"type":30,"value":132},".webp",{"type":24,"tag":100,"props":134,"children":135},{"align":78},[136],{"type":24,"tag":137,"props":138,"children":139},"strong",{},[140],{"type":30,"value":141},"5 MB",{"type":24,"tag":72,"props":143,"children":144},{},[145,154,172],{"type":24,"tag":100,"props":146,"children":147},{"align":78},[148],{"type":24,"tag":53,"props":149,"children":151},{"className":150},[],[152],{"type":30,"value":153},"video",{"type":24,"tag":100,"props":155,"children":156},{"align":78},[157,163,164,170],{"type":24,"tag":53,"props":158,"children":160},{"className":159},[],[161],{"type":30,"value":162},".mp4",{"type":30,"value":119},{"type":24,"tag":53,"props":165,"children":167},{"className":166},[],[168],{"type":30,"value":169},".3gp",{"type":30,"value":171}," (H.264 codec recommended)",{"type":24,"tag":100,"props":173,"children":174},{"align":78},[175],{"type":24,"tag":137,"props":176,"children":177},{},[178],{"type":30,"value":179},"16 MB",{"type":24,"tag":72,"props":181,"children":182},{},[183,192,222],{"type":24,"tag":100,"props":184,"children":185},{"align":78},[186],{"type":24,"tag":53,"props":187,"children":189},{"className":188},[],[190],{"type":30,"value":191},"document",{"type":24,"tag":100,"props":193,"children":194},{"align":78},[195,201,202,208,209,215,216],{"type":24,"tag":53,"props":196,"children":198},{"className":197},[],[199],{"type":30,"value":200},".pdf",{"type":30,"value":119},{"type":24,"tag":53,"props":203,"children":205},{"className":204},[],[206],{"type":30,"value":207},".doc",{"type":30,"value":119},{"type":24,"tag":53,"props":210,"children":212},{"className":211},[],[213],{"type":30,"value":214},".xls",{"type":30,"value":119},{"type":24,"tag":53,"props":217,"children":219},{"className":218},[],[220],{"type":30,"value":221},".zip",{"type":24,"tag":100,"props":223,"children":224},{"align":78},[225],{"type":24,"tag":137,"props":226,"children":227},{},[228],{"type":30,"value":229},"100 MB",{"type":24,"tag":72,"props":231,"children":232},{},[233,242,265],{"type":24,"tag":100,"props":234,"children":235},{"align":78},[236],{"type":24,"tag":53,"props":237,"children":239},{"className":238},[],[240],{"type":30,"value":241},"audio",{"type":24,"tag":100,"props":243,"children":244},{"align":78},[245,251,252,258,259],{"type":24,"tag":53,"props":246,"children":248},{"className":247},[],[249],{"type":30,"value":250},".aac",{"type":30,"value":119},{"type":24,"tag":53,"props":253,"children":255},{"className":254},[],[256],{"type":30,"value":257},".mp3",{"type":30,"value":119},{"type":24,"tag":53,"props":260,"children":262},{"className":261},[],[263],{"type":30,"value":264},".ogg",{"type":24,"tag":100,"props":266,"children":267},{"align":78},[268],{"type":24,"tag":137,"props":269,"children":270},{},[271],{"type":30,"value":179},{"type":24,"tag":38,"props":273,"children":275},{"id":274},"payload-parameters",[276],{"type":30,"value":277},"Payload Parameters",{"type":24,"tag":64,"props":279,"children":280},{},[281,306],{"type":24,"tag":68,"props":282,"children":283},{},[284],{"type":24,"tag":72,"props":285,"children":286},{},[287,292,296,301],{"type":24,"tag":76,"props":288,"children":289},{"align":78},[290],{"type":30,"value":291},"Parameter",{"type":24,"tag":76,"props":293,"children":294},{"align":78},[295],{"type":30,"value":81},{"type":24,"tag":76,"props":297,"children":298},{"align":78},[299],{"type":30,"value":300},"Required",{"type":24,"tag":76,"props":302,"children":303},{"align":78},[304],{"type":30,"value":305},"Description",{"type":24,"tag":93,"props":307,"children":308},{},[309,343,401,448,480,510],{"type":24,"tag":72,"props":310,"children":311},{},[312,321,330,338],{"type":24,"tag":100,"props":313,"children":314},{"align":78},[315],{"type":24,"tag":53,"props":316,"children":318},{"className":317},[],[319],{"type":30,"value":320},"to",{"type":24,"tag":100,"props":322,"children":323},{"align":78},[324],{"type":24,"tag":53,"props":325,"children":327},{"className":326},[],[328],{"type":30,"value":329},"string",{"type":24,"tag":100,"props":331,"children":332},{"align":78},[333],{"type":24,"tag":137,"props":334,"children":335},{},[336],{"type":30,"value":337},"Yes",{"type":24,"tag":100,"props":339,"children":340},{"align":78},[341],{"type":30,"value":342},"Destination mobile number (country code prefix, no formatting).",{"type":24,"tag":72,"props":344,"children":345},{},[346,355,363,370],{"type":24,"tag":100,"props":347,"children":348},{"align":78},[349],{"type":24,"tag":53,"props":350,"children":352},{"className":351},[],[353],{"type":30,"value":354},"type",{"type":24,"tag":100,"props":356,"children":357},{"align":78},[358],{"type":24,"tag":53,"props":359,"children":361},{"className":360},[],[362],{"type":30,"value":329},{"type":24,"tag":100,"props":364,"children":365},{"align":78},[366],{"type":24,"tag":137,"props":367,"children":368},{},[369],{"type":30,"value":337},{"type":24,"tag":100,"props":371,"children":372},{"align":78},[373,375,380,381,386,387,392,394,399],{"type":30,"value":374},"Set to matching type: ",{"type":24,"tag":53,"props":376,"children":378},{"className":377},[],[379],{"type":30,"value":108},{"type":30,"value":119},{"type":24,"tag":53,"props":382,"children":384},{"className":383},[],[385],{"type":30,"value":153},{"type":30,"value":119},{"type":24,"tag":53,"props":388,"children":390},{"className":389},[],[391],{"type":30,"value":191},{"type":30,"value":393},", or ",{"type":24,"tag":53,"props":395,"children":397},{"className":396},[],[398],{"type":30,"value":241},{"type":30,"value":400},".",{"type":24,"tag":72,"props":402,"children":403},{},[404,413,422,429],{"type":24,"tag":100,"props":405,"children":406},{"align":78},[407],{"type":24,"tag":53,"props":408,"children":410},{"className":409},[],[411],{"type":30,"value":412},"[type]",{"type":24,"tag":100,"props":414,"children":415},{"align":78},[416],{"type":24,"tag":53,"props":417,"children":419},{"className":418},[],[420],{"type":30,"value":421},"object",{"type":24,"tag":100,"props":423,"children":424},{"align":78},[425],{"type":24,"tag":137,"props":426,"children":427},{},[428],{"type":30,"value":337},{"type":24,"tag":100,"props":430,"children":431},{"align":78},[432,434,439,441,446],{"type":30,"value":433},"The media payload wrapper matching your ",{"type":24,"tag":53,"props":435,"children":437},{"className":436},[],[438],{"type":30,"value":354},{"type":30,"value":440}," definition (e.g. ",{"type":24,"tag":53,"props":442,"children":444},{"className":443},[],[445],{"type":30,"value":108},{"type":30,"value":447}," parameter block).",{"type":24,"tag":72,"props":449,"children":450},{},[451,460,468,475],{"type":24,"tag":100,"props":452,"children":453},{"align":78},[454],{"type":24,"tag":53,"props":455,"children":457},{"className":456},[],[458],{"type":30,"value":459},"[type].link",{"type":24,"tag":100,"props":461,"children":462},{"align":78},[463],{"type":24,"tag":53,"props":464,"children":466},{"className":465},[],[467],{"type":30,"value":329},{"type":24,"tag":100,"props":469,"children":470},{"align":78},[471],{"type":24,"tag":137,"props":472,"children":473},{},[474],{"type":30,"value":337},{"type":24,"tag":100,"props":476,"children":477},{"align":78},[478],{"type":30,"value":479},"Secure HTTP URL hosting the public file to send.",{"type":24,"tag":72,"props":481,"children":482},{},[483,492,500,505],{"type":24,"tag":100,"props":484,"children":485},{"align":78},[486],{"type":24,"tag":53,"props":487,"children":489},{"className":488},[],[490],{"type":30,"value":491},"[type].caption",{"type":24,"tag":100,"props":493,"children":494},{"align":78},[495],{"type":24,"tag":53,"props":496,"children":498},{"className":497},[],[499],{"type":30,"value":329},{"type":24,"tag":100,"props":501,"children":502},{"align":78},[503],{"type":30,"value":504},"No",{"type":24,"tag":100,"props":506,"children":507},{"align":78},[508],{"type":30,"value":509},"Text description accompanying the image, video, or document.",{"type":24,"tag":72,"props":511,"children":512},{},[513,522,530,534],{"type":24,"tag":100,"props":514,"children":515},{"align":78},[516],{"type":24,"tag":53,"props":517,"children":519},{"className":518},[],[520],{"type":30,"value":521},"[type].filename",{"type":24,"tag":100,"props":523,"children":524},{"align":78},[525],{"type":24,"tag":53,"props":526,"children":528},{"className":527},[],[529],{"type":30,"value":329},{"type":24,"tag":100,"props":531,"children":532},{"align":78},[533],{"type":30,"value":504},{"type":24,"tag":100,"props":535,"children":536},{"align":78},[537],{"type":30,"value":538},"Descriptive filename overriding the URL string (mostly for documents).",{"title":7,"searchDepth":10,"depth":10,"links":540},[541,542,543],{"id":40,"depth":10,"text":43},{"id":59,"depth":10,"text":62},{"id":274,"depth":10,"text":277},"markdown","content:developer:messaging:send-media.md","content","developer\u002Fmessaging\u002Fsend-media.md","developer\u002Fmessaging\u002Fsend-media","md",[551,554,555,558],{"_path":552,"title":553},"\u002Fdeveloper\u002Fmessaging\u002Fsend-interactive","Send Interactive Messages",{"_path":4,"title":8},{"_path":556,"title":557},"\u002Fdeveloper\u002Fmessaging\u002Fsend-template","Send Template Messages",{"_path":559,"title":560},"\u002Fdeveloper\u002Fmessaging\u002Fsend-text","Send Text Messages",1780423178342]