MessagePipedocs
SDKs

curl

Recipes you can paste into a terminal.

Send an email

curl https://api.dev.messagepipe.dev/v1/email/send \
  -H "Authorization: Bearer $MP_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "maya@example.com",
    "from": { "email": "hello@your-domain.com", "name": "Acme" },
    "subject": "Welcome!",
    "html": "<p>Glad to have you.</p>"
  }'

from is an object (not a string), and is required unless the project has a default sender configured.

Send an SMS

curl https://api.dev.messagepipe.dev/v1/sms/send \
  -H "Authorization: Bearer $MP_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1234-shipped" \
  -d '{
    "to": "+15551234567",
    "body": "Order #1234 shipped! Track: https://acme.dev/o/1234"
  }'

Send via a template

curl https://api.dev.messagepipe.dev/v1/email/send \
  -H "Authorization: Bearer $MP_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "maya@example.com",
    "template": "welcome-email",
    "data": { "first_name": "Maya", "code": "738291" }
  }'

Look up a send

curl https://api.dev.messagepipe.dev/v1/sends/msg_06F4Y9CP1GQB39AA \
  -H "Authorization: Bearer $MP_KEY"

List recent sends

curl "https://api.dev.messagepipe.dev/v1/sends" \
  -H "Authorization: Bearer $MP_KEY"