Project Blue
Project Blue
API Reference
  • Documentation
  • Introduction
    Authentication
    Send Message
    CRM Integration
    Check iMessage
    Get Lines
    Supported Media
    Voice Memos & Audio
    Calling
    Webhooks
    Error Handling
API Documentation
v1.0
Project Blue
REST API

Project Blue API

Send iMessages and SMS directly from your application. Integrate messaging into your CRM, workflows, or custom tools with a single API call.

Base URL

https://api.tryprojectblue.com

Authentication

All API requests require a Bearer token in the Authorization header. You can generate API keys from within your Project Blue dashboard under Settings → API Keys.

API Keys settings in the Project Blue dashboard
HTTP Header
Authorization: Bearer YOUR_API_KEY

Keep your API keys secure

Never expose your API key in client-side code or public repositories. Always make API calls from your server.

Send Message

POST
/send-api-message

Send a message to a phone number via iMessage or SMS. If the recipient has iMessage, the message is delivered as an iMessage (blue bubble). Otherwise, it falls back to SMS automatically.

Request Body
ParameterTypeRequiredDescription
message

string

Required

The text content of the message to send.

phone

string

Required

Recipient phone number. Accepts many formats — we normalize to E.164 (e.g. +15551234567).

lineId

string (UUID v4)

Optional

Optional sender line override. Use the lineId value returned from GET /get-lines. When omitted, messages are load balanced across available lines.

mediaAttachmentUrl

string

Optional

URL to an image, video, or contact card attachment.

audioAttachmentUrl

string

Optional

URL to an audio file sent as a voice memo.

enableAiVoiceMemo

boolean

Optional

When true, generates an AI voice memo from the message text using text-to-speech.

shouldAutoCreateContact

boolean

Optional

Defaults to true. When enabled and a supported CRM is connected (HighLevel or HubSpot), automatically creates the contact in your CRM if they don't already exist.

The phone parameter is flexible — we accept formats like (555) 123-4567, 555.123.4567, +15551234567, and more. All numbers are normalized to E.164 format before sending.

When lineId is provided, we route through that line. If it is omitted, message sends continue to use default load balancing across your available lines.

Example Request
cURL
curl -X POST https://api.tryprojectblue.com/send-api-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hey! Just following up on our conversation.",
    "phone": "+15551234567"
  }'
Example with Media Attachment
cURL
curl -X POST https://api.tryprojectblue.com/send-api-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Check out this property!",
    "phone": "+15551234567",
    "mediaAttachmentUrl": "https://example.com/property-photo.jpg"
  }'
Example with AI Voice Memo
cURL
curl -X POST https://api.tryprojectblue.com/send-api-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hey, wanted to quickly touch base about your appointment tomorrow.",
    "phone": "+15551234567",
    "enableAiVoiceMemo": true
  }'
Example with Line Override
cURL
curl -X POST https://api.tryprojectblue.com/send-api-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hi from a specific line.",
    "phone": "+15551234567",
    "lineId": "a3f8c2d1-b4e9-4f2a-c8d3-e1f0a2b3c4d5"
  }'
Success Response
JSON — 200 OK
{
  "success": true,
  "message": "Message added to queue",
  "messageType": "iMessage",
  "phone": "+15551234567",
  "devicePhoneNumber": "+15559876543",
  "mediaAttachmentUrl": null,
  "audioAttachmentUrl": null
}
Error Response (Invalid Line Override)
JSON — 400 Bad Request
{
  "error": "Invalid lineId. Expected a UUID v4 token returned from GET /get-lines."
}

CRM Integration

The Send Message endpoint works hand-in-hand with your CRM. If you have HighLevel or HubSpot connected, outbound messages sent through the API will automatically appear inside your CRM — just like messages sent from the Project Blue app.

Auto-Create Contacts

By default, shouldAutoCreateContact is true. This means if you send an outbound message and the recipient does not already exist as a contact in your CRM, we will automatically create the contact for you along with the message.

Set shouldAutoCreateContact to false if you only want messages logged for contacts that already exist in your CRM.

This field is only relevant if you have a supported CRM connected

If no CRM is connected, shouldAutoCreateContact has no effect. Messages are still sent normally regardless of this setting.

HighLevel

Outbound messages are synced directly into Conversations. If the contact doesn't exist and auto-create is enabled, we create the contact and the message appears in their conversation thread.

HubSpot

Outbound messages are logged as an activity on the contact record. If you have a HubSpot Inbox enabled, the message is also delivered there for your team to see and reply from.

If the contact doesn't exist and auto-create is enabled, we create the contact in HubSpot first, then log the activity.

cURL
curl -X POST https://api.tryprojectblue.com/send-api-message \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hey! Following up on our call earlier.",
    "phone": "+15551234567",
    "shouldAutoCreateContact": false
  }'

In the example above, the message will only be logged in your CRM if the contact already exists. No new contact will be created.

Check iMessage Availability

POST
/api-check-imessage-availability

Check whether a phone number is reachable via iMessage before sending. Useful for routing logic or pre-qualifying contacts.

Request Body
ParameterTypeRequiredDescription
phone

string

Required

The phone number to check. Accepts many formats — we normalize to E.164.

Example Request
cURL
curl -X POST https://api.tryprojectblue.com/api-check-imessage-availability \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+15551234567"
  }'
Success Response
JSON — 200 OK
{
  "normalizedPhone": "+15551234567",
  "isIMessageAvailable": true
}
Error Responses
JSON — 400 Bad Request
{
  "error": "Invalid phone number format (Not a valid phone number). Please use format +12345678901"
}
200

Phone checked successfully

400

Invalid phone number format

401

Missing or invalid API key

429

Rate limit exceeded

500

Internal server error

Get Lines

GET
/get-lines

Fetch all sending lines available to your account. Pass the returned lineId value to /send-api-message when you want to force a specific line.

Example Request
cURL
curl -X GET https://api.tryprojectblue.com/get-lines \
  -H "Authorization: Bearer YOUR_API_KEY"
Success Response
JSON — 200 OK
[
  {
    "lineId": "a3f8c2d1-b4e9-4f2a-c8d3-e1f0a2b3c4d5",
    "devicePhoneNumber": "+15559876543",
    "customName": "Main Line"
  },
  {
    "lineId": "9c2e4a1b-d3f8-4e1c-a2b4-c5d6e7f8a9b0",
    "devicePhoneNumber": "+15557654321",
    "customName": "Secondary Line"
  }
]
Error Response
JSON — 401 Unauthorized
{
  "error": "Missing or invalid Authorization header"
}

Supported Media Types

Use the mediaAttachmentUrl field to send rich media with your messages. The following formats are supported:

Images
JPEG / JPG
PNG
GIF
WebP
Videos
MP4
MOV
AVI
MKV
FLV
WebM
Contact Cards
VCF / vCard

Voice Memos & Audio

Use audioAttachmentUrl to send audio files as voice memos. The following formats are supported:

M4A
MP3
WAV
OGG
WebM
CAF

AI Voice Memos

Set enableAiVoiceMemo to true and include a message to generate a natural-sounding voice memo via text-to-speech. No audio file needed — we generate it for you.

Calling

Voice calling is not provided by the Project Blue API. Outbound and inbound calls are handled by Twilio. We give you a Twilio API key in the webapp so you can build calling yourself.

Your Twilio API key is already created for you. You don't add phone numbers or caller ID — our team provides those.

Getting your Twilio API key

You must be on an API or Zapier based account.

In the Project Blue portal, go to Settings API Keys. Your Twilio API key is exposed there.

Twilio API key in Project Blue Settings → API Keys

Use Twilio's Voice API documentation to implement outbound and inbound calls.

SMS, iMessage, and MMS stay on the Project Blue API. Only voice calling uses your Twilio key and Twilio's API.

Webhooks

Webhooks let you receive real-time notifications when messages are sent or received. Configure webhooks from within the Project Blue dashboard alongside your API keys.

Configuration

In the Project Blue app, you can:

  • Paste the webhook URL you want to receive events at

  • Toggle whether the webhook fires for outbound messages, inbound messages, or both

  • Send test payloads to verify your endpoint is working

Webhook configuration in the Project Blue dashboard
Webhook Payload

Every webhook event delivers the same payload structure. The direction field indicates whether the message was inbound or outbound.

ParameterTypeRequiredDescription
message

string

Required

The text content of the message.

destination

string

Required

The phone number the message was sent to, in E.164 format.

receivedAt

string

Required

ISO 8601 timestamp of when the message was received.

direction

string

Required

Either "inbound" or "outbound", based on message direction.

messageId

number

Required

Unique numeric identifier for the message.

guid

string

Required

Globally unique message identifier.

linePhoneNumber

string

Required

The Project Blue line phone number associated with this message.

Example — Inbound
JSON — Inbound Webhook
{
  "message": "Yes, I'm interested! When can we schedule?",
  "destination": "+15551234567",
  "receivedAt": "2026-03-04T18:30:00.000Z",
  "direction": "inbound",
  "messageId": 456,
  "guid": "sample-guid-1234",
  "linePhoneNumber": "+15559876543"
}
Example — Outbound
JSON — Outbound Webhook
{
  "message": "Great! Let's book you in for Thursday at 2pm.",
  "destination": "+15551234567",
  "receivedAt": "2026-03-04T18:31:00.000Z",
  "direction": "outbound",
  "messageId": 789,
  "guid": "sample-guid-5678",
  "linePhoneNumber": "+15559876543"
}

Error Handling

The API uses standard HTTP status codes. All error responses include a JSON body with an error field describing what went wrong.

JSON — 401 Unauthorized
{
  "error": "Missing or invalid Authorization header"
}
200

Message sent successfully

400

Invalid request body or missing required fields

401

Missing or invalid API key

429

Rate limit exceeded

500

Internal server error

© 2026 Project Blue Services LLC

WebsiteContact