---
title: "Relay an email for a Definite-hosted on-prem deployment"
method: POST
path: "/onprem/v1/email/send"
tags: ["onprem", "onprem", "__public__"]
---

# Relay an email for a Definite-hosted on-prem deployment

`POST /onprem/v1/email/send`

## Headers

- `X-Definite-License` string, nullable

## Request body

- OnPremEmailSendRequest
  - `deployment_id` string, required
  - `to` string[], required
  - `subject` string, required
  - `html_body` string, nullable
  - `text_body` string, nullable
  - `from_email` string, email, nullable
  - `attachments` OnPremEmailAttachment[]
    - `filename` string, required
    - `content_type` string
    - `content_base64` string, required

## Response `200`

Success

- SuccessResponseOnPremEmailSendResponse
  - `success` true, required — Flag for it request was successful
  - `data` OnPremEmailSendResponse, required
    - `ok` boolean
  - `meta` ResponseMeta
    - `requestId` string — Unique request identifier for tracing
    - `timestamp` string, date-time — Response timestamp (UTC)
    - `durationMs` integer, nullable — Request processing time in milliseconds

## Other responses

- `400` — Validation Bad Request
- `401` — Auth Invalid Token
- `403` — Forbidden Insufficient Permissions
- `404` — Resource Not Found
- `422` — Validation Failed
- `426` — Business Quota Exceeded
- `429` — Rate Limit Exceeded
- `500` — Internal Error
- `502` — External Service Error

---

[API](https://skmtc.dev/definite/apis/defapi.md) · [All operations](https://skmtc.dev/definite/apis/defapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/definite/defapi/revisions/3943d8deb3be/schema)
