Quickstart
Send your first iMessage in under 5 minutes.
Prerequisites
- A urelay account (sign up at app.urelay.ai)
- At least one phone line assigned to your account
Step 1: Get your API credentials
- Log in to the urelay dashboard
- Navigate to API > Keys
- Click Create Key
- Copy both the API Key and API Secret
caution
The API Secret is only shown once at creation. Store it securely.
Step 2: Send a message
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 from urelay!"
}'
Response:
{
"id": "cmlt12345000abc",
"guid": "6EEC3F64-A2B1-4C8F-9B2D-1234567890AB",
"to": "+12025551234",
"text": "Hello from urelay!",
"status": "sent",
"service": "iMessage",
"phone_line_id": "cmlsxywe60000qq01704dovyf",
"phone_number": "+19415551000",
"created_at": "2026-02-19T12:00:00.000Z"
}
Step 3: Check your messages
curl https://app.urelay.ai/api/v1/messages?limit=5 \
-H "X-API-Key: ur_live_YOUR_KEY" \
-H "X-API-Secret: ur_secret_YOUR_SECRET"
Step 4: Set up a webhook
To receive incoming messages in real-time, create a webhook:
curl -X POST https://app.urelay.ai/api/v1/webhooks \
-H "Content-Type: application/json" \
-H "X-API-Key: ur_live_YOUR_KEY" \
-H "X-API-Secret: ur_secret_YOUR_SECRET" \
-d '{
"url": "https://your-app.com/webhooks/urelay",
"events": ["message.received", "message.sent"]
}'
The response includes a secret for verifying webhook signatures. Store it securely.
Step 5: List conversations
curl https://app.urelay.ai/api/v1/conversations?limit=10 \
-H "X-API-Key: ur_live_YOUR_KEY" \
-H "X-API-Secret: ur_secret_YOUR_SECRET"
Next steps
- Authentication -- Key management and rotation
- Webhook Events -- All event types and payloads
- API Reference -- Full interactive API documentation