Send iMessages at scale

Integrate AVA's iMessage API to send messages programmatically. Perfect for notifications, customer communications, and automated workflows.

REST API99.9% Uptime
Request API Access

Authentication

All API requests require Bearer token authentication. Include your API key in the Authorization header of every request.

Request Header
Authorization: Bearer YOUR_API_KEY

Security Best Practice

Never expose your API key in client-side code, public repositories, or share it publicly.

Send Message

POST

Send an iMessage to any phone number. This endpoint allows you to programmatically send messages through Apple's iMessage network.

POST /api/send

Example Request

curl -X POST https://chat.buzzedtech.com/api/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1234567890",
    "message": "Hello from AVA!"
  }'

Request Body

phonerequired

The recipient's phone number in E.164 format (e.g., +1234567890)

string

messagerequired

The message content to send

string

Response

200 OK
{
  "success": true,
  "message_id": "msg_abc123",
  "timestamp": "2026-01-25T12:00:00Z"
}

Get Messages

GET

Retrieve message history for a specific phone number. Returns all messages exchanged with that contact.

GET /api/messages/:phone

Example Request

curl -X GET https://chat.buzzedtech.com/api/messages/+1234567890 \
  -H "Authorization: Bearer YOUR_API_KEY"

Path Parameters

phonerequired

The phone number in E.164 format (e.g., +1234567890)

string

Query Parameters

limitoptional

Maximum number of messages to return (default: 50, max: 100)

integer

offsetoptional

Number of messages to skip for pagination (default: 0)

integer

Response

200 OK
{
  "success": true,
  "messages": [
    {
      "id": "msg_abc123",
      "phone": "+1234567890",
      "message": "Hello!",
      "direction": "outbound",
      "timestamp": "2026-01-25T12:00:00Z",
      "status": "delivered"
    },
    {
      "id": "msg_def456",
      "phone": "+1234567890",
      "message": "Hi there!",
      "direction": "inbound",
      "timestamp": "2026-01-25T12:01:00Z",
      "status": "received"
    }
  ],
  "total": 2,
  "limit": 50,
  "offset": 0
}

Receive Messages (Polling)

GET

Poll for new incoming messages. Use this endpoint to check for messages received since the last poll. Recommended polling interval: 5-10 seconds.

GET /api/messages/poll

Example Request

curl -X GET "https://chat.buzzedtech.com/api/messages/poll?since=2026-01-25T12:00:00Z" \
  -H "Authorization: Bearer YOUR_API_KEY"

Query Parameters

sinceoptional

ISO 8601 timestamp to get messages received after this time

string (ISO 8601)

phoneoptional

Filter messages from a specific phone number

string

Response

200 OK
{
  "success": true,
  "messages": [
    {
      "id": "msg_xyz789",
      "phone": "+1234567890",
      "message": "New inbound message",
      "direction": "inbound",
      "timestamp": "2026-01-25T12:05:30Z",
      "status": "received"
    }
  ],
  "count": 1,
  "has_more": false
}

Polling Best Practices

  • Poll every 5-10 seconds to balance responsiveness and server load
  • Always use the since parameter to avoid fetching duplicate messages
  • Store the latest message timestamp and use it in the next poll
  • Implement exponential backoff on errors to avoid overwhelming the API

Generate Message with AVA

POST

Generate contextually appropriate message responses using AVA's AI. Provide conversation context and let AVA craft the perfect reply.

POST /api/generate

Example Request

curl -X POST https://chat.buzzedtech.com/api/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1234567890",
    "context": [
      {
        "role": "user",
        "content": "What are your business hours?"
      }
    ],
    "instructions": "Respond professionally and mention we are open 9-5 weekdays"
  }'

Request Body

phonerequired

The phone number in E.164 format to personalize the response

string

contextrequired

Array of conversation messages providing context. Each message has role (user/assistant) and content

array of objects

instructionsoptional

Additional instructions to guide AVA's response tone, style, or content

string

auto_sendoptional

If true, automatically sends the generated message via iMessage (default: false)

boolean

Response

200 OK
{
  "success": true,
  "generated_message": "We're open Monday through Friday from 9 AM to 5 PM. Feel free to reach out during those hours!",
  "message_id": "msg_ai_abc123",
  "sent": false,
  "timestamp": "2026-01-25T12:00:00Z"
}

AI Generation Use Cases

  • Customer support responses with context awareness
  • Automated FAQ answers tailored to conversation history
  • Smart message drafts that match your business tone
  • Multi-language support with natural translations

Errors

The API uses standard HTTP status codes to indicate success or failure. All errors include a descriptive message.

400

Bad Request

Invalid phone number or message format

401

Unauthorized

Invalid or missing API key

429

Too Many Requests

Rate limit exceeded - slow down your requests

500

Internal Server Error

Something went wrong on our end - try again later

Ready to integrate?

Get your API key and start sending iMessages in minutes. Our team is here to help with integration.

Request API Access