---
title: Email Provider Configuration
url: https://docs.kaltura.com/docs/events-collaboration/messaging-api/messaging-email-provider-configuration
---

## Email Provider Configuration

Configure a custom email service provider (SendGrid) for your account. By default, Kaltura provides a shared email provider. For branded sending domains and dedicated deliverability, configure your own.

### 11.1 Provider Entity

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Auto-generated identifier (read-only) |
| `partnerId` | integer | Partner ID (read-only) |
| `type` | string | Provider type: `"sendGrid"` |
| `apiKey` | string | SendGrid API key |
| `sendgridWebhookKey` | string | SendGrid webhook verification key |
| `domains` | string[] | Verified sender domains |
| `defaultSender` | string | Default sender email address |
| `unsubscribeClickTracking` | boolean | Enable SendGrid click tracking for unsubscribe links |
| `status` | string | `enabled`, `disabled`, or `deleted` |
| `overrideResidency` | string | Data residency override: `"EU"` or `"GLOBAL"` |
| `version` | integer | Auto-incrementing version (read-only) |
| `createdAt` | string | ISO 8601 timestamp (read-only) |
| `updatedAt` | string | ISO 8601 timestamp (read-only) |

### 11.2 Add a Provider

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `type` | string | Yes | Provider type: `"sendGrid"` |
| `apiKey` | string | Yes | SendGrid API key |
| `sendgridWebhookKey` | string | No | SendGrid webhook verification key |
| `domains` | string[] | No | Verified sender domains |
| `defaultSender` | string | No | Default sender email address |
| `unsubscribeClickTracking` | boolean | No | Enable SendGrid click tracking for unsubscribe links |
| `overrideResidency` | string | No | Data residency override: `"EU"` or `"GLOBAL"` |

**Response:** Full provider object with generated `id`, `version`, and timestamps.

```bash
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/add" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "sendGrid",
    "apiKey": "SG.your-sendgrid-api-key",
    "sendgridWebhookKey": "your-webhook-verification-key",
    "domains": ["events.example.com"],
    "defaultSender": "events@events.example.com"
  }'
```

### 11.3 List Providers

```bash
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/list" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### 11.4 Provider Lookup

Resolve which email provider will be used for a given app context.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `appGuid` | string | No | App Registry GUID to check provider resolution for |

**Response:** The resolved provider object. Resolution order: partner + appGuid, then partner, then default (partner 0).

```bash
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/lookup" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d "{\"appGuid\": \"$APP_GUID\"}"
```

The resolution order is: partner + appGuid → partner → default (partner 0).

### 11.5 Assign Provider to App

Assign a specific provider to an app context.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Email provider ID |
| `appGuid` | string | Yes | App Registry GUID to assign the provider to |

```bash
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/emailProviderAssignment" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d "{
    \"id\": \"$PROVIDER_ID\",
    \"appGuid\": \"$APP_GUID\"
  }"
```

**Response:** EmailProviderAssignmentRule object with `id`, `emailProviderId`, `appGuid`, `version`.

### 11.6 Enable / Disable a Provider

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Email provider ID |

**Response:** Updated provider object with new status.

```bash
# Enable
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/enable" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d "{\"id\": \"$PROVIDER_ID\"}"

# Disable
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/disable" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d "{\"id\": \"$PROVIDER_ID\"}"
```

### 11.7 Delete a Provider

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Email provider ID to delete |

```bash
curl -X POST "$KALTURA_MESSAGING_URL/email-provider/delete" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d "{\"id\": \"$PROVIDER_ID\"}"
```
