Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ Send a transactional email to a contact. [Learn about sending transactional emai
| `transactionalId` | string | Yes | The ID of the transactional email to send. |
| `email` | string | Yes | The email address of the recipient. |
| `addToAudience` | boolean | No | If `true`, a contact will be created in your audience using the `email` value (if a matching contact doesn’t already exist). |
| `dataVariables` | object | No | An object containing data as defined by the data variables added to the transactional email template.<br />Values can be of type `string` or `number`. |
| `dataVariables` | object | No | An object containing data as defined by the data variables added to the transactional email template.<br />Values can be of type `string`, `number`, or an array of objects with `string` or `number` values. |
| `attachments` | object[] | No | A list of attachments objects.<br />**Please note**: Attachments need to be enabled on your account before using them with the API. [Read more](https://loops.so/docs/transactional/attachments) |
| `attachments[].filename` | string | No | The name of the file, shown in email clients. |
| `attachments[].contentType` | string | No | The MIME type of the file. |
Expand Down Expand Up @@ -770,6 +770,7 @@ const resp = await loops.getTransactionalEmails({ perPage: 15 });

## Version history

- `v6.1.1` (Feb 5, 2026) - Updated `TransactionalVariables` type to support arrays of objects with `string` or `number` values in [`sendTransactionalEmail()`](#sendtransactionalemail).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could write this more of a feature release than a type update eg "Support for the new arrays feature in sendTransactionalEmail"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that looks better, and then 6.2 version makes more sense

- `v6.1.0` (Jan 29, 2026) - Added `rawBody` to `APIError` in the case no JSON is received from the server (thanks to [@leipert](https://github.com/leipert)).
- `v6.0.1` (Oct 15, 2025) - Added `optInStatus` to contact object in [`findContact()`](#findcontact) for the new double opt-in feature.
- `v6.0.0` (Aug 22, 2025) - [`createContact()`](#createcontact) and [`updateContact()`](#updatecontact) now have a single object parameter instead of named parameters (breaking change). This allows support for using either `email` or `userId` when updating contacts.
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ type EventProperties = Record<string, string | number | boolean>;

type MailingLists = Record<string, boolean>;

type TransactionalVariables = Record<string, string | number>;
type TransactionalVariables = Record<
string,
string | number | Array<Record<string, string | number>>
>;

interface TransactionalAttachment {
/**
Expand Down