> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shootmail.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Mail

> Send mails using the REST API endpoint

[![](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/107113-90886de7-13a6-4019-9de3-b8955cbceda7?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D107113-90886de7-13a6-4019-9de3-b8955cbceda7%26entityType%3Dcollection%26workspaceId%3D4cde4d2d-aa18-4f63-ba0a-a3b87f3fc48b)

### Endpoint

```bash POST theme={null}
https://shootmail.app/api/mail/schedule
```

### Authorization

Send API key in the header, just the API key, nothing else. [Here is how to generate API Key](https://docs.shootmail.app/api-keys)

```bash theme={null}
header: {
    'Authorization': 'shootmail-api-key',
    'Content-Type': 'application/json'
}
```

## Request

Request body should contain the following params

```json theme={null}
{
   "provider":"resend", // postmark, zoho, sendgrid, SES
   "apiKey": "re_QMfxxxxxxxxxxxxxxxxxxxxxxxxxxx",
   "templateId":"gktffznidphwrqx",
   "subject":"Regarding your Shootmail subscription",
   "preHeader": "Lifetime Access to Notion-like email editor & templates -  Shootmail", // optional
   "from":{
      "name":"Shootmail",
      "email":"noreply@mail.example.app"
   },
   "to":[
      {
         "email":"abc@example.com"
      }
   ],
   "replyTo": "sps@example.com", // or ["sps@example.com", "sps1@example.com"]
   "data": {
     "name": "John" // custom variables - optional
   }
}
```

### Response

Response will contain

Check [response format](https://docs.shootmail.app/usage/response.md) section.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.