# Mailjet

> Manage Mailjet contacts, lists and contact properties, and read the templates, senders, delivery records and statistics of the account.

App · Email Marketing · 17 actions. Web page: https://docs.lodol.com/docs/integrations/mailjet

## Actions

### Add or remove contact

Add a contact to one list, remove them from it, or unsubscribe them - by email address, so the contact does not have to exist yet. Mailjet creates a new contact and sets their name and properties in the same call.

**Inputs**

- Contact list (`list_id`, text, required): The contact list to work on.
- Email address (`email`, text, required): The contact's address. Mailjet creates the contact if the account does not have them yet.
- What to do (`action`, text, required): Whether to add, remove or unsubscribe them. One of: `addforce` (Add and subscribe, even if they unsubscribed before), `addnoforce` (Add, keeping their current subscription status), `remove` (Remove from the list), `unsub` (Unsubscribe from the list).
- Name (`name`, text): What to call the contact. Sets or updates their name.
- Properties (`properties`, object): Values to store on the contact, one field per property the account has defined.

**Outputs**

- `action` (text): What was done
- `email` (text): The contact's address
- `list_id` (text): The list worked on
- `result` (object)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "action": "addforce",
  "email": "ada@example.com",
  "list_id": "10291",
  "result": {
    "Action": "addforce",
    "Email": "ada@example.com",
    "Name": "Ada Lovelace",
    "Properties": {}
  },
  "status": "success"
}
```

### Create contact

Add a contact to the account by email address. This creates the contact only - to add them to a list or set their properties at the same time, use Add or remove contact instead.

**Inputs**

- Email address (`email`, text, required): The contact's address. It has to be one the account does not already hold.
- Name (`name`, text): What to call this contact.
- Exclude from marketing email (`is_excluded_from_campaigns`, true/false): Turn on to add them to the exclusion list, so they receive no marketing email.

**Outputs**

- `contact` (object)
- `contact_id` (text): The new contact's id
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact": {
    "CreatedAt": "2026-09-01T09:12:44Z",
    "DeliveredCount": 4,
    "Email": "ada@example.com",
    "ID": 3401928,
    "IsExcludedFromCampaigns": false,
    "IsOptInPending": false,
    "IsSpamComplaining": false,
    "LastActivityAt": "2026-09-14T17:02:10Z",
    "LastUpdateAt": "2026-09-14T17:02:10Z",
    "Name": "Ada Lovelace"
  },
  "contact_id": "3401928",
  "status": "success"
}
```

### Create contact list

Create a contact list to group contacts for marketing email. The name has to be unique across the account, including lists deleted in the last 30 days.

**Inputs**

- List name (`name`, text, required): What to call the list. It has to be unique.

**Outputs**

- `contact_list` (object)
- `list_id` (text): The new list's id
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_list": {
    "Address": "product-updates",
    "CreatedAt": "2026-08-02T11:20:00Z",
    "ID": 10291,
    "IsDeleted": false,
    "Name": "Product updates",
    "SubscriberCount": 128
  },
  "list_id": "10291",
  "status": "success"
}
```

### Create contact property

Define a new contact property, so values can be stored under that name on any contact. The name has to be unique. Properties are account-wide, not per list.

**Inputs**

- Property name (`name`, text, required): What to call the property, for example 'plan' or 'signup_source'. It has to be unique on the account.
- Value type (`data_type`, text): What kind of value this property holds. Defaults to text. One of: `str` (Text), `int` (Whole number), `float` (Number), `bool` (True or false), `datetime` (Date and time).
- Keeps (`namespace`, text): Whether the property keeps only its current value or a record of every value it has had. Defaults to keeping one value. One of: `static` (Static - keeps one value), `historic` (Historic - keeps every value it has had).

**Outputs**

- `contact_property` (object)
- `property_id` (text): The new property's id
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_property": {
    "Datatype": "str",
    "ID": 771,
    "Name": "plan",
    "NameSpace": "static"
  },
  "property_id": "771",
  "status": "success"
}
```

### Delete contact list

Delete a contact list. Mailjet keeps it for 30 days with a Deleted status, so it can be reinstated - and its name stays taken for those 30 days. The contacts on it are not deleted.

**Inputs**

- Contact list (`list_id`, text, required): The contact list to work on.

**Outputs**

- `deleted` (true/false): True once it is gone
- `list_id` (text): The list that was deleted
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "deleted": true,
  "list_id": "10291",
  "status": "success"
}
```

### Get contact

Read one contact: their address, name, when they were created, how much has been delivered to them and whether they are excluded from marketing email.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id. Use List contacts to find one. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.

**Outputs**

- `contact` (object)
- `contact_id` (text): The contact's id
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact": {
    "CreatedAt": "2026-09-01T09:12:44Z",
    "DeliveredCount": 4,
    "Email": "ada@example.com",
    "ID": 3401928,
    "IsExcludedFromCampaigns": false,
    "IsOptInPending": false,
    "IsSpamComplaining": false,
    "LastActivityAt": "2026-09-14T17:02:10Z",
    "LastUpdateAt": "2026-09-14T17:02:10Z",
    "Name": "Ada Lovelace"
  },
  "contact_id": "3401928",
  "status": "success"
}
```

### Get contact properties

Read the property values stored on one contact, as a set of name/value pairs a later step can read straight out of.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id. Use List contacts to find one. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.

**Outputs**

- `contact_id` (text): The contact's id
- `properties` (object): Property name to value
- `property_list` (list)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_id": "3401928",
  "properties": {
    "plan": "pro"
  },
  "property_list": [
    {
      "Name": "plan",
      "Value": "pro"
    }
  ],
  "status": "success"
}
```

### Get statistics

Read Mailjet's sending statistics - sent, opened, clicked, bounced, spam and unsubscribe counts - for the whole account, one campaign, one contact list or one sender, over all time or bucketed by day, hour or five minutes.

**Inputs**

- Statistics for (`counter_source`, text): What to report on. Defaults to the whole account, which needs no id and no dates. One of: `APIKey` (The whole account), `Campaign` (One campaign), `List` (One contact list), `Sender` (One sender address).
- Grouped by (`counter_resolution`, text): How finely to bucket the numbers. Defaults to all time, which is the only setting that needs no dates. A contact list can only be read over all time. One of: `Highest` (Every 5 minutes), `Hour` (By hour), `Day` (By day), `Lifetime` (All time).
- Counted by (`counter_timing`, text): Whether to count by when the message was sent or by when the event happened. Counting by event cannot be grouped over all time. One of: `Message` (When the message was sent), `Event` (When the event happened).
- Campaign, list or sender id (`source_id`, text): Which campaign, contact list or sender to report on. Required unless the statistics are for the whole account. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.
- From (`from_datetime`, date and time): Only include records from this moment onwards.
- To (`to_datetime`, date and time): Only include records up to this moment.

**Outputs**

- `count` (number): How many records came back
- `counter_resolution` (text): How they were bucketed
- `counter_source` (text): What the numbers are for
- `counter_timing` (text): What the numbers were timed against
- `statistics` (list)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "count": 1,
  "counter_resolution": "Lifetime",
  "counter_source": "APIKey",
  "counter_timing": "Message",
  "statistics": [
    {
      "APIKeyID": 998877,
      "MessageClickedCount": 143,
      "MessageHardBouncedCount": 6,
      "MessageOpenedCount": 612,
      "MessageSentCount": 1400,
      "MessageSoftBouncedCount": 8,
      "MessageSpamCount": 1,
      "MessageUnsubscribedCount": 3,
      "Timeslice": "lifetime",
      "Total": 1420
    }
  ],
  "status": "success"
}
```

### List contact lists

List the account's contact lists with how many contacts each holds. This is how you find a list's id.

**Inputs**

- Named (`name`, text): Only the list with exactly this name.
- Address (`address`, text): Only the list with this Mailjet-generated address (the part before @lists.mailjet.com).
- Deleted lists (`is_deleted`, text): Whether to return only deleted lists, only live ones, or all of them. A deleted list stays reinstatable for 30 days. One of: `any` (All lists), `true` (Only deleted lists), `false` (Only live lists).
- Leave out this list (`exclude_list_id`, text): Omit one list from the result. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `contact_lists` (list)
- `count` (number): How many records came back
- `list_ids` (list): The ids of those records, in the same order
- `list_names` (list): Their names, in the same order
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_lists": [
    {
      "Address": "product-updates",
      "CreatedAt": "2026-08-02T11:20:00Z",
      "ID": 10291,
      "IsDeleted": false,
      "Name": "Product updates",
      "SubscriberCount": 128
    }
  ],
  "count": 1,
  "list_ids": [
    "10291"
  ],
  "list_names": [
    "Product updates"
  ],
  "status": "success"
}
```

### List contact properties

List the contact properties defined on this account - the custom fields a contact can carry - with the kind of value each one holds.

**Inputs**

- Value type (`data_type`, text): What kind of value this property holds. Defaults to text. One of: `str` (Text), `int` (Whole number), `float` (Number), `bool` (True or false), `datetime` (Date and time).
- Keeps (`namespace`, text): Whether the property keeps only its current value or a record of every value it has had. Defaults to keeping one value. One of: `static` (Static - keeps one value), `historic` (Historic - keeps every value it has had).
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `contact_properties` (list)
- `count` (number): How many records came back
- `property_names` (list): Their names, in the same order
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_properties": [
    {
      "Datatype": "str",
      "ID": 771,
      "Name": "plan",
      "NameSpace": "static"
    }
  ],
  "count": 1,
  "property_names": [
    "plan"
  ],
  "status": "success"
}
```

### List contact's lists

List the contact lists one contact is on, and whether they have unsubscribed from each. Lists deleted in the last 60 days appear too, because Mailjet can still reinstate them.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id. Use List contacts to find one. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.

**Outputs**

- `contact_id` (text): The contact's id
- `count` (number): How many records came back
- `list_ids` (list): The ids of those records, in the same order
- `status` (text): Status of the action execution ("success" on success).
- `subscriptions` (list)

**Example output**

```json
{
  "contact_id": "3401928",
  "count": 1,
  "list_ids": [
    "10291"
  ],
  "status": "success",
  "subscriptions": [
    {
      "IsUnsub": false,
      "ListID": 10291,
      "SubscribedAt": "2026-09-01T09:13:02Z"
    }
  ]
}
```

### List contacts

List the contacts in this Mailjet account, optionally only those on one contact list or only those excluded from marketing email. This is how you find a contact's id.

**Inputs**

- On contact list (`contact_list_id`, text): Only contacts on this list. Leave empty for every contact in the account.
- Campaign exclusion (`is_excluded_from_campaigns`, text): Whether to return only contacts excluded from marketing email, only those not excluded, or all of them. One of: `any` (All contacts), `true` (Only contacts excluded from campaigns), `false` (Only contacts not excluded from campaigns).
- Active since (`last_activity_after`, date and time): Only contacts active since this moment.
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `contact_emails` (list): Their email addresses, in the same order
- `contact_ids` (list): The ids of those records, in the same order
- `contacts` (list)
- `count` (number): How many records came back
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "contact_emails": [
    "ada@example.com"
  ],
  "contact_ids": [
    "3401928"
  ],
  "contacts": [
    {
      "CreatedAt": "2026-09-01T09:12:44Z",
      "DeliveredCount": 4,
      "Email": "ada@example.com",
      "ID": 3401928,
      "IsExcludedFromCampaigns": false,
      "IsOptInPending": false,
      "IsSpamComplaining": false,
      "LastActivityAt": "2026-09-14T17:02:10Z",
      "LastUpdateAt": "2026-09-14T17:02:10Z",
      "Name": "Ada Lovelace"
    }
  ],
  "count": 1,
  "status": "success"
}
```

### List messages

List the emails this Mailjet account has sent, newest first, with what happened to each one. Filter by contact, by your own reference, by delivery status or by when they were sent.

**Inputs**

- Sent to contact (`contact_id`, text): Only messages sent to this contact id. Leave empty for all contacts. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.
- Your own reference (`custom_id`, text): Only messages carrying this reference - the CustomID set on the message when it was sent.
- Delivery status (`message_status`, text): Only messages in this state. One of: `0` (Processed), `1` (Queued), `2` (Sent), `3` (Opened), `4` (Clicked), `5` (Bounced), `6` (Marked as spam), `7` (Unsubscribed), `8` (Blocked), `9` (Soft bounce), `10` (Hard bounce), `11` (Deferred).
- Kind of email (`from_type`, text): Only transactional or only marketing email. One of: `1` (Transactional), `2` (Marketing), `3` (Unknown).
- From (`from_datetime`, date and time): Only include records from this moment onwards.
- To (`to_datetime`, date and time): Only include records up to this moment.
- Include the subject line (`show_subject`, true/false): Mailjet leaves the subject out of this list unless it is asked for.
- Include your own reference (`show_custom_id`, true/false): Mailjet leaves your reference out of this list unless it is asked for.
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `count` (number): How many records came back
- `message_ids` (list): The ids of those records, in the same order
- `messages` (list)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "count": 1,
  "message_ids": [
    "1152921513966"
  ],
  "messages": [
    {
      "ArrivedAt": "2026-09-15T08:41:22Z",
      "ContactID": 3401928,
      "ID": 1152921513966,
      "SenderID": 552,
      "Status": "sent",
      "Subject": "Your receipt",
      "UUID": "5e0a4b2c-3f0a-4c0e-9a3f-6f3a1d2b7c11"
    }
  ],
  "status": "success"
}
```

### List senders

List the sender addresses and domains registered on this account and the status of each - Active, Inactive or Deleted - so a workflow can check that an address is still verified and see which domains the account is set up for.

**Inputs**

- Address (`email`, text): Only the sender with this address.
- Domain (`domain`, text): Only senders on this domain.
- Status (`status`, text): Only senders in this state. Leave empty for all of them. One of: `Active`, `Inactive`, `Deleted`.
- Include deleted senders (`show_deleted`, true/false): Turn on to include senders that were removed.
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `count` (number): How many records came back
- `sender_emails` (list): The addresses a message can be sent from: active, and not a whole-domain sender
- `senders` (list)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "count": 1,
  "sender_emails": [
    "hello@example.com"
  ],
  "senders": [
    {
      "CreatedAt": "2026-06-11T14:31:00Z",
      "DNSID": 331,
      "Email": "hello@example.com",
      "EmailType": "transactional",
      "ID": 552,
      "IsDefaultSender": true,
      "Name": "Example Support",
      "Status": "Active"
    }
  ],
  "status": "success"
}
```

### List templates

List the email templates available to this account - their ids, names, categories, locale and when each was last updated. Use it to audit which templates exist or to find the id of one.

**Inputs**

- Named (`name`, text): Only templates with this name.
- Whose templates (`owner_type`, text): Whose templates to return. Leave empty for all of them. One of: `apikey` (This API key's templates), `user` (The account's templates), `global` (Mailjet's built-in templates).
- Used for (`purposes`, list): Only templates marked for these purposes. A template with no purpose set is invisible in the Mailjet app. One or more of: `marketing`, `transactional`, `automation`.
- Built with (`edit_mode`, text): Only templates built in this Mailjet editor. One of: `1` (Drag-and-drop builder), `2` (HTML builder), `3` (Saved section (snippet)), `4` (MJML builder).
- How many to return (`limit`, number): How many records to return. Defaults to 10, at most 1000. From 1 to 1000. Default: `10`.
- Skip this many (`offset`, number): How many records to skip before returning any. Use it with 'How many to return' to read the next page. At least 0.

**Outputs**

- `count` (number): How many records came back
- `status` (text): Status of the action execution ("success" on success).
- `template_ids` (list): The ids of those records, in the same order
- `templates` (list)

**Example output**

```json
{
  "count": 1,
  "status": "success",
  "template_ids": [
    "4455"
  ],
  "templates": [
    {
      "Author": "Ada Lovelace",
      "Categories": [
        "invoice"
      ],
      "CreatedAt": "2026-07-19T10:00:00Z",
      "EditMode": 1,
      "ID": 4455,
      "IsStarred": false,
      "Locale": "en_US",
      "Name": "Receipt",
      "OwnerType": "apikey",
      "Purposes": [
        "transactional"
      ]
    }
  ]
}
```

### Update contact

Change a contact's name, or whether they are excluded from marketing email. Anything left empty is left as it is. A contact's email address cannot be changed - Mailjet does not allow it.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id. Use List contacts to find one. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.
- Name (`name`, text): New name. Leave empty to keep the current one.
- Exclude from marketing email (`is_excluded_from_campaigns`, true/false): Turn on to exclude them from marketing email, off to let it through. Leave empty to keep the current setting.

**Outputs**

- `changed` (true/false): False when the contact already had these values
- `contact` (object)
- `contact_id` (text): The contact's id
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "changed": true,
  "contact": {
    "CreatedAt": "2026-09-01T09:12:44Z",
    "DeliveredCount": 4,
    "Email": "ada@example.com",
    "ID": 3401928,
    "IsExcludedFromCampaigns": false,
    "IsOptInPending": false,
    "IsSpamComplaining": false,
    "LastActivityAt": "2026-09-14T17:02:10Z",
    "LastUpdateAt": "2026-09-14T17:02:10Z",
    "Name": "Ada Lovelace"
  },
  "contact_id": "3401928",
  "status": "success"
}
```

### Update contact properties

Set property values on one contact. Each property has to exist on the account first - create it with Create contact property. Properties not listed are left as they are.

**Inputs**

- Contact (`contact_id`, text, required): The contact's id. Use List contacts to find one. Mailjet ids are numbers; a link copied from the Mailjet dashboard works too.
- Properties (`properties`, list, required): The properties to set, each a name and the value to store. The name has to match a contact property that already exists - List contact properties shows them.

**Outputs**

- `changed` (true/false): False when the values were already stored
- `contact_id` (text): The contact's id
- `properties` (object): Property name to value, after the update
- `property_list` (list)
- `status` (text): Status of the action execution ("success" on success).

**Example output**

```json
{
  "changed": true,
  "contact_id": "3401928",
  "properties": {
    "plan": "pro"
  },
  "property_list": [
    {
      "Name": "plan",
      "Value": "pro"
    }
  ],
  "status": "success"
}
```
