- An iBubbl account with an active line. iBubbl sets up and runs the line for you; you don’t connect a Mac or an Apple ID. Sign up if you haven’t.
- Your own mobile number, to send the first messages to.
1
Create an API key
In the dashboard, open Settings → API Access and click Create key. Copy the key (See Authentication for rotation and security practices.
ib_pk_ followed by 64 hex characters); this is the only time the full key is shown.Keep it in an environment variable rather than in your code. The examples on this page read it from IBUBBL_API_KEY:2
Send a message to your own phone
Put your own mobile number in The response is Save the
to.202 Accepted:id; you’ll use it in the next step.202 means accepted, not delivered. iBubbl has taken the message and will send it from your line; it hasn’t reached the phone yet. Track it with the next step or with webhooks.idempotency_key is required. Use a new one for each message, and send the same key and the same payload again if a request times out or fails with a 5xx: iBubbl returns the original message instead of sending twice. See Idempotency.to must be in E.164 format: +, the country code, then the number, with no spaces or punctuation (+14155551234). Anything else returns 422 validation_error.3
Check the status
Fetch the message by its Once your phone has it, In production, don’t poll: subscribe to webhooks, as in the next step.
id:status is delivered (or read, if you have read receipts on), and channel says how it went out: imessage, or sms when your number couldn’t be reached on iMessage.Outside sending hours, the message waits. iBubbl only sends during each contact’s sending hours (by default Monday to Saturday 9 AM–8 PM, Sunday 12–8 PM, in the contact’s timezone). If you’re outside them, the message stays
pending with held_reason: "working_hours", and held_until says when it will go out. That’s expected, not an error.4
Receive a reply
Register an HTTPS endpoint you control that logs the request body, subscribed to The Return any
message.inbound. To test from your laptop, expose a local server with a tunnel such as cloudflared tunnel --url http://localhost:8000 or ngrok http 8000, and use the HTTPS URL it prints.201 Created response includes the signing secret (whsec_…). It is shown only once: store it, because you’ll need it to verify signatures.Now reply to the message on your phone. Your endpoint receives a POST like this:2xx within 10 seconds, or iBubbl retries the delivery.Subscriptions can’t be edited. When you’re done testing, revoke this one with DELETE /v1/webhooks/{subscription_id} and create your production subscription.Next steps
Webhook events
Every event type and its payload.
Send messages
All four ways to address a message, including groups.
Receive messages
Replies, attachments, opt-outs, and an auto-reply that can’t loop.
Errors
Every error code, and which ones to retry.
Build with AI
Hand these docs and a ready-made system prompt to your coding agent.

