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

# Mesh

> Connect Mesh email security to Triggr with an API key from the Mesh Partner Hub.

Triggr works with Mesh customers and their licences and users, global allow and block rules, Live Email Tracker logs, reports and the partner audit log.

## Set up Mesh

Every key belongs to a team member. Use an existing one, or [create one](https://docs.emailsecurity.app/help-center/creating-team-members) for automation.

<Steps>
  <Step title="Create an API key">
    In the Partner Hub you sign in to, go to **Settings > API Keys** and click **New**. Enter `Triggr` as the Name, select the team member in User, choose an Expiry Date and the User Permissions below, then click Submit.

    | Workflows will | Mesh permission |
    | - | - |
    | List, read and update customers and licences | Customers: Manage |
    | Create customers | Customers: Create New |
    | Manage global allow and block rules | Global policy |
    | Read Live Email Tracker logs | Live Email Tracker |
    | Read the audit log | Partner Account Settings |
  </Step>

  <Step title="Copy the key">
    In Show API Key Details, click the copy icon next to Key, then Close. Mesh shows the key only once.
  </Step>
</Steps>

See Mesh's [API Keys](https://docs.emailsecurity.app/help-center/api-keys) guide.

## Connect it in Triggr

<Steps>
  <Step title="Open the integration">
    Go to **Integrations > Mesh** and click Configure on the Base Configuration card.

    <Frame>
      <img src="https://mintcdn.com/triggr/nyuVXZ1rouDTTEvu/images/integrations-common/base-configuration.png?fit=max&auto=format&n=nyuVXZ1rouDTTEvu&q=85&s=bb81acb082055015f91beda7b4876f35" alt="The Base Configuration card with Status Not Configured, Admin Consent Not Required and a Configure button." width="2272" height="330" data-path="images/integrations-common/base-configuration.png" />
    </Frame>
  </Step>

  <Step title="Enter the host and key">
    Partner Hub Host starts as the EU host; change it to `hub-us.emailsecurity.app` or the host you sign in to, without `https://` or a path. Paste the API Key and click Save Configuration.

    <Frame>
      <img src="https://mintcdn.com/triggr/nyuVXZ1rouDTTEvu/images/mesh/configure.png?fit=max&auto=format&n=nyuVXZ1rouDTTEvu&q=85&s=f65f1cfec9524b39349fcfd12a3ee6a6" alt="The Mesh configuration window with Partner Hub Host set to hub-eu.emailsecurity.app, an API Key field, an Allow insecure TLS switch under Advanced, and a Save Configuration button." width="1344" height="1190" data-path="images/mesh/configure.png" />
    </Frame>
  </Step>
</Steps>

One key covers every customer under your partner account. Actions on one customer, user or rule take its Mesh ID, which list actions such as List Customers return.

The key stops working on its Expiry Date. Before then, create a new key, paste it in with Edit on the Base Configuration card, then revoke the old one from its three-dot menu on API Keys.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Every action fails with 401">
    Check the key is active and not past its Expiry Date, Partner Hub Host is where you created it, and the key was pasted in full.
  </Accordion>

  <Accordion title="Every action fails with a connection error or 404">
    Partner Hub Host must be the host name only, with no `https://`, trailing `/` or `/api`.
  </Accordion>

  <Accordion title="Some actions fail with 403">
    Click the pencil icon next to the key on API Keys and add the permission for that area.
  </Accordion>

  <Accordion title="A customer is missing from logs or rules, or its users can't be listed">
    The customer turned off MSP Management. An administrator on the customer's domain must turn it back on under Settings. See Mesh's [Restricting Partner Access](https://docs.emailsecurity.app/help-center/restricting-partner-access-to-customer-domain-or-m).
  </Accordion>

  <Accordion title="Older email logs or audit entries are missing">
    Mesh keeps Live Email Tracker data and audit log entries for 90 days.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.