Blooio API Reference

Send attachments

Include media URLs when sending messages

Supported attachments

Pass an array of publicly accessible URLs in the attachments field. Common formats: images, PDFs, and other files.

curl -X POST 'https://backend.blooio.com/v2/api/chats/%2B15551234567/messages' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "attachments": [
      "https://cdn.example.com/image.png"
    ],
    "metadata": { "order_id": "123" }
  }'
import fetch from 'node-fetch'

const chatId = encodeURIComponent('+15551234567')
await fetch(`https://backend.blooio.com/v2/api/chats/${chatId}/messages`, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.BLOOIO_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    attachments: ['https://cdn.example.com/image.png']
  })
})
import os, requests
from urllib.parse import quote

chat_id = quote('+15551234567', safe='')
requests.post(f'https://backend.blooio.com/v2/api/chats/{chat_id}/messages',
  headers={
    'Authorization': f"Bearer {os.environ['BLOOIO_API_KEY']}",
    'Content-Type': 'application/json'
  },
  json={
    'attachments': ['https://cdn.example.com/image.png']
  }
)

Named attachments

You can also provide attachment objects with custom filenames:

{
  "attachments": [
    { "url": "https://cdn.example.com/doc.pdf", "name": "contract.pdf" }
  ]
}

Best practices

  • Host media on stable, publicly reachable URLs (HTTPS)
  • Prefer reasonably sized images to reduce delivery latency
  • Include metadata to correlate messages in your system

On this page