🥞 BE
home

Brevo

Request
curl --request POST \ --url https://api.brevo.com/v3/smtp/email \ --header 'accept: application/json' \ --header 'api-key: xxxxxxxxxx' \ --header 'content-type: application/json' --data ...
Java
복사
Payload
{ "sender":{ "email":"brevo@brevo.com", "name":"Brevo" }, "subject":"This is my default subject line", "templateId":27, "params":{ "greeting":"This is my default greeting", "headline":"This is my default headline" }, "messageVersions":[ //Definition for Message Version 1 { "to":[ { "email":"bob@example.com", "name":"Bob Anderson" }, { "email":"anne@example.com", "name":"Anne Smith" } ], "params":{ "greeting":"Welcome onboard!", "headline":"Be Ready for Takeoff." }, "subject":"We are happy to be working with you" }, // Definition for Message Version 2 { "to":[ { "email":"jim@example.com", "name":"Jim Stevens" }, { "email":"mark@example.com", "name":"Mark Payton" }, { "email":"andrea@example.com", "name":"Andrea Wallace" } ], "params":{ "greeting":"Hello there..." } } ] }
JSON
복사
Response
{ "messageIds": [ "xxxxxxxxxxxxx.xxxxxxxxxx.1@smtp-relay.mailin.fr", // message version 1 "xxxxxxxxxxxxx.xxxxxxxxxx.2@smtp-relay.mailin.fr" // message version 2 ] }
JSON
복사
application.yaml
brevo: apiKey: "your-brevo-api-key" apiUrl: "https://api.brevo.com/v3/smtp/email"
YAML
복사