Phone Lines
A phone line in urelay represents a dedicated iMessage-enabled phone number that can send and receive messages on your behalf.
Status
Each phone line has a status indicating its availability:
| Status | Description |
|---|---|
online | Phone line is active and ready to send and receive messages. |
offline | Phone line is temporarily unavailable. Messages will be queued or routed to another line. |
Properties
| Property | Description |
|---|---|
id | Unique identifier for the phone line |
phone_number | The phone number associated with this line |
label | Optional display name |
status | Current status (online or offline) |
imessage_active | Whether iMessage is activated on this line |
daily_contact_limit | Maximum new contacts per day (default: 50) |
Sending through a specific line
By default, the API sends through the first available online phone line. To target a specific line:
curl -X POST https://app.urelay.ai/api/v1/messages/send \
-H "Content-Type: application/json" \
-H "X-API-Key: ur_live_YOUR_KEY" \
-H "X-API-Secret: ur_secret_YOUR_SECRET" \
-d '{
"to": "+12025551234",
"text": "Hello!",
"phone_line_id": "cmlsxywe60000qq01704dovyf"
}'
Listing your lines
curl https://app.urelay.ai/api/v1/phone-lines \
-H "X-API-Key: ur_live_YOUR_KEY" \
-H "X-API-Secret: ur_secret_YOUR_SECRET"
Multi-line routing
If you have multiple phone lines, the platform automatically selects an available online line when you send a message without specifying a phone_line_id. You can also implement your own routing logic by selecting lines based on their status and properties.