Test with cURL
Test the YourSend API directly from your terminal using cURL.
Send an email
curl -X POST https://api.yoursend.dev/v1/send \
-H "Authorization: Bearer ys_live_..." \
-H "Content-Type: application/json" \
-d '{
"channel": "email",
"to": "user@example.com",
"from": "hello@yourdomain.com",
"subject": "Hello from YourSend",
"html": "<h1>It works!</h1>"
}'Send an SMS
curl -X POST https://api.yoursend.dev/v1/send \
-H "Authorization: Bearer ys_live_..." \
-H "Content-Type: application/json" \
-d '{
"channel": "sms",
"to": "+14155551234",
"body": "Your verification code is 123456"
}'Send OTP
curl -X POST https://api.yoursend.dev/v1/send \
-H "Authorization: Bearer ys_live_..." \
-H "Content-Type: application/json" \
-d '{
"channel": "sms",
"to": "+14155551234",
"otp": true
}'Verify OTP
curl -X POST https://api.yoursend.dev/v1/check \
-H "Authorization: Bearer ys_live_..." \
-H "Content-Type: application/json" \
-d '{
"message_id": "msg_abc123",
"code": "123456"
}'