---
title: "Get a site's email settings"
url: https://docs.corefinity.com/api/reference/site-settings/get-site-email
type: endpoint
last_updated: 2026-11-13
feature: email
related:
  - https://docs.corefinity.com/guides/sites/site-settings/outbound-email.md
  - https://docs.corefinity.com/mcp/tools/corestack_email_get.md
---
# Get a site's email settings

Answers the site's sending domains with the DNS records each needs and whether they have been found, the
sender, and what you may do next. The default sending domain is also answered at the top level.
`store_mapping` is what was last read on the site: `read_stores=true` asks for a fresh read.

```http
GET /api/corestack/sites/{site}/email
```

- Scope: `read`
- Rate limit: 120 a minute
- Try it in the console: on

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Query parameters

- `read_stores` (boolean): True to have the stores of a live Magento 2 site read again. The fresh read is queued: this answer still holds `store_mapping` as it was last read, and a later one holds the new reading. Without it the stores are read again by themselves from time to time. It changes nothing on any other site.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/corestack/sites/1042/email \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/corestack/sites/1042/email');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/email', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/corestack/sites/1042/email",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The email settings.

```json
{
  "add": {
    "allowed": true,
    "count": 1,
    "default_prefix": "mg",
    "max": 5,
    "reason": null
  },
  "cloudflare": {
    "can_write_records": true,
    "connected": true,
    "written_at": null,
    "zone": {
      "id": "example-zone-id",
      "name": "harbourandfinch.example.com"
    }
  },
  "default_domain": "mg.harbourandfinch.example.com",
  "domains": [
    {
      "active": true,
      "added_at": "2026-11-03T09:16:42Z",
      "added_by": "Daniel Reyes",
      "can_make_default": false,
      "can_remove": true,
      "can_rotate": true,
      "can_test": false,
      "cloudflare": {
        "can_write_records": true,
        "connected": true,
        "written_at": null,
        "zone": {
          "id": "example-zone-id",
          "name": "harbourandfinch.example.com"
        }
      },
      "error": null,
      "from_domain": "harbourandfinch.example.com",
      "id": 3101,
      "is_default": true,
      "last_checked_at": "2026-11-03T09:16:40Z",
      "last_test": null,
      "make_default_reason": null,
      "operation_id": 5120,
      "records": [
        {
          "cloudflare": null,
          "found": null,
          "name": "mg.harbourandfinch.example.com",
          "priority": null,
          "purpose": "spf",
          "required": true,
          "state": "missing",
          "type": "TXT",
          "value": "v=spf1 include:mail.example.net ~all"
        },
        {
          "cloudflare": null,
          "found": null,
          "name": "pic._domainkey.mg.harbourandfinch.example.com",
          "priority": null,
          "purpose": "dkim",
          "required": true,
          "state": "missing",
          "type": "TXT",
          "value": "k=rsa; p=SYNTHETIC-DKIM-PUBLIC-KEY"
        },
        {
          "cloudflare": null,
          "found": null,
          "name": "mg.harbourandfinch.example.com",
          "priority": 10,
          "purpose": "mx",
          "required": false,
          "state": "missing",
          "type": "MX",
          "value": "mxa.eu.mail.example.net"
        },
        {
          "cloudflare": null,
          "found": null,
          "name": "mg.harbourandfinch.example.com",
          "priority": 10,
          "purpose": "mx",
          "required": false,
          "state": "missing",
          "type": "MX",
          "value": "mxb.eu.mail.example.net"
        },
        {
          "cloudflare": null,
          "found": null,
          "name": "email.mg.harbourandfinch.example.com",
          "priority": null,
          "purpose": "tracking",
          "required": true,
          "state": "missing",
          "type": "CNAME",
          "value": "eu.mail.example.net"
        }
      ],
      "remove_reason": null,
      "sender": {
        "address": "noreply@harbourandfinch.example.com",
        "name": "Harbour & Finch"
      },
      "sending_domain": "mg.harbourandfinch.example.com",
      "state": "pending_dns",
      "state_label": "Waiting for DNS",
      "test_reason": "Test emails can be sent once the sending domain is verified",
      "verified_at": null
    }
  ],
  "error": null,
  "last_checked_at": "2026-11-03T09:16:40Z",
  "mailpit": null,
  "operation": null,
  "records": [
    {
      "cloudflare": null,
      "found": null,
      "name": "mg.harbourandfinch.example.com",
      "priority": null,
      "purpose": "spf",
      "required": true,
      "state": "missing",
      "type": "TXT",
      "value": "v=spf1 include:mail.example.net ~all"
    },
    {
      "cloudflare": null,
      "found": null,
      "name": "pic._domainkey.mg.harbourandfinch.example.com",
      "priority": null,
      "purpose": "dkim",
      "required": true,
      "state": "missing",
      "type": "TXT",
      "value": "k=rsa; p=SYNTHETIC-DKIM-PUBLIC-KEY"
    },
    {
      "cloudflare": null,
      "found": null,
      "name": "mg.harbourandfinch.example.com",
      "priority": 10,
      "purpose": "mx",
      "required": false,
      "state": "missing",
      "type": "MX",
      "value": "mxa.eu.mail.example.net"
    },
    {
      "cloudflare": null,
      "found": null,
      "name": "mg.harbourandfinch.example.com",
      "priority": 10,
      "purpose": "mx",
      "required": false,
      "state": "missing",
      "type": "MX",
      "value": "mxb.eu.mail.example.net"
    },
    {
      "cloudflare": null,
      "found": null,
      "name": "email.mg.harbourandfinch.example.com",
      "priority": null,
      "purpose": "tracking",
      "required": true,
      "state": "missing",
      "type": "CNAME",
      "value": "eu.mail.example.net"
    }
  ],
  "sender": {
    "address": "noreply@harbourandfinch.example.com",
    "name": "Harbour & Finch"
  },
  "sending_domain": "mg.harbourandfinch.example.com",
  "state": "pending_dns",
  "state_label": "Waiting for DNS",
  "store_mapping": null,
  "test": {
    "last_sent_at": null,
    "last_to": null,
    "remaining_today": 20
  },
  "verified_at": null
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your account has no company that can use Managed Clusters, for example because the company was closed (`company_not_enabled`). For Managed Clusters routes that do not ask for two-factor authentication.

```json
{
  "code": "scope_required",
  "message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
  "reason": "scope_required",
  "scope": "destructive"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 The site is deleted and waiting to be purged (`deleted`), or still being created (`provisioning`).

```json
{
  "code": "deleted",
  "message": "This site is deleted and waiting to be purged. Restore it first.",
  "reason": "deleted"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 409 | `deleted` | The site, environment or copy has been deleted, or is being deleted. Nothing can be changed on it. Restore a deleted site first if it can still be restored. |
| 409 | `provisioning` | The site is still being created. Try again in a few minutes. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Outbound email](https://docs.corefinity.com/guides/sites/site-settings/outbound-email.md)
- MCP tool: [`corestack_email_get`](https://docs.corefinity.com/mcp/tools/corestack_email_get.md)
