# Client API: Mail Send API

> Send a message through an SMTP Relay service over HTTPS.

Source: https://docs.coritan.com/api/reference/client/mail-send-api/

Send a message through an SMTP Relay service over HTTPS. Authenticated with an SMTP Relay API key in `X-Api-Key`, not with an access token.

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Client API reference](https://api.coritan.com/docs).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| POST | [`/api/v1/mail/send`](#op-post-api-v1-mail-send) | Send |
| GET | [`/api/v1/mail/send/limits`](#op-get-api-v1-mail-send-limits) | Limits |
| GET | [`/api/v1/mail/unsubscribe/{token}`](#op-get-api-v1-mail-unsubscribe-token) | RFC 8058 target |
| POST | [`/api/v1/mail/unsubscribe/{token}`](#op-post-api-v1-mail-unsubscribe-token) | RFC 8058 target |

### Send {#op-post-api-v1-mail-send}

`POST /api/v1/mail/send`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `X-Api-Key` | header | string or null | no |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `from` | string | yes |
| `from_name` | string or null | no |
| `to` | array of string | yes |
| `cc` | array of string | no |
| `subject` | string | no |
| `text` | string or null | no |
| `html` | string or null | no |
| `reply_to` | string or null | no |
| `headers` | Headers | no |
| `category` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `202` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Limits {#op-get-api-v1-mail-send-limits}

`GET /api/v1/mail/send/limits`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `X-Api-Key` | header | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### RFC 8058 target {#op-get-api-v1-mail-unsubscribe-token}

`GET /api/v1/mail/unsubscribe/{token}`

RFC 8058 target. Receivers POST here with ``List-Unsubscribe=One-Click``;
a person following the link gets the same result. Brand-neutral by
design: the token names the tenant and the addressee, nothing else.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `token` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### RFC 8058 target {#op-post-api-v1-mail-unsubscribe-token}

`POST /api/v1/mail/unsubscribe/{token}`

RFC 8058 target. Receivers POST here with ``List-Unsubscribe=One-Click``;
a person following the link gets the same result. Brand-neutral by
design: the token names the tenant and the addressee, nothing else.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `token` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
