cURL
Test AyoSend API langsung dari terminal menggunakan cURL.
Simpan API key sebagai variable
export AYOSEND_KEY=ays_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxKirim Email
curl -X POST https://api.ayosend.id/v1/emails \
-H "Authorization: Bearer $AYOSEND_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Toko <no-reply@toko.com>",
"to": ["pelanggan@email.com"],
"subject": "Test Email",
"html": "<p>Halo dari AyoSend!</p>"
}'Cek Status Email
curl https://api.ayosend.id/v1/emails/em_clxxxxxxxxxxxxxxxx \
-H "Authorization: Bearer $AYOSEND_KEY"List Domain
curl https://api.ayosend.id/v1/domains \
-H "Authorization: Bearer $AYOSEND_KEY"