Skip to main content

Send Email

POST 

https://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

Body

required
    headers object

    Additional headers to be added to the email.

    List-Unsubscribe string

    Unsubscribe header for the email. This will override the default unsubscribe header generated by TinyEmail. It must support POST requests. For more information, visit email sender guidelines

    X-HEADER-1 string
    X-HEADER-2 string
    subject string
    body string
    preview string
    campaignId string
    sender object
    from object
    name string
    email string
    replyTo object
    name string
    email string
    recipients object
    to object[]
  • Array [
  • name string
    email string
    attributes object
    KEY_NAME_1 string
    KEY_NAME_2 string
  • ]
  • disableTrackingLinks boolean

    when enabled, prevents from automatically tracking links in emails

Responses

Successful operation

Schema
    requestId string
    message string

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 -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
}'
Request Collapse all
Base URL
https://api.tinyemail.com/relay/v1
Auth
Body required
{
"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

Click the Send API Request button above and see the response here!