Skip to main content

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:

StatusDescription
onlinePhone line is active and ready to send and receive messages.
offlinePhone line is temporarily unavailable. Messages will be queued or routed to another line.

Properties

PropertyDescription
idUnique identifier for the phone line
phone_numberThe phone number associated with this line
labelOptional display name
statusCurrent status (online or offline)
imessage_activeWhether iMessage is activated on this line
daily_contact_limitMaximum 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.