Send Email
POSThttps://api.tinyemail.com/relay/v1/email/campaign
To send emails to long list of contacts such as sending business campaigns or automated emails to.
Request
- application/json
Body
required
headers object
subject string
body string
preview string
campaignId string
sender object
recipients object
disableTrackingLinks boolean
when enabled, prevents from automatically tracking links in emails
Responses
- 202
- 400
- 401
- 405
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
requestId string
message string
{
"requestId": "833c5151-5a98-4bad-a30f-7cc816352b7a",
"message": "SUCCESS"
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
message string
{
"message": "Some error message"
}
API key is missing or invalid
Method Not Allowed
Authorization: X-RELAY-ACCESS-TOKEN
name: X-RELAY-ACCESS-TOKENtype: apiKeyin: headerdescription: Provide the api key as bearer token as follows. Pass the value as `TOKEN {{api_key}}`. Replace the `{{api_key}}` with your API key provided during onbaording.
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://api.tinyemail.com/relay/v1/email/campaign' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-RELAY-ACCESS-TOKEN: <API_KEY_VALUE>' \
--data-raw '{
"headers": {
"List-Unsubscribe": "<https://unsub.myapp.com/1232422>",
"X-HEADER-1": "string",
"X-HEADER-2": "string"
},
"subject": "Email subject",
"body": "Email body is added here",
"preview": "This is the test subject preview",
"campaignId": "campaignId",
"sender": {
"from": {
"name": "Senders name",
"email": "sender@gmail.com"
},
"replyTo": {
"name": "Senders name",
"email": "sender@gmail.com"
}
},
"recipients": {
"to": [
{
"name": "Receivers name",
"email": "receiver1@gmail.com",
"attributes": {
"CUSTOMER_FIRST_NAME": "John",
"CUSTOMER_LAST_NAME": "Doe"
}
}
]
},
"disableTrackingLinks": true
}'
ResponseClear