# iMessage Checker: Check if a Number Supports iMessage

> Use Blooio’s contact capabilities API to check whether a phone number or email address can receive iMessage, SMS, and FaceTime.

Source: https://blooio.com/guides/imessage-checker

## Overview

An iMessage checker identifies whether a contact can receive native iMessage before you route a workflow, trigger a CRM sequence, or use SMS fallback.

Blooio provides this lookup through a REST API endpoint. It accepts:

- A phone number in E.164 format
- An email address

The response reports the contact’s available capabilities for iMessage, SMS, and FaceTime.

## How It Works

1. Create a Blooio API key in the dashboard.
2. URL-encode the phone number or email address.
3. Send an authenticated request to the contact capabilities endpoint.
4. Check `capabilities.imessage`.
5. Store the result and `last_checked` timestamp in your CRM or application.
6. Prefer iMessage when available; otherwise use SMS fallback or another workflow route.

## API Endpoint

```text
GET https://api.blooio.com/v2/api/contacts/{contactId}/capabilities
```

Authenticate using a Bearer token:

```text
Authorization: Bearer YOUR_API_KEY
```

The `contactId` must be URL-encoded before it is placed in the request path.

| Original identifier | URL-encoded identifier |
|---|---|
| `+15551234567` | `%2B15551234567` |

### cURL Example

```bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.blooio.com/v2/api/contacts/%2B15551234567/capabilities"
```

## Response

```json
{
  "contact": "+15551234567",
  "type": "phone",
  "capabilities": {
    "imessage": true,
    "sms": true,
    "facetime": true
  },
  "last_checked": 1703123457000
}
```

### Response Fields

| Field | Meaning |
|---|---|
| `capabilities.imessage` | Native iMessage is available. |
| `capabilities.sms` | SMS delivery is available. |
| `capabilities.facetime` | FaceTime capability is available for supported workflows. |
| `last_checked` | Timestamp of the capability lookup. |

If `capabilities.imessage` is `true`, route the contact through iMessage. If it is `false` and `capabilities.sms` is `true`, use SMS fallback.

## JavaScript Example

```javascript
const BASE_URL = "https://api.blooio.com/v2/api";
const API_KEY = process.env.BLOOIO_API_KEY;

async function checkIMessage(identifier) {
  const contactId = encodeURIComponent(identifier);

  const response = await fetch(
    `${BASE_URL}/contacts/${contactId}/capabilities`,
    {
      headers: {
        Authorization: `Bearer ${API_KEY}`,
      },
    }
  );

  if (!response.ok) {
    throw new Error(`Capability check failed: ${response.status}`);
  }

  const result = await response.json();

  return {
    identifier: result.contact,
    canReceiveIMessage: Boolean(result.capabilities?.imessage),
    canReceiveSms: Boolean(result.capabilities?.sms),
    canReceiveFaceTime: Boolean(result.capabilities?.facetime),
    lastChecked: result.last_checked,
  };
}

const capability = await checkIMessage("+15551234567");

console.log(
  capability.canReceiveIMessage
    ? "Use iMessage"
    : "Use SMS fallback"
);
```

## Python Example

```python
import os
import requests
from urllib.parse import quote

BASE_URL = "https://api.blooio.com/v2/api"
API_KEY = os.environ["BLOOIO_API_KEY"]

def check_imessage(identifier: str) -> dict:
    contact_id = quote(identifier, safe="")

    response = requests.get(
        f"{BASE_URL}/contacts/{contact_id}/capabilities",
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=10,
    )
    response.raise_for_status()

    data = response.json()
    capabilities = data.get("capabilities", {})

    return {
        "identifier": data.get("contact"),
        "can_receive_imessage": bool(capabilities.get("imessage")),
        "can_receive_sms": bool(capabilities.get("sms")),
        "can_receive_facetime": bool(capabilities.get("facetime")),
        "last_checked": data.get("last_checked"),
    }

result = check_imessage("+15551234567")

print(
    "Use iMessage"
    if result["can_receive_imessage"]
    else "Use SMS fallback"
)
```

## Use Capability Data for Routing

Use the capability result to make a routing decision before sending. Save the expected protocol in contact metadata or your CRM, then send through Blooio’s normal messages endpoint.

```javascript
async function sendOnBestChannel(identifier, text) {
  const contactId = encodeURIComponent(identifier);
  const capability = await checkIMessage(identifier);

  const response = await fetch(`${BASE_URL}/chats/${contactId}/messages`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": crypto.randomUUID(),
    },
    body: JSON.stringify({
      text,
      metadata: {
        expected_protocol: capability.canReceiveIMessage ? "imessage" : "sms",
      },
    }),
  });

  if (!response.ok) {
    throw new Error(`Message send failed: ${response.status}`);
  }

  return response.json();
}
```

## When to Check Capabilities

### At Lead Capture

Check capability as soon as a phone number or email enters your CRM so your team knows the best available channel before outreach.

### Before Campaign Enrollment

Segment iMessage-capable contacts into iMessage-first workflows. Route other contacts to SMS fallback or email.

### After Delivery Changes

Refresh capability data when a contact changes phone numbers, stops receiving messages, or has stale protocol information.

A check is usually unnecessary before every message. Check when a contact is created, store the result, and refresh it periodically or when delivery behavior changes.

## FAQ

### Can I check if a phone number has iMessage?

Yes. Call the contact capabilities endpoint with a URL-encoded E.164 phone number. The response indicates whether the contact supports iMessage, SMS, and FaceTime.

### Does the checker support email addresses?

Yes. The `contactId` path parameter can contain a phone number or email address. URL-encode the identifier before placing it in the API path.

### Should I check capabilities before every send?

Usually not. Check when a contact enters your system, store the result, and refresh it on a schedule or when delivery behavior changes.

### Is this an Apple iMessage lookup API?

No. Apple does not provide a public iMessage lookup API. Blooio exposes a REST API that handles capability checks and routing for business messaging workflows.

## Links

- HTML page: https://blooio.com/guides/imessage-checker
- REST API integration: https://blooio.com/integrations/api.md
- iMessage automation guide: https://blooio.com/guides/imessage-automation.md
- Contact capabilities API reference: https://docs.blooio.com/contacts/getContactCapabilities
- Contact flows guide: https://docs.blooio.com/guides/contact-flows#check-capabilities
- Pricing: https://blooio.com/pricing.md
- Free trial and API signup: https://app.blooio.com/signup
- LLM site index: https://blooio.com/llms.txt
