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

# Connecting Mesh to Neo

> Create a Mesh API key with the permissions your agents need and save it in Neo

You connect Mesh once at the MSP level. One API key made for a partner admin covers every customer in your Partner Hub.

## Before you start

Mesh's REST API is available to every partner since Mesh release 1.7.11. You manage API keys in the Partner Hub under **Settings > API Keys** ([Mesh's API Keys help](https://docs.emailsecurity.app/help-center/api-keys)).

Mesh 365 and Mesh Unified customers need Mesh's Azure permissions in place for release from Junk and for remediation. A customer with an "Azure permissions incomplete" banner in the Partner Hub cannot have those actions run, by Neo or by you.

## 1. Create the API key

**1. Open API Keys**

Sign in to the Partner Hub ([hub-us.emailsecurity.app](https://hub-us.emailsecurity.app), or [hub-eu.emailsecurity.app](https://hub-eu.emailsecurity.app) in Europe) and open **Settings > API Keys**.

**2. Name it and pick the team member**

Name the key Neo. Select a team member with the Partner role: the key acts as that team member, so a partner admin reaches every customer.

**3. Choose the permissions**

Give the key the permissions for the jobs your agents do:

| Job | Permission area in Mesh |
| - | - |
| Find a client's customer record and domains | Customers, Domains |
| Search mail and read why a message was held | Live Email Tracker |
| Release, delete, report or remediate a message | Live Email Tracker actions (quarantine) |
| Allow or block a sender | Allow and block rules |

**4. Set the expiry date and copy the key**

Set an expiry date you will remember, submit, and copy the key. Mesh shows it only once.

> [!WARNING]
>
> On the expiry date, and if you disable or revoke the key in Mesh, Neo loses access until you save a new key here.

## 2. Add the key in Neo

**1. Open Integrations**

In the Neo Dashboard, open **Integrations** and find the Mesh card, under Email Security.

**2. Save the key**

Choose the region you sign in to, paste the API key and click **Save settings**. Neo reads your first customer with it before saving, so a wrong key or region is rejected straight away.

## 3. Turn Mesh on per agent

Open the agent, go to its **Tools & Settings** tab, click **Email Security**, and expand the **Mesh** block. Pick one of its **Presets**, or set each area yourself:

| Area | Access levels you can pick | Notes |
| - | - | - |
| **Customers and Mail Flow** | Disabled, Read Only, Read / Write | Customers, domains, DKIM, recipient verification, routes, relays, IP and TLS settings, auto-forwarding. Deleting, terminating or changing a customer, or deleting a domain, always asks. |
| **Email Tracker** | Disabled, Read Only | Every inbound and outbound message, its preview and event log. |
| **Message Actions** | Disabled, Read / Write | Release, delete, report, request release, remediate, undo remediation. |
| **Allow and Block Rules** | Disabled, Read Only, Read / Write | Allow and block rules for a customer or a user. An allow rule weakens protection. |
| **Custom Rules** | Disabled, Read Only, Read / Write | Custom rules per customer. |
| **Policies and Protection** | Disabled, Read Only, Read / Write | Policies and templates, link protection, banners, automatic remediation, quarantine digests. |
| **Users and Permissions** | Disabled, Read Only, Read / Write | Protected users and hub logins, team members and permissions. Deleting a protected user, changing users in bulk, changing a team member's permissions and clearing a user's two-factor devices always ask. |
| **Reports and Audit Log** | Disabled, Read Only, Read / Write | Statistics, threat reports, scheduled reports, notifications, the audit log. |
| **Partner Account** | Disabled, Read Only, Read / Write | Sub-partners, invoices, billing details, orders, service prices, branding. |
| **Partner-Wide Changes** | Disabled, Read / Write | Any write that applies to several customers at once: a partner-wide rule, a rule for several customers, a partner-level template or its application to customers, a bulk update of users or reports, the partner banner or IP settings, partner-level permissions. |

| Preset | What runs on its own | What asks a technician |
| - | - | - |
| **Read Only** | Every read except the partner account | No write is allowed |
| **Helpdesk** | Every read except the partner account | Message actions and allow or block rules. Every other write is off |
| **IT Admin** | Every read, users and reports | Message actions (release, remediate), allow and block rules, custom rules, policies, customers, the partner account and partner-wide changes |
| **Full Automation** | Every read and write | Only the writes that always ask |

Mesh publishes its full API reference inside the Partner Hub only. If a Mesh call starts to fail after a Mesh update, tell Neo support.

See [Mesh API](https://docs.neoagent.io/agents/tools/security/mesh-api.md) for what the agent can read and change.


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