|
1 | 1 | # Loops JavaScript/TypeScript SDK
|
2 | 2 |
|
3 |
| -[](https://www.npmjs.com/package/loops) |
4 |
| - |
5 | 3 | ## Introduction
|
6 | 4 |
|
7 | 5 | This is the official JavaScript SDK for [Loops](https://loops.so), with full TypeScript support.
|
@@ -531,6 +529,7 @@ Send an event to trigger an email in Loops. [Read more about events](https://loo
|
531 | 529 | | `contactProperties` | object | No | An object containing contact properties, which will be updated or added to the contact when the event is received.<br />Please [add custom properties](https://loops.so/docs/contacts/properties#custom-contact-properties) in your Loops account before using them with the SDK.<br />Values can be of type `string`, `number`, `null` (to reset a value), `boolean` or `date` ([see allowed date formats](https://loops.so/docs/contacts/properties#dates)). |
|
532 | 530 | | `eventProperties` | object | No | An object containing event properties, which will be made available in emails that are triggered by this event.<br />Values can be of type `string`, `number`, `boolean` or `date` ([see allowed date formats](https://loops.so/docs/events/properties#important-information-about-event-properties)). |
|
533 | 531 | | `mailingLists` | object | No | An object of mailing list IDs and boolean subscription statuses. |
|
| 532 | +| `headers` | object | No | Additional headers to send with the request. | |
534 | 533 |
|
535 | 534 | #### Examples
|
536 | 535 |
|
@@ -616,6 +615,7 @@ Send a transactional email to a contact. [Learn about sending transactional emai
|
616 | 615 | | `attachments[].filename` | string | No | The name of the file, shown in email clients. |
|
617 | 616 | | `attachments[].contentType` | string | No | The MIME type of the file. |
|
618 | 617 | | `attachments[].data` | string | No | The base64-encoded content of the file. |
|
| 618 | +| `headers` | object | No | Additional headers to send with the request. | |
619 | 619 |
|
620 | 620 | #### Examples
|
621 | 621 |
|
@@ -757,7 +757,7 @@ const resp = await loops.getTransactionalEmails({ perPage: 15 });
|
757 | 757 | - `v5.0.1` (May 13, 2025) - Added a `headers` parameter for [`sendEvent()`](#sendevent) and [`sendTransactionalEmail()`](#sendtransactionalemail), enabling support for the `Idempotency-Key` header.
|
758 | 758 | - `v5.0.0` (Apr 29, 2025)
|
759 | 759 | - Types are now exported so you can use them in your application.
|
760 |
| - - `ValidationError` is now thrown when paramters are not added correctly. |
| 760 | + - `ValidationError` is now thrown when parameters are not added correctly. |
761 | 761 | - `Error` is now returned if the API key is missing.
|
762 | 762 | - Added tests.
|
763 | 763 | - `v4.1.0` (Feb 27, 2025) - Support for new [List transactional emails](#gettransactionalemails) endpoint.
|
|
0 commit comments