Linking Mailjet as a source

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

PostHog Wizard hedgehog

Enter your Mailjet API key and secret key to pull your Mailjet data into the PostHog data warehouse.

Adding a data source

  1. Go to the sources tab of the data pipeline section in PostHog.
  2. Click + New source and then click Link next to Mailjet.
  3. Find your API key and Secret key on your Mailjet API key management page.
  4. Back in PostHog, enter the API key and secret key, then click Next.
  5. Select the tables you want to sync, set the sync method and frequency, then click Import.

Once the syncs are complete, you can start using Mailjet data in PostHog.

Available tables

TableDescriptionSync method
contactContactsFull refresh
contactslistContact listsFull refresh
listrecipientContact-to-list membership recordsFull refresh
campaignCampaignsFull refresh
campaigndraftCampaign draftsFull refresh
messageMessagesFull refresh
contactmetadataContact metadata definitionsFull refresh
contactdataContact property values per contactFull refresh
templateTemplatesFull refresh
messageinformationMessage sending, size, and spam informationIncremental
openinformationEmail open statisticsIncremental
clickstatisticsEmail click statisticsIncremental
bouncestatisticsEmail bounce statisticsIncremental
statcountersDaily delivery and engagement countersIncremental
messageeventDelivery and engagement events from webhooksWebhook only

Incremental tables sync only new or updated records on each run. Full refresh tables reload all data on each sync. Webhook only tables get rows only from webhook deliveries.

Sync limitations

The statistics and message information tables support incremental syncing on these fields:

  • messageinformation: CreatedAt
  • openinformation: OpenedAt
  • clickstatistics: ClickedAt
  • bouncestatistics: BouncedAt
  • statcounters: Timeslice

The list resources have no reliable server-side time filter and are full refresh only.

Webhooks for message events

The messageevent table has no list endpoint in Mailjet. Only webhook deliveries add rows to it. When you turn on the webhook sync method for this table, PostHog uses your API key to register Mailjet event callback URLs. It registers one URL for each of these event types: sent, open, click, bounce, blocked, spam, and unsub.

Mailjet does not sign its deliveries. Thus, PostHog puts generated basic-auth credentials in the callback URL. Mailjet sends them back in the Authorization header of each delivery, and PostHog rejects deliveries that do not match.

If the API key cannot manage webhooks, PostHog cannot register the callback URLs and the messageevent table stays empty. The other tables are not affected. The sent event occurs for each message that you send, so this table can grow quickly on accounts with high volume.

Configuration

OptionTypeRequired
API keypasswordYes
Secret keypasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
contact

A contact (recipient) stored in the Mailjet account.

Full refresh——
contactslist

A contact list in Mailjet that groups contacts for sending campaigns.

Full refresh——
listrecipient

The relationship linking a contact to a contact list, with its subscription status.

Full refresh——
campaign

A sent campaign in Mailjet representing a batch of messages.

Full refresh——
campaigndraft

A draft campaign in Mailjet, including its content and recipient configuration.

Full refresh——
message

An individual message (email) processed by Mailjet, with its delivery status.

Full refresh——
contactmetadata

A custom contact property (metadata field) definition in Mailjet.

Full refresh——
template

A reusable email template stored in the Mailjet account.

Full refresh——
contactdata

The custom contact property values stored for each contact in Mailjet.

Full refresh——
messageinformation

Sending, size and spam information for each message processed by Mailjet.

Incremental, Full refreshCreatedAt—
openinformation

An open event recording that a recipient opened a message in Mailjet.

Incremental, Full refreshOpenedAt—
clickstatistics

A click event recording that a recipient clicked a link in a message in Mailjet.

Incremental, Full refreshClickedAt—
bouncestatistics

A bounce event recording that a message could not be delivered to a recipient in Mailjet.

Incremental, Full refreshBouncedAt—
statcounters

Daily delivery and engagement counters for the whole Mailjet API key, counted by the day each event happened.

Incremental, Full refreshTimeslice—
messageevent

A delivery or engagement event pushed by the Mailjet Event API: sent, open, click, bounce, blocked, spam or unsub. Mailjet has no list endpoint for this stream, so the table is populated by webhook deliveries only.

Webhook only——

Still have questions?

Was this page useful?