---
title: "GenerateAdhocEmail"
method: POST
path: "/api/Email/GenerateAdhocEmail"
tags: ["Email"]
---

# GenerateAdhocEmail

`POST /api/Email/GenerateAdhocEmail`

Generate a custom email
<b>Permissions Required: </b> GlobalPermissions.Email.SendEmails.SendAdhocEmailsNode
<b>Rate limit: </b><span style="background-color:#0272d9;color:white;padding:4px 8px;text-align:center;border-radius:5px; font-size: small;"><b>150</b></span> / minute

## Request body

- EmailGenerateAdhocEmailRequest
  - `request` GenerateAdhocEmailRequest — Custom email generation request body
    - `ids` string[] — List of ids to send template for
    - `templateId` integer — Template id to send
    - `tags` EmailStubCustomTag[] — Tags to append to email
      - `pkEmailStubTagId` integer — Row id
      - `fkEmailStubId` integer — Relation to email_stub
      - `TagName` string — Name of the tag
      - `TagValue` string — Value which will be inserted into the template
    - `attachments` string[] — List of attachments to send with the email

## Response `200`

OK

- GenerateAdhocEmailResponse
  - `isComplete` boolean — Send custom emails completed
  - `FailedRecipients` string[] — List of failed recipients

---

[API](https://skmtc.net/linnworks/apis/authenticate-api.md) · [All operations](https://skmtc.net/linnworks/apis/authenticate-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/linnworks/authenticate-api/revisions/0123569a22fb/schema)
