Authentication
All API requests require Bearer token authentication. Include your API key in the Authorization header of every request.
Authorization: Bearer YOUR_API_KEYSecurity Best Practice
Never expose your API key in client-side code, public repositories, or share it publicly.
Send Message
POSTSend an iMessage to any phone number. This endpoint allows you to programmatically send messages through Apple's iMessage network.
POST /api/sendExample 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
phonerequiredThe recipient's phone number in E.164 format (e.g., +1234567890)
string
messagerequiredThe message content to send
string
Response
{
"success": true,
"message_id": "msg_abc123",
"timestamp": "2026-01-25T12:00:00Z"
}Get Messages
GETRetrieve message history for a specific phone number. Returns all messages exchanged with that contact.
GET /api/messages/:phoneExample Request
curl -X GET https://chat.buzzedtech.com/api/messages/+1234567890 \
-H "Authorization: Bearer YOUR_API_KEY"Path Parameters
phonerequiredThe phone number in E.164 format (e.g., +1234567890)
string
Query Parameters
limitoptionalMaximum number of messages to return (default: 50, max: 100)
integer
offsetoptionalNumber of messages to skip for pagination (default: 0)
integer
Response
{
"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)
GETPoll 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/pollExample 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
sinceoptionalISO 8601 timestamp to get messages received after this time
string (ISO 8601)
phoneoptionalFilter messages from a specific phone number
string
Response
{
"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
sinceparameter 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
POSTGenerate contextually appropriate message responses using AVA's AI. Provide conversation context and let AVA craft the perfect reply.
POST /api/generateExample 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
phonerequiredThe phone number in E.164 format to personalize the response
string
contextrequiredArray of conversation messages providing context. Each message has role (user/assistant) and content
array of objects
instructionsoptionalAdditional instructions to guide AVA's response tone, style, or content
string
auto_sendoptionalIf true, automatically sends the generated message via iMessage (default: false)
boolean
Response
{
"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.
400Bad Request
Invalid phone number or message format
401Unauthorized
Invalid or missing API key
429Too Many Requests
Rate limit exceeded - slow down your requests
500Internal 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