> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sinch Mailjet

> Connect Alumio to Sinch Mailjet.

## Extra information

System documentation: [Sinch Mailjet API Reference](https://dev.mailjet.com/email/reference/overview/)

### Setting up HTTP Client Sinch Mailjet

**Steps**

1. In Alumio Dashboard, go to Connections > HTTPS (API). Create a new HTTP Client and select Sinch Mailjet HTTP Client as the prototype of the HTTP Client.

2. Fill in the Base URI, Api Key, and Secret Key.

### Subscribing to Entities from Sinch Mailjet

**Steps**

1. Go to Integrations-> Incoming and create a new incoming configuration and select Sinch Mailjet Subscriber as the subscriber.

2. Select the method and entity you want to subscribe to from Sinch Mailjet.

3. Add any request parameters needed to subscribe to the entity (optional).

4. You can optionally add a transformer to transform the request parameters into something you need.

5. Select the Sinch Mailjet HTTP Client to use.

**General Concept**
We follow Sinch Mailjet documentation on building this connector so you can easily use the connector based on Sinch Mailjet API Reference.

**Entity**

It’s the entity you want to subscribe from Sinch Mailjet. Please refer to the entities in Management APIs from the Sinch Mailjet API Reference page.

**Request Parameters**

These are the parameters you can provide to get the needed entity based on Sinch Mailjet API Reference. Please look at the example below on how to fill Request Parameters field when subscribing Single Request entity

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-01.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=7fd8a6bd206e882c1e4573457e2b884b" alt="Sinch Mailjet connector screenshot 1" width="690" height="458" data-path="images/connectors/sinch-mailjet-01.png" />

* Path is the path parameter of the url. For example, the \{contact\_id}.
* Query is a defined set of parameters attached to the end of a url.\
  Example: [www.url.com?type=true\&start=0](http://www.url.com?type=true\&start=0)

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-02.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=55a00c35ffc860d70a6dc5abad6af804" alt="Sinch Mailjet connector screenshot 2" width="618" height="118" data-path="images/connectors/sinch-mailjet-02.png" />

That’s why we need to define **contact\_ID** property inside **path** property in the Request Parameters field. The properties inside **query** parameters will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field on the coupon entity.

`/v3/REST/contact/123123123123`

**Input Transformer**

Any transformer’s set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need, either as path parameters and/or as query parameters of an entity.

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access Sinch Mailjet.

### Publishing Entity to Sinch Mailjet

**Steps**

1. Go to Integrations-> Outgoing, create a new outgoing configuration, and select Sinch MailjetPublisher as the publisher.
2. Select the method that you want the publisher to do with the data.
3. Select the Sinch Mailjet entity you want the data to be published to.
4. Select the HTTP Client to use.
   <img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-03.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=843afd7725ea235505cd882d57ab5c77" alt="Sinch Mailjet connector screenshot 3" width="690" height="264" data-path="images/connectors/sinch-mailjet-03.png" />

**General Concept**

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

**Method**
Currently, we support Post (HTTP POST method),Put (HTTP PUTmethod), and Delete (HTTP DELETE method).

**Entity**
We support publishing to most Sinch Mailjet endpoints but not with publishing binary files at the moment. Please refer to the entities in Management APIs from Sinch Mailjet API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require an object as the request payload, please look at the example below. For example, we want to Create a Contact. Please select “Post” as the action and “Create a new contact” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-04.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=afdf0ff28b9b5eeb92d2094d620a37d2" alt="Sinch Mailjet connector screenshot 4" width="690" height="264" data-path="images/connectors/sinch-mailjet-04.png" />

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-05.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=86f850220ee7e6a144ba800980b46b39" alt="Sinch Mailjet connector screenshot 5" width="537" height="104" data-path="images/connectors/sinch-mailjet-05.png" />

You can put the payload you want to send to Sinch Mailjet into the payload property in the data. Here is an example of the Possible Response after Creation.

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sinch-mailjet-06.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=be8e0bb8ebe293e7eeba0842cbb28ab1" alt="Sinch Mailjet connector screenshot 6" width="506" height="408" data-path="images/connectors/sinch-mailjet-06.png" />

* Path is the path parameter of the url. For example, the \{id}.
* Query is a defined set of parameters attached to the end of a url.\
  Example: [www.url.com?type=true\&start=0](http://www.url.com?type=true\&start=0)
* Payload is the data contained within a request.

Alumio will send an API request to Sinch Mailjet with URL `/v3/REST/contact`

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access Sinch Mailjet.
