---
title: "POST /send_mail"
method: POST
path: "/send_mail"
tags: ["Notifications"]
---

# POST /send_mail

`POST /send_mail`

## Request

- Base URL: `https://api.paynearme-sandbox.com/json-api`
- URL: `https://api.paynearme-sandbox.com/json-api/send_mail`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://login.paynearme.com/oauth/token`
  - API key in query parameter `signature`

Create and send an email message to the consumer

## Request body

- SendMail: Creates and sends an Email message
  - `site_identifier` string, required: Identifies your client site.
  - `timestamp` string, required: The Unix Epoch time of the call
  - `version` string, required: The version of the API. This version must match the version associated with your API key pair.
  - `signature` string: The HMAC signature that is calculated by running your API Secret Key and the alphabetized, concatenated parameters of the request payload through the SHA256 message digest algorithm. **NOTE:** This field is required when authenticating with the HMAC signature method; it is not required when authenticating with OAuth 2.0.
  - `recipients` string, required: The email addresses where you are sending the email. Use commas to separate email addresses when sending the message to multiple recipients.
  - `subject` string, required: The subject of the email message.
  - `body_text` string, required: The text of the email message. This parameter does not support HTML or special characters like emojis.

## Response `200`

Email Sent

- SendMailResponse
  - `status` string: Provides the status of the request.

## Other responses

- `401`: OAuth 2.0 requests only. The `Authorization` header has no Bearer token, the access token is invalid, expired, or issued for a different site, or the `site_identifier` does not match any site. The response does not say which. If the request is rejected before it reaches PayNearMe, the body may not be JSON, so detect this error by the HTTP status. HMAC-signed requests never receive this status.

## Changes

- **2026-11-03** `907541f733a3`: 1 breaking, 4 info
  - removed the success response with the status `201`
  - api operation id `send_mail` was added
  - the request property `signature` became optional
  - added the non-success response with the status `401`
  - …1 more

[Operation history](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/changes/send_mail/post.md)

---

[API](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0.md) - [All operations](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/revisions/907541f733a3?raw)
