# Email · Management API

> Management API reference for email: POST /sites/{id}/email/records/export, GET /sites/{id}/email/branding, PATCH /sites/{id}/email/branding, GET /sites/{id}/email/sender, ….

> Markdown version of https://kanorio.com/en/developers/management-api/email. Append `.md` to any developer docs URL for this format. Index: https://kanorio.com/llms.txt · MCP: https://app.kanorio.com/api/mcp

Base URL: `https://app.kanorio.com/api/v1` · [Errors](https://kanorio.com/en/developers/basics/errors) · [Pagination](https://kanorio.com/en/developers/basics/pagination)

### Export records

`POST /sites/{id}/email/records/export`

- Stability: beta
- Permission: `customers:export`
- Rate limit: heavy (20/minute per token, plus 20/minute per site)
- MCP tool: `email_records_export`

Export one period's sending records as a CSV file (the same file as Export on the dashboard's sending records page): time, channel, audience, type, campaign, recipient address, status, reason and whether it counted toward the quota. periodStart and the filters work like email.records.list (omit periodStart for the current period). Needs messaging:records as well. The file is made in the background with no row limit: poll operations.get with the returned operationId until SUCCEEDED; its result has a download link that works for 15 minutes (each operations.get returns a new one), plus fileName, rows and bytes. Give the link to the user; do not store or forward it. The file is kept 7 days, then the operation is EXPIRED. Only the credential that asked can read the result. Each export is recorded in the activity log. Errors: FORBIDDEN, VALIDATION (periodStart is not one of the periods email.records.list returns), STORAGE_UNAVAILABLE.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `periodStart` | string | no | start of a period from email.records.list periods; omit for the current period. |
| `audience` | "all" \| "customer" \| "team" | no | — |
| `channel` | "all" \| "email" \| "sms" \| "line" \| "whatsapp" \| "in_app" \| "webhook" | no | — |
| `status` | "all" \| "sent" \| "undelivered" \| "not_sent" \| "scheduled" | no | — |
| `metered` | "metered" \| "all" | no | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operationId` | string | yes | Poll operations.get with it until status is SUCCEEDED; its result has the download link. |
| `status` | "PENDING" | yes | — |
| `pollAfterSeconds` | integer | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `VALIDATION` | 400 | periodStart is not one of the periods email.records.list returns |
| `STORAGE_UNAVAILABLE` | 422 | — |

```bash
curl -X POST "https://app.kanorio.com/api/v1/sites/{id}/email/records/export" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"audience":"customer","status":"undelivered"}'
```

```json
{
  "operationId": "op_data_export_cmexport0006",
  "status": "PENDING",
  "pollAfterSeconds": 5
}
```

### Retrieve a branding

`GET /sites/{id}/email/branding`

- Stability: beta
- Permission: `messaging:branding`
- Rate limit: default (120/minute per token)
- MCP tool: `email_branding_get`

Read how the site's emails look: logo size and position, the footer, and which social links show. Logo and accent color come from the site's brand settings. Shared by automated emails and campaigns. Errors: FORBIDDEN.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `overrides` | object | yes | — |
| `overrides.footerText` | string \| null | yes | Footer in Markdown (links only); null = the default footer built from the site's contact details, address and policy pages; empty = no footer. |
| `overrides.logoSize` | "SMALL" \| "MEDIUM" \| "LARGE" | yes | — |
| `overrides.logoAlign` | "LEFT" \| "CENTER" \| "RIGHT" | yes | — |
| `overrides.hiddenBrandLinkUrls` | string[] | yes | Social links (from the site's brand settings) not shown in the email footer. |
| `derived` | object | yes | Taken from the site's brand settings (change them with site.update_settings / site.profile.update), not editable here. logoIsIcon: the logo is an SVG icon, so emails show the store name instead. |
| `derived.logoUrl` | string \| null | yes | — |
| `derived.logoIsIcon` | boolean | yes | — |
| `derived.accentColor` | string | yes | — |
| `defaultFooterText` | string | yes | The default footer used while overrides.footerText is null. |
| `socialLinks` | object[] | yes | — |
| `socialLinks[].platform` | string | yes | — |
| `socialLinks[].url` | string | yes | — |
| `socialLinks[].hidden` | boolean | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |

```bash
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/email/branding" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
```

```json
{
  "overrides": {
    "footerText": null,
    "logoSize": "MEDIUM",
    "logoAlign": "LEFT",
    "hiddenBrandLinkUrls": []
  },
  "derived": {
    "logoUrl": "https://media.kanorio.com/example/sunny-bakery-hero.jpg",
    "logoIsIcon": false,
    "accentColor": "#B4532A"
  },
  "defaultFooterText": "Bake Lab · [hello@example.com](mailto:hello@example.com) · [Privacy policy](https://example.com/privacy)",
  "socialLinks": [
    {
      "platform": "instagram",
      "url": "https://instagram.com/bakelab",
      "hidden": false
    }
  ]
}
```

### Update a branding

`PATCH /sites/{id}/email/branding`

- Stability: beta
- Permission: `messaging:branding`
- Rate limit: default (120/minute per token)
- MCP tool: `email_branding_update`

Change how the site's emails look (fields you omit keep their value): footerText (Markdown, links only; null restores the default footer, empty string removes it), logoSize, logoAlign, hiddenBrandLinkUrls (social link URLs to leave out of the footer). Applies to the next emails sent. Errors: FORBIDDEN, VALIDATION.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `footerText` | string \| null | no | — |
| `logoSize` | "SMALL" \| "MEDIUM" \| "LARGE" | no | — |
| `logoAlign` | "LEFT" \| "CENTER" \| "RIGHT" | no | — |
| `hiddenBrandLinkUrls` | string[] | no | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `overrides` | object | yes | — |
| `overrides.footerText` | string \| null | yes | Footer in Markdown (links only); null = the default footer built from the site's contact details, address and policy pages; empty = no footer. |
| `overrides.logoSize` | "SMALL" \| "MEDIUM" \| "LARGE" | yes | — |
| `overrides.logoAlign` | "LEFT" \| "CENTER" \| "RIGHT" | yes | — |
| `overrides.hiddenBrandLinkUrls` | string[] | yes | Social links (from the site's brand settings) not shown in the email footer. |
| `derived` | object | yes | Taken from the site's brand settings (change them with site.update_settings / site.profile.update), not editable here. logoIsIcon: the logo is an SVG icon, so emails show the store name instead. |
| `derived.logoUrl` | string \| null | yes | — |
| `derived.logoIsIcon` | boolean | yes | — |
| `derived.accentColor` | string | yes | — |
| `defaultFooterText` | string | yes | The default footer used while overrides.footerText is null. |
| `socialLinks` | object[] | yes | — |
| `socialLinks[].platform` | string | yes | — |
| `socialLinks[].url` | string | yes | — |
| `socialLinks[].hidden` | boolean | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `VALIDATION` | 400 | — |

```bash
curl -X PATCH "https://app.kanorio.com/api/v1/sites/{id}/email/branding" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"logoAlign":"CENTER","hiddenBrandLinkUrls":["https://instagram.com/bakelab"]}'
```

```json
{
  "overrides": {
    "footerText": null,
    "logoSize": "MEDIUM",
    "logoAlign": "CENTER",
    "hiddenBrandLinkUrls": [
      "https://instagram.com/bakelab"
    ]
  },
  "derived": {
    "logoUrl": "https://media.kanorio.com/example/sunny-bakery-hero.jpg",
    "logoIsIcon": false,
    "accentColor": "#B4532A"
  },
  "defaultFooterText": "Bake Lab · [hello@example.com](mailto:hello@example.com) · [Privacy policy](https://example.com/privacy)",
  "socialLinks": [
    {
      "platform": "instagram",
      "url": "https://instagram.com/bakelab",
      "hidden": true
    }
  ]
}
```

### Retrieve a sender

`GET /sites/{id}/email/sender`

- Stability: beta
- Permission: `messaging:sender`
- Rate limit: default (120/minute per token)
- MCP tool: `email_sender_get`

Read the site's sender identity: sender name, address, reply-to, and the custom sending domain with its DNS records and verification state. Errors: FORBIDDEN.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planAllowed` | boolean | yes | Custom sender name, address and domain need a plan with customer marketing; otherwise emails use fallbackFrom. |
| `state` | "none" \| "pending" \| "failed" \| "active" \| "degraded" | yes | Sending domain: none (not set), pending (waiting for DNS), failed, active, degraded (was verified, DNS broke; campaigns paused). |
| `domain` | string \| null | yes | — |
| `statusReason` | string \| null | yes | — |
| `records` | object[] | yes | DNS records to add at the domain's DNS host (type, host, value, status). |
| `dns` | object | yes | kind: configured / managed (Kanorio writes the records) / owner_required (the domain owner must do it in Kanorio) / manual. |
| `lastCheckedAt` | string \| null | yes | — |
| `verifiedAt` | string \| null | yes | — |
| `autoCheckStopped` | boolean | yes | Pending for over 72 hours: automatic checks stopped; run email.sending_domain.refresh after fixing DNS. |
| `senderName` | string | yes | — |
| `senderLocalPart` | string | yes | The part before @ in the sender address. |
| `replyTo` | string \| null | yes | — |
| `defaultReplyTo` | string \| null | yes | — |
| `storeName` | string | yes | — |
| `suggestedDomain` | string \| null | yes | — |
| `fallbackFrom` | string | yes | The sender used while the domain is not verified. |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |

```bash
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/email/sender" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
```

```json
{
  "planAllowed": true,
  "state": "active",
  "domain": "mail.example.com",
  "statusReason": null,
  "records": [
    {
      "type": "TXT",
      "host": "resend._domainkey.mail",
      "fqdn": "resend._domainkey.mail.example.com",
      "value": "p=MIGfMA0GCSqGSIb3DQEB…",
      "status": "verified"
    }
  ],
  "dns": {
    "kind": "configured",
    "hostname": "example.com"
  },
  "lastCheckedAt": "2026-10-06T08:00:00.000Z",
  "verifiedAt": "2026-10-01T02:30:00.000Z",
  "autoCheckStopped": false,
  "senderName": "Bake Lab",
  "senderLocalPart": "hello",
  "replyTo": null,
  "defaultReplyTo": "owner@example.com",
  "storeName": "Bake Lab",
  "suggestedDomain": "example.com",
  "fallbackFrom": "Bake Lab <bakelab@kanorio.email>"
}
```

### Update a sender

`PATCH /sites/{id}/email/sender`

- Stability: beta
- Permission: `messaging:sender`
- Rate limit: default (120/minute per token)
- MCP tool: `email_sender_update`

Change the sender name, the part before @ of the sender address (used once a sending domain is verified) and the reply-to address; fields you omit keep their value, an empty string goes back to the default (store name, hello, the store's contact email). Errors: FORBIDDEN, PLAN_REQUIRED, RATE_LIMITED, INVALID_LOCAL_PART, INVALID_SENDER_NAME, INVALID_REPLY_TO.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `senderName` | string | no | — |
| `localPart` | string | no | — |
| `replyTo` | string | no | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planAllowed` | boolean | yes | Custom sender name, address and domain need a plan with customer marketing; otherwise emails use fallbackFrom. |
| `state` | "none" \| "pending" \| "failed" \| "active" \| "degraded" | yes | Sending domain: none (not set), pending (waiting for DNS), failed, active, degraded (was verified, DNS broke; campaigns paused). |
| `domain` | string \| null | yes | — |
| `statusReason` | string \| null | yes | — |
| `records` | object[] | yes | DNS records to add at the domain's DNS host (type, host, value, status). |
| `dns` | object | yes | kind: configured / managed (Kanorio writes the records) / owner_required (the domain owner must do it in Kanorio) / manual. |
| `lastCheckedAt` | string \| null | yes | — |
| `verifiedAt` | string \| null | yes | — |
| `autoCheckStopped` | boolean | yes | Pending for over 72 hours: automatic checks stopped; run email.sending_domain.refresh after fixing DNS. |
| `senderName` | string | yes | — |
| `senderLocalPart` | string | yes | The part before @ in the sender address. |
| `replyTo` | string \| null | yes | — |
| `defaultReplyTo` | string \| null | yes | — |
| `storeName` | string | yes | — |
| `suggestedDomain` | string \| null | yes | — |
| `fallbackFrom` | string | yes | The sender used while the domain is not verified. |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `PLAN_REQUIRED` | 403 | — |
| `RATE_LIMITED` | 429 | — |
| `INVALID_LOCAL_PART` | 400 | — |
| `INVALID_SENDER_NAME` | 400 | — |
| `INVALID_REPLY_TO` | 400 | — |

```bash
curl -X PATCH "https://app.kanorio.com/api/v1/sites/{id}/email/sender" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"senderName":"Bake Lab Taipei","replyTo":"orders@example.com"}'
```

```json
{
  "planAllowed": true,
  "state": "active",
  "domain": "mail.example.com",
  "statusReason": null,
  "records": [
    {
      "type": "TXT",
      "host": "resend._domainkey.mail",
      "fqdn": "resend._domainkey.mail.example.com",
      "value": "p=MIGfMA0GCSqGSIb3DQEB…",
      "status": "verified"
    }
  ],
  "dns": {
    "kind": "configured",
    "hostname": "example.com"
  },
  "lastCheckedAt": "2026-10-06T08:00:00.000Z",
  "verifiedAt": "2026-10-01T02:30:00.000Z",
  "autoCheckStopped": false,
  "senderName": "Bake Lab Taipei",
  "senderLocalPart": "hello",
  "replyTo": "orders@example.com",
  "defaultReplyTo": "owner@example.com",
  "storeName": "Bake Lab",
  "suggestedDomain": "example.com",
  "fallbackFrom": "Bake Lab <bakelab@kanorio.email>"
}
```

### Sending domain configure

`PUT /sites/{id}/email/sending-domain`

- Stability: beta
- Permission: `messaging:sender`
- Rate limit: default (120/minute per token)
- MCP tool: `email_sending_domain_configure`

Start using the owner's own domain (for example mail.example.com) as the sending domain, so emails come from it instead of Kanorio's address. Returns the DNS records to add; when the domain's DNS is managed by Kanorio and belongs to this user, Kanorio adds them itself (dns.kind managed). Verification follows automatically once DNS is in place; check with email.sender.get or email.sending_domain.refresh. Errors: FORBIDDEN, PLAN_REQUIRED, RATE_LIMITED, INVALID_DOMAIN, PLATFORM_DOMAIN, PUBLIC_MAILBOX_DOMAIN (gmail.com and the like), DOMAIN_TAKEN (another Kanorio site uses it), DOMAIN_UNAVAILABLE, ALREADY_CONFIGURED (remove the current one first), CAPACITY_REACHED, NOT_CONFIGURED, PROVIDER_ERROR.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | yes | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planAllowed` | boolean | yes | Custom sender name, address and domain need a plan with customer marketing; otherwise emails use fallbackFrom. |
| `state` | "none" \| "pending" \| "failed" \| "active" \| "degraded" | yes | Sending domain: none (not set), pending (waiting for DNS), failed, active, degraded (was verified, DNS broke; campaigns paused). |
| `domain` | string \| null | yes | — |
| `statusReason` | string \| null | yes | — |
| `records` | object[] | yes | DNS records to add at the domain's DNS host (type, host, value, status). |
| `dns` | object | yes | kind: configured / managed (Kanorio writes the records) / owner_required (the domain owner must do it in Kanorio) / manual. |
| `lastCheckedAt` | string \| null | yes | — |
| `verifiedAt` | string \| null | yes | — |
| `autoCheckStopped` | boolean | yes | Pending for over 72 hours: automatic checks stopped; run email.sending_domain.refresh after fixing DNS. |
| `senderName` | string | yes | — |
| `senderLocalPart` | string | yes | The part before @ in the sender address. |
| `replyTo` | string \| null | yes | — |
| `defaultReplyTo` | string \| null | yes | — |
| `storeName` | string | yes | — |
| `suggestedDomain` | string \| null | yes | — |
| `fallbackFrom` | string | yes | The sender used while the domain is not verified. |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `PLAN_REQUIRED` | 403 | — |
| `RATE_LIMITED` | 429 | — |
| `INVALID_DOMAIN` | 400 | — |
| `PLATFORM_DOMAIN` | 422 | — |
| `PUBLIC_MAILBOX_DOMAIN` | 422 | gmail.com and the like |
| `DOMAIN_TAKEN` | 422 | another Kanorio site uses it |
| `DOMAIN_UNAVAILABLE` | 422 | — |
| `ALREADY_CONFIGURED` | 422 | remove the current one first |
| `CAPACITY_REACHED` | 422 | — |
| `NOT_CONFIGURED` | 422 | — |
| `PROVIDER_ERROR` | 422 | — |

```bash
curl -X PUT "https://app.kanorio.com/api/v1/sites/{id}/email/sending-domain" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain":"mail.example.com"}'
```

```json
{
  "planAllowed": true,
  "state": "pending",
  "domain": "mail.example.com",
  "statusReason": null,
  "records": [
    {
      "type": "TXT",
      "host": "resend._domainkey.mail",
      "fqdn": "resend._domainkey.mail.example.com",
      "value": "p=MIGfMA0GCSqGSIb3DQEB…",
      "status": "pending"
    }
  ],
  "dns": {
    "kind": "manual"
  },
  "lastCheckedAt": "2026-10-06T08:00:00.000Z",
  "verifiedAt": "2026-10-01T02:30:00.000Z",
  "autoCheckStopped": false,
  "senderName": "Bake Lab",
  "senderLocalPart": "hello",
  "replyTo": null,
  "defaultReplyTo": "owner@example.com",
  "storeName": "Bake Lab",
  "suggestedDomain": "example.com",
  "fallbackFrom": "Bake Lab <bakelab@kanorio.email>"
}
```

### Sending domain refresh

`POST /sites/{id}/email/sending-domain/refresh`

- Stability: beta
- Permission: `messaging:sender`
- Rate limit: default (120/minute per token)
- MCP tool: `email_sending_domain_refresh`

Check the sending domain's DNS again now (the same as Check again in the dashboard), after the owner added or fixed the records. Within a minute of the last check the previous result is returned (recentlyChecked). Errors: FORBIDDEN, PLAN_REQUIRED, RATE_LIMITED, NO_DOMAIN, NOT_CONFIGURED.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planAllowed` | boolean | yes | Custom sender name, address and domain need a plan with customer marketing; otherwise emails use fallbackFrom. |
| `state` | "none" \| "pending" \| "failed" \| "active" \| "degraded" | yes | Sending domain: none (not set), pending (waiting for DNS), failed, active, degraded (was verified, DNS broke; campaigns paused). |
| `domain` | string \| null | yes | — |
| `statusReason` | string \| null | yes | — |
| `records` | object[] | yes | DNS records to add at the domain's DNS host (type, host, value, status). |
| `dns` | object | yes | kind: configured / managed (Kanorio writes the records) / owner_required (the domain owner must do it in Kanorio) / manual. |
| `lastCheckedAt` | string \| null | yes | — |
| `verifiedAt` | string \| null | yes | — |
| `autoCheckStopped` | boolean | yes | Pending for over 72 hours: automatic checks stopped; run email.sending_domain.refresh after fixing DNS. |
| `senderName` | string | yes | — |
| `senderLocalPart` | string | yes | The part before @ in the sender address. |
| `replyTo` | string \| null | yes | — |
| `defaultReplyTo` | string \| null | yes | — |
| `storeName` | string | yes | — |
| `suggestedDomain` | string \| null | yes | — |
| `fallbackFrom` | string | yes | The sender used while the domain is not verified. |
| `recentlyChecked` | boolean | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `PLAN_REQUIRED` | 403 | — |
| `RATE_LIMITED` | 429 | — |
| `NO_DOMAIN` | 422 | — |
| `NOT_CONFIGURED` | 422 | — |

```bash
curl -X POST "https://app.kanorio.com/api/v1/sites/{id}/email/sending-domain/refresh" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

```json
{
  "planAllowed": true,
  "state": "active",
  "domain": "mail.example.com",
  "statusReason": null,
  "records": [
    {
      "type": "TXT",
      "host": "resend._domainkey.mail",
      "fqdn": "resend._domainkey.mail.example.com",
      "value": "p=MIGfMA0GCSqGSIb3DQEB…",
      "status": "verified"
    }
  ],
  "dns": {
    "kind": "configured",
    "hostname": "example.com"
  },
  "lastCheckedAt": "2026-10-06T08:00:00.000Z",
  "verifiedAt": "2026-10-01T02:30:00.000Z",
  "autoCheckStopped": false,
  "senderName": "Bake Lab",
  "senderLocalPart": "hello",
  "replyTo": null,
  "defaultReplyTo": "owner@example.com",
  "storeName": "Bake Lab",
  "suggestedDomain": "example.com",
  "fallbackFrom": "Bake Lab <bakelab@kanorio.email>",
  "recentlyChecked": false
}
```

### Sending domain remove

`POST /sites/{id}/email/sending-domain/remove`

- Stability: beta
- Permission: `messaging:sender`
- Rate limit: default (120/minute per token)
- MCP tool: `email_sending_domain_remove`

Stop using the custom sending domain: emails go back to Kanorio's address (fallbackFrom) and the domain is released, so using it again means verifying DNS again. Confirm with the user first and pass confirm: true. Errors: FORBIDDEN, PLAN_REQUIRED, RATE_LIMITED, NO_DOMAIN, NOT_CONFIGURED.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `confirm` | true | yes | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planAllowed` | boolean | yes | Custom sender name, address and domain need a plan with customer marketing; otherwise emails use fallbackFrom. |
| `state` | "none" \| "pending" \| "failed" \| "active" \| "degraded" | yes | Sending domain: none (not set), pending (waiting for DNS), failed, active, degraded (was verified, DNS broke; campaigns paused). |
| `domain` | string \| null | yes | — |
| `statusReason` | string \| null | yes | — |
| `records` | object[] | yes | DNS records to add at the domain's DNS host (type, host, value, status). |
| `dns` | object | yes | kind: configured / managed (Kanorio writes the records) / owner_required (the domain owner must do it in Kanorio) / manual. |
| `lastCheckedAt` | string \| null | yes | — |
| `verifiedAt` | string \| null | yes | — |
| `autoCheckStopped` | boolean | yes | Pending for over 72 hours: automatic checks stopped; run email.sending_domain.refresh after fixing DNS. |
| `senderName` | string | yes | — |
| `senderLocalPart` | string | yes | The part before @ in the sender address. |
| `replyTo` | string \| null | yes | — |
| `defaultReplyTo` | string \| null | yes | — |
| `storeName` | string | yes | — |
| `suggestedDomain` | string \| null | yes | — |
| `fallbackFrom` | string | yes | The sender used while the domain is not verified. |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `PLAN_REQUIRED` | 403 | — |
| `RATE_LIMITED` | 429 | — |
| `NO_DOMAIN` | 422 | — |
| `NOT_CONFIGURED` | 422 | — |

```bash
curl -X POST "https://app.kanorio.com/api/v1/sites/{id}/email/sending-domain/remove" \
  -H "Authorization: Bearer $KANORIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'
```

```json
{
  "planAllowed": true,
  "state": "none",
  "domain": null,
  "statusReason": null,
  "records": [],
  "dns": {
    "kind": "configured",
    "hostname": "example.com"
  },
  "lastCheckedAt": "2026-10-06T08:00:00.000Z",
  "verifiedAt": null,
  "autoCheckStopped": false,
  "senderName": "Bake Lab",
  "senderLocalPart": "hello",
  "replyTo": null,
  "defaultReplyTo": "owner@example.com",
  "storeName": "Bake Lab",
  "suggestedDomain": "example.com",
  "fallbackFrom": "Bake Lab <bakelab@kanorio.email>"
}
```

### List records

`GET /sites/{id}/email/records`

- Stability: beta
- Permission: `messaging:records`
- Rate limit: default (120/minute per token)
- MCP tool: `email_records_list`

List what the site sent in one billing period, newest first: automatic emails to customers, campaign emails and notices to the site team, with each one's status (the dashboard's Email › Sending records). At most 30 per page. periodStart picks a period from periods (default: the current one). Filter by audience, channel, status group, or metered (only what counted toward the sending quota). Without customers:view, customers' addresses are masked and names left out. For one campaign's recipients use campaigns.list_recipients; for what automations sent, automations.log.list. Errors: FORBIDDEN, VALIDATION (periodStart is not one of periods), INVALID_CURSOR.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |
| `periodStart` | query | string | no | start of a period from periods; omit for the current period. |
| `audience` | query | "all" \| "customer" \| "team" | no | — |
| `channel` | query | "all" \| "email" \| "in_app" \| "webhook" | no | — |
| `status` | query | "all" \| "sent" \| "undelivered" \| "not_sent" \| "scheduled" | no | — |
| `metered` | query | "metered" \| "all" | no | metered: only what counted toward the quota; all (default): everything, including what was blocked or skipped. |
| `limit` | query | integer | no | Maximum number of items to return, 1–30. Defaults to 30. |
| `cursor` | query | string | no | Opaque cursor from the previous page's nextCursor. Omit for the first page. |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | yes | — |
| `data[].id` | string | yes | Record id; pass it to email.records.get. |
| `data[].audience` | "customer" \| "team" | yes | — |
| `data[].origin` | "scenario" \| "campaign" \| "team" | yes | scenario: an automatic email (order confirmation, form reply…); campaign: a campaign send; team: a notice to the site team. |
| `data[].channel` | "email" \| "sms" \| "line" \| "whatsapp" \| "in_app" \| "webhook" | yes | — |
| `data[].scenarioKey` | string \| null | yes | Which automatic email, for origin scenario. |
| `data[].campaign` | object \| null | yes | Which campaign, for origin campaign (null when the campaign was deleted). |
| `data[].campaign.id` | string | yes | — |
| `data[].campaign.name` | string | yes | — |
| `data[].messageType` | string \| null | yes | — |
| `data[].eventKey` | string \| null | yes | The event a team notice was about. |
| `data[].recipient` | string | yes | The customer's address (masked, a***@example.com, without customers:view) or the team member or destination name. |
| `data[].displayStatus` | string | yes | delivered, opened, clicked, bounced, skipped, scheduled… |
| `data[].statusGroup` | "sent" \| "undelivered" \| "not_sent" \| "scheduled" | yes | — |
| `data[].statusReason` | string \| null | yes | Why it was not sent or not delivered, for example marketing_frequency (sending interval) or suppressed. |
| `data[].metered` | boolean | yes | Sent and counted toward the period's sending quota. |
| `data[].at` | string | yes | When it was sent (scheduled time for scheduled ones). |
| `data[].contact` | object \| null | yes | — |
| `data[].contact.id` | string | yes | — |
| `data[].contact.label` | string | yes | Empty when masked. |
| `data[].orderId` | string \| null | yes | — |
| `hasMore` | boolean | yes | True when another page exists; pass nextCursor to fetch it. |
| `nextCursor` | string \| null | yes | Cursor for the next page, or null on the last page. |
| `period` | object | yes | The period these records belong to. |
| `period.start` | string | yes | — |
| `period.end` | string | yes | — |
| `period.current` | boolean | yes | — |
| `periods` | object[] | yes | Periods you can pick with periodStart, newest first. |
| `periods[].start` | string | yes | — |
| `periods[].end` | string | yes | — |
| `periods[].current` | boolean | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `VALIDATION` | 400 | periodStart is not one of periods |
| `INVALID_CURSOR` | 400 | — |

```bash
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/email/records" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
```

```json
{
  "data": [
    {
      "id": "m:clx_record01",
      "audience": "customer",
      "origin": "scenario",
      "channel": "email",
      "scenarioKey": "order.paid",
      "campaign": null,
      "messageType": "order_confirmation",
      "eventKey": null,
      "recipient": "a***@example.com",
      "displayStatus": "opened",
      "statusGroup": "sent",
      "statusReason": null,
      "metered": true,
      "at": "2026-10-06T08:00:00.000Z",
      "contact": {
        "id": "contact_example01",
        "label": ""
      },
      "orderId": "order_example01"
    }
  ],
  "hasMore": false,
  "nextCursor": null,
  "period": {
    "start": "2026-11-01T00:00:00.000Z",
    "end": "2026-12-01T00:00:00.000Z",
    "current": true
  },
  "periods": [
    {
      "start": "2026-11-01T00:00:00.000Z",
      "end": "2026-12-01T00:00:00.000Z",
      "current": true
    },
    {
      "start": "2026-10-01T00:00:00.000Z",
      "end": "2026-11-01T00:00:00.000Z",
      "current": false
    }
  ]
}
```

### Retrieve a record

`GET /sites/{id}/email/records/{recordId}`

- Stability: beta
- Permission: `messaging:records`
- Rate limit: default (120/minute per token)
- MCP tool: `email_records_get`

Get one sending record (id from email.records.list, campaigns.list_recipients or automations.log.list): its status, when it was created, sent or scheduled, the related order number, and the delivery events the email provider reported (delivered, opened, clicked, bounced). Customers' addresses are masked without customers:view. Errors: FORBIDDEN, RECORD_NOT_FOUND.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Website id. Get it from sites.list or from sites.create. |
| `recordId` | path | string | yes | Record id, for example m:clx123. |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Record id; pass it to email.records.get. |
| `audience` | "customer" \| "team" | yes | — |
| `origin` | "scenario" \| "campaign" \| "team" | yes | scenario: an automatic email (order confirmation, form reply…); campaign: a campaign send; team: a notice to the site team. |
| `channel` | "email" \| "sms" \| "line" \| "whatsapp" \| "in_app" \| "webhook" | yes | — |
| `scenarioKey` | string \| null | yes | Which automatic email, for origin scenario. |
| `campaign` | object \| null | yes | Which campaign, for origin campaign (null when the campaign was deleted). |
| `campaign.id` | string | yes | — |
| `campaign.name` | string | yes | — |
| `messageType` | string \| null | yes | — |
| `eventKey` | string \| null | yes | The event a team notice was about. |
| `recipient` | string | yes | The customer's address (masked, a***@example.com, without customers:view) or the team member or destination name. |
| `displayStatus` | string | yes | delivered, opened, clicked, bounced, skipped, scheduled… |
| `statusGroup` | "sent" \| "undelivered" \| "not_sent" \| "scheduled" | yes | — |
| `statusReason` | string \| null | yes | Why it was not sent or not delivered, for example marketing_frequency (sending interval) or suppressed. |
| `metered` | boolean | yes | Sent and counted toward the period's sending quota. |
| `at` | string | yes | When it was sent (scheduled time for scheduled ones). |
| `contact` | object \| null | yes | — |
| `contact.id` | string | yes | — |
| `contact.label` | string | yes | Empty when masked. |
| `orderId` | string \| null | yes | — |
| `createdAt` | string | yes | — |
| `sentAt` | string \| null | yes | — |
| `scheduledFor` | string \| null | yes | — |
| `orderNumber` | integer \| null | yes | — |
| `events` | object[] | yes | — |
| `events[].type` | string | yes | — |
| `events[].occurredAt` | string | yes | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `FORBIDDEN` | 403 | — |
| `RECORD_NOT_FOUND` | 404 | — |

```bash
curl -X GET "https://app.kanorio.com/api/v1/sites/{id}/email/records/{recordId}" \
  -H "Authorization: Bearer $KANORIO_TOKEN"
```

```json
{
  "id": "m:clx_record01",
  "audience": "customer",
  "origin": "scenario",
  "channel": "email",
  "scenarioKey": "order.paid",
  "campaign": null,
  "messageType": "order_confirmation",
  "eventKey": null,
  "recipient": "a***@example.com",
  "displayStatus": "opened",
  "statusGroup": "sent",
  "statusReason": null,
  "metered": true,
  "at": "2026-10-06T08:00:00.000Z",
  "contact": {
    "id": "contact_example01",
    "label": ""
  },
  "orderId": "order_example01",
  "createdAt": "2026-10-06T08:00:00.000Z",
  "sentAt": "2026-10-06T08:00:00.000Z",
  "scheduledFor": null,
  "orderNumber": 1042,
  "events": [
    {
      "type": "delivered",
      "occurredAt": "2026-10-06T08:00:00.000Z"
    },
    {
      "type": "opened",
      "occurredAt": "2026-10-06T08:00:00.000Z"
    }
  ]
}
```
