---
title: "Send an email using a template"
method: POST
path: "/v4/email/outgoing/sendusingtemplate"
tags: ["Email - Outgoing"]
---

# Send an email using a template

`POST /v4/email/outgoing/sendusingtemplate`

## Request

- Base URL: `https://api.inmobile.com`
- URL: `https://api.inmobile.com/v4/email/outgoing/sendusingtemplate`
- Auth: one of:
  - HTTP basic
  - API key in query parameter `apikey`

## Request body

- EmailOutgoingTemplatePostRequest
  - `from` EmailRecipient, required
    - `emailAddress` string, required: The email address of the recipient
    - `displayName` string, required: The display name to use for the recipient. If max length is exceeded, the entire api call will fail.
  - `to` EmailRecipient[], required: A list of receiver objects. Allowed to contain between 1 and 100 elements.
    - `emailAddress` string, required: The email address of the recipient
    - `displayName` string, required: The display name to use for the recipient. If max length is exceeded, the entire api call will fail.
  - `replyTo` EmailReplyToRecipient[]: A list of optional Reply To objects.
    - `emailAddress` string, required: The email address of the recipient
  - `messageId` string: An optional message id used to identify the message. If no message id is provided, a new message id is generated and assigned to the message. This id must be unique across all messages created on the same account. (In case a previous message has been deleted according to GDPR deletion rules setup on the specific account, the messageId is allowed to be reused) If max length is exceeded, the entire api call will fail.
  - `sendTime` string: If set, this defines to time in the future for the message to be sent. e.g. 2001-02-30T14:50:23Z (UTC time).
  - `tracking` boolean: If true, this will add Open and Click tracking to your email. Default: true.
  - `attachments` EmailAttachment[]: An array of attachments to add to the message. Can not collectively go above 10MB in size after Base64 encoding (with Html and Text). Keep in mind that Base64 increases the size of the binary data by about 33%. If max size is exceeded or if the content is not in Base64 format, the entire api call will fail. Supported file types: .pdf, .json, .doc, .dot, .xls, .xlt, .xla, .ppt, .pot, .pps, .ppa, .xlsx, .docx, .pptx, .gif, .jpg, .jpeg, .png, .tiff, .webp, .mp4, .mpeg, .mpga, .csv, .txt and .ics
    - `name` string, required: The file name of the attachment. With extension.
    - `content` string, required: The Base64 encoded content of the attachment.
  - `listUnsubscribe` boolean: If true, this will add a List-Unsubscribe header to your email. If a subscriber unsubscribes using this method, an event will be created. Please note that it is your responsibility to unsubscribe the email address in your system, as we do not add the email address to an unsubscribe list in inMobile. Default: false.
  - `anonymizeOptions` string[]: Choose the fields that should be anonymized. You can anonymize none or all of the fields. The fields will be anonymized instantly after the email has been handled. Default: "none". Allowed values: "none", "all"
  - `templateId` string, required: The id of the template to use.
  - `placeholders` ApiDynamicKeyValueCollection
    - `LinkMsisdnOrNull` CountryCodeAndPhoneNumber
      - `countryCodeId` string, nullable
      - `phoneNumber` string, nullable
      - `msisdn` string

## Response `200`

- EmailOutgoingTemplatePostReply
  - `messageId` string: An optional message id used to identify the message. If no message id is provided, a new message id is generated and assigned to the message. This id must be unique across all messages created on the same account. (In case a previous message has been deleted according to GDPR deletion rules setup on the specific account, the messageId is allowed to be reused) If max length is exceeded, the entire api call will fail.
  - `to` EmailRecipient[]: The list of created Receivers
    - `emailAddress` string, required: The email address of the recipient
    - `displayName` string, required: The display name to use for the recipient. If max length is exceeded, the entire api call will fail.
  - `usedPlaceholderKeys` string[]: A list of used placeholder keys.
  - `notUsedPlaceholderKeys` string[]: A list of not used placeholder keys.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `409`: Conflict
- `500`: Internal server error
- `503`: Service unavailable

---

[API](https://skmtc.dev/inmobile/apis/inmobile-rest-api.md) · [All operations](https://skmtc.dev/inmobile/apis/inmobile-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inmobile/apis/inmobile-rest-api/revisions/197a90ad5f8f?raw)
