This API allows you to send custom emails through Releva.
Request Parameters #
You may perform requests to the API using the following curl equivalent:
curl -H 'content-type: application/json' -H 'authorization: Bearer <secretKey>' -XPOST 'https://releva.ai/api/v0/segmentRuns/<segmentRunId>/emails' -d'{
"emailId": 29,
"campaignId": 18,
"emails": [
{
"emailAddress": "stoychev.yavor@gmail.com",
"messages": [
{
"subject": "this is a test",
"body":"<b>THIS is a late night test</b><a href=\"https://google.com?foo=1&bar=2&e={{email}}\">google is your friend</a>"
}
]
}
]
}'
Request URL Parameters #
Field | Type | Description |
---|---|---|
segmentRunId | Integer | The id of the segment run created for this sending session using the Create Segment Run API. |
Request Body #
Field | Type | Description |
emailId | Integer | Id of custom email created using the Create Email API |
campaignId | Integer | Id of custom email created using the Create Campaign API |
emails[].emailAddress | String | Email address of reecipient |
emails[].messages[].subject | String | Email subject |
emails[].messages[].body | String | Email Body |
The Subject and Body fields of each message may contain the {{email}}, {{profileId}}, {{campaignId}}, and {{segmentId}} merge tags which will be replaced by the corresponding values before sending.
Response Format #
A successful response will return HTTP Status 202 and an empty JSON body.
{}
An error response will return a HTTP 4xx or 5xx status code and have the following structure:
{
"message": "A description of the error and how to fix it, if it's a client error."
}