> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/sendgrid-integration-setup.md).

# SendGrid Integration Setup

### Getting Started

Use this guide to connect SendGrid to your BalkanID tenant. You will need an API key from SendGrid and access to the Integrations section in BalkanID.

#### Requirements:

Before you begin, collect the following value from SendGrid:

* **API Key**

### Configure SendGrid within your BalkanID tenant

1. To create the **API Key**, sign in to SendGrid at <https://app.sendgrid.com> with an account that can manage API keys.
2. Navigate to **Settings > API Keys**, then click **Create API Key**.
3. Enter a name for the key and choose **Custom Access**. Give read access to **Teammates**, **Subusers** and **User Account** (see [Integration Scopes](#integration-scopes) below), then click **Create & View**.
4. Copy the key straight away. SendGrid shows it only once — if you lose it you will need to create a new key.
5. In BalkanID, go to **Integrations** and click **Add integration**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FBU9LcIybLgtBZ1jfzIMT%2Fadd-integration.png?alt=media" alt="The BalkanID Integrations page, with the Add integration button at the top right of the toolbar"><figcaption><p>Integrations page, with <strong>Add integration</strong></p></figcaption></figure></div>

6. Search for **SendGrid**, select it, then click **Next**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fi2NWoeKCFi6dEAO1rvjl%2Fsendgrid-connect-application.png?alt=media" alt="Step one of the Connect a new application wizard with SendGrid searched for and selected"><figcaption><p>SendGrid selected in <strong>Connect a new application</strong></p></figcaption></figure></div>

7. Under **Data Sync Preferences**, choose the entity types you want BalkanID to sync. Everything supported is selected by default. Users are always synced and cannot be deselected, and the relationships between the types you select are synced for you.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FsYUNIY43cAWNuQ0YQtV3%2Fsendgrid-data-sync-preferences.png?alt=media" alt="The Data Sync Preferences panel showing the Users, Roles and Subusers entity types and the required API scopes"><figcaption><p><strong>Data Sync Preferences</strong> and the required API scopes</p></figcaption></figure></div>

8. Under **Select Extraction Type**, choose **Direct Configuration**, then paste the key you copied into **API Key**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FU67XkzikMOv3j0tdQ1c4%2Fsendgrid-direct-configuration.png?alt=media" alt="The Direct Configuration section of the wizard showing the API Key field"><figcaption><p><strong>Direct Configuration</strong> credential field</p></figcaption></figure></div>

9. Click Next to move onto Optional Configuration.
10. Fill **Optional Configuration**, if required.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZbipc8nl8LTFl5YsVIaj%2Foptional-configuration.png?alt=media" alt="The Optional Configuration step, showing reviewer settings on the left and fulfillment options on the right"><figcaption><p>Optional Configuration</p></figcaption></figure></div>

11. Once you have filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the Integrations page. When data is available, the integration Status column will read **Connected** and the integration Message will read **Data available**.

### Integration Scopes

| Read Only Scopes                                                                                                                                | Lifecycle Management Scopes |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| **Teammates (Read)** — the teammates on your account, the permissions each one holds, and invitations that have been sent but not yet accepted. | N/A                         |
| **Subusers (Read)** — your subusers, and which teammates can act on each one.                                                                   | N/A                         |
| **User Account (Read)** — the account name, used to label the access BalkanID reads.                                                            | N/A                         |

BalkanID checks what the key is allowed to read before it starts, and skips anything it cannot reach. A key with fewer permissions produces a smaller picture of your account rather than a failed sync, so you can start narrow and widen it later.

A teammate's role in SendGrid is one of **Owner**, **Admin** or **Teammate**. BalkanID reviews the role alongside the individual permissions granted with it, so a teammate on a long list of custom permissions is visible as more than just "Teammate".

Teammates who have been invited but have not yet accepted are shown as inactive users rather than being left out, so a pending invitation to a sensitive account is still something you can review and revoke.

Subuser access is kept separate from account-wide access. Where a teammate can only act on particular subusers, a review shows exactly which ones.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/sendgrid-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
