POST
/
v1
/
transactional
curl --request POST \
  --url https://app.loops.so/api/v1/transactional \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "<string>",
  "transactionalId": "<string>",
  "addToAudience": true,
  "dataVariables": {},
  "attachments": [
    {
      "filename": "<string>",
      "contentType": "<string>",
      "data": "<string>"
    }
  ]
}'
{
  "success": true
}

Request

Body

email
string
required

The email address of the recipient.

transactionalId
string
required

The ID of the transactional email to send.

addToAudience
boolean
default:false

If true, a contact will be created in your audience using the email value (if a matching contact doesn’t already exist).

dataVariables
object

An object containing data as defined by the data variables added to the transactional email template. Values can be of type string or number.

attachments
object[]

Please email us to enable attachments on your account before using them with the API.
An object containing file(s) sent along with an email message.

Headers

Idempotency-Key
string

Optionally send an idempotency key to avoid duplicate requests.
The value should be a string of up to 100 characters and should be unique for each request. We recommend using V4 UUIDs or some other method with enough guaranteed entropy to avoid collisions during a 24 hour window.
The endpoint will return a 409 Conflict response if the idempotency key has been used in the previous 24 hours.

Response

Success

success
boolean
required

Error

success
boolean
required
path
string
message
string
error
object
{
  "success": true
}

Was this page helpful?