Email (1.0.0)

Everything about sending Emails

Send Email

Send transactional email

Send transactional email

Properties

Name Type Required Restrictions Description
to array true none Array of To Recipient items. (array of names and emails)
cc array false none Array of Cc Recipient items. (array of names and emails)
bcc array false none Array of Bcc Recipient items. (array of names and emails)
from object true none From Email object. (object containing name and email)
body string true none Body of the email.
attachments array false none Array of Attachment items.
schedule number false none Schedule.
name string false none Name of person email belongs to
email string true none Email to be used.
content string true none The base64-encoded contents of the file.
type string true none The type of file being attached.
filename string true none The name of the file being attached.
disposition string true none Inline for content that can be displayed within the email, or attachment for any other files.
content_id string true none An ID for the content.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email/send
Request samples
application/json
{
  • "to": [
    ],
  • "from": {
    },
  • "subject": "test subject",
  • "body": "test body",
  • "attachments": [
    ]
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Transactional email queued for delivery.",
  • "data": {
    }
}

Calculate Email Price

Get transactional email price

Get transactional email price

Properties

Name Type Required Restrictions Description
to array true none Array of To Recipient items. (array of names and emails)
cc array false none Array of Cc Recipient items. (array of names and emails)
bcc array false none Array of Bcc Recipient items. (array of names and emails)
from object true none From Email object. (object containing name and email)
body string true none Body of the email.
attachments array false none Array of Attachment items.
schedule number false none Schedule.
name string false none Name of person email belongs to
email string true none Email to be used.
content string true none The base64-encoded contents of the file.
type string true none The type of file being attached.
filename string true none The name of the file being attached.
disposition string true none Inline for content that can be displayed within the email, or attachment for any other files.
content_id string true none An ID for the content.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email/price
Request samples
application/json
{
  • "to": [
    ],
  • "from": {
    },
  • "subject": "test subject",
  • "body": "test body"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here's your price.",
  • "data": [
    ]
}

View Email History

Get all transactional email history

Get all transactional email history

Parameters

Parameter In Type Required Description
date_from query integer(int32) false Start date (Unix Timestamp e.g. 1436849372)
date_to query integer(int32) false End date (Unix Timestamp e.g. 1436879372)
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/history
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/history'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your result.",
  • "data": [
    ]
}

Export Email History

Export all Transactional Email history

Export all Transactional Email history

Parameters

Parameter In Type Required Description
filename query string true Filename to download history as
date_from query integer(int32) false Start date (Unix Timestamp e.g. 1436849372)
date_to query integer(int32) false End date (Unix Timestamp e.g. 1436879372)

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/history/export
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/history/export?filename={filename}'
Response samples
application/json
{}

View Allowed Email Addresses

Get all email addresses

Get all email addresses

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/addresses
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/addresses'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your email addresses",
  • "data": {
    }
}

Create Allowed Email Address

Create allowed Email Address

Create allowed Email Address

Parameters

Parameter In Type Required Description
body body string true Email to be allowed.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email/addresses
Request samples
application/json
{
  • "email_address": "test@test.com"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email address has been created.",
  • "data": {
    }
}

Send Email Verification Token

Send verification token

Send verification token

Parameters

Parameter In Type Required Description
email_address_id path integer(int32) true Allowed email address id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_address_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/email/address-verify/{email_address_id}/send
Request samples
application/json
{
  • "to": [
    ],
  • "from": {
    },
  • "subject": "test subject",
  • "body": "test body"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Verification email has been sent.",
  • "data": null
}

Verify Allowed Email Address

Verify email address using verification token

Verify email address using verification token

Parameters

Parameter In Type Required Description
email_address_id path integer(int32) true Allowed email address id
activation_token path string true Your activation token.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_address_id
required
string
activation_token
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/email/address-verify/{email_address_id}/verify/{activation_token}
Request samples
application/json
{
  • "to": [
    ],
  • "from": {
    },
  • "subject": "test subject",
  • "body": "test body"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email address verified.",
  • "data": {
    }
}

View Allowed Email Address

Get specific email address

Get specific email address

Parameters

Parameter In Type Required Description
email_address_id path integer(int32) true Allowed email address id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_address_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/addresses/{email_address_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your email address.",
  • "data": {
    }
}

Delete Allowed Email Address

Delete specific email address

Delete specific email address

Parameters

Parameter In Type Required Description
email_address_id path integer(int32) true Allowed email address id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_address_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

delete/v3/email/addresses/{email_address_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request DELETE \
'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email address deleted.",
  • "data": null
}

Send Email Campaign

Send email campaign

Send email campaign

Properties

Name Type Required Restrictions Description
name string true none Your campaign name.
subject string true none Your campaign subject.
body string true none Your campaign message.
from_email_address_id number true none The allowed email address id.
from_name string true none Your name or business name.
template_id number false none Your template id.
list_id number true none Your contact list id.
schedule integer(int32) false none Your schedule timestamp.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email-campaigns/send
Request samples
application/json
{
  • "name": "test campaign",
  • "subject": "Test email subject",
  • "from_email_address_id": "{{emailId}}",
  • "template_id": "{{templateId}}",
  • "list_id": "{{listId}}",
  • "from_name": "Test Name",
  • "draft": 0,
  • "custom_string": "test !@#$%^&*()",
  • "body": "<p>it's a test</p>"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email campaign has been created.",
  • "data": {
    }
}

Calculate Email Campaign Price

Calculate email campaign price

Calculate email campaign price

Properties

Name Type Required Restrictions Description
name string true none Your campaign name.
subject string true none Your campaign subject.
body string true none Your campaign message.
from_email_address_id number true none The allowed email address id.
from_name string true none Your name or business name.
template_id number false none Your template id.
list_id number true none Your contact list id.
schedule integer(int32) false none Your schedule timestamp.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email-campaigns/price
Request samples
application/json
{
  • "name": "test campaign",
  • "subject": "Test email subject",
  • "from_email_address_id": "{{emailId}}",
  • "template_id": "{{templateId}}",
  • "list_id": "{{listId}}",
  • "from_name": "Test Name",
  • "draft": 0,
  • "schedule": "1250165515",
  • "custom_string": "test !@#$%^&*()",
  • "body": "<p>it's a test</p>"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Total price for email campaign.",
  • "data": {
    }
}

View All Email Campaigns

Get all email campaigns

Get all email campaigns

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email-campaigns
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email-campaigns'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your email campaigns",
  • "data": {
    }
}

View Email Campaign

Get specific email campaign

Get specific email campaign

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_campaign_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email-campaigns/{email_campaign_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email-campaigns/{email_campaign_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your email campaign.",
  • "data": {
    }
}

Update Email Campaign

Edit email campaign

Edit email campaign

Parameters

Parameter In Type Required Description
email_campaign_id path integer(int32) true Allowed email campaign id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_campaign_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/email-campaigns/{email_campaign_id}
Request samples
application/json
{
  • "schedule": 0,
  • "list_id": 123,
  • "subject": "subject",
  • "from_email_address_id": 4062,
  • "name": "name",
  • "template_id": 4077,
  • "body": "body",
  • "from_name": "from_name"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email campaign has been updated.",
  • "data": {
    }
}

Cancel Email Campaign

Cancel email campaign

Cancel email campaign

Parameters

Parameter In Type Required Description
email_campaign_id path integer(int32) true Allowed email campaign id
date_from query integer(int32) false Start date (Unix Timestamp e.g. 1436849372)
date_to query integer(int32) false End date (Unix Timestamp e.g. 1436879372)
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_campaign_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/email-campaigns/{email_campaign_id}/cancel
Request samples
application/json
{
  • "name": "test campaign",
  • "subject": "Test email subject",
  • "from_email_address_id": 1,
  • "template_id": 67,
  • "list_id": 285,
  • "from_name": "Test Name",
  • "draft": 0,
  • "schedule": "1250165515",
  • "custom_string": "test !@#$%^&*()",
  • "body": "<p>it's a test</p>"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Email campaign has been cancelled.",
  • "data": {
    }
}

View Email Campaign History

Get specific email campaign history

Get specific email campaign history

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_campaign_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email-campaigns/{email_campaign_id}/history
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your result.",
  • "data": {
    }
}

Export Email Campaign History

Export specific email campaign history

Export specific email campaign history

Parameters

Parameter In Type Required Description
email_campaign_id path integer(int32) true Allowed email campaign id
date_from query integer(int32) false Start date (Unix Timestamp e.g. 1436849372)
date_to query integer(int32) false End date (Unix Timestamp e.g. 1436879372)

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
email_campaign_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email-campaigns/{email_campaign_id}/history/export
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history/export'

View Master Email Templates

Get all master email templates.

Get all master email templates.

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/master-templates
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/master-templates'
Response samples
application/json
{}

View Master Email Template

Get specific master email template

Get specific master email template

Parameters

Parameter In Type Required Description
template_id path integer(int32) true Email template id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
template_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/master-templates/{template_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/master-templates/{template_id}'
Response samples
application/json
{}

View Template Categories

Get all master email template categories

Get all master email template categories

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/master-templates-categories
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/master-templates-categories'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "List of Email Categories",
  • "data": [
    ]
}

View Template Category

Get specific master email template category

Get specific master email template category

Parameters

Parameter In Type Required Description
category_id path integer(int32) true Email category id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
category_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/master-templates-categories/{category_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your data.",
  • "data": {
    }
}

View Templates in Category

Get all master email templates in a category

Get all master email templates in a category

Parameters

Parameter In Type Required Description
category_id path integer(int32) true Email category id
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
category_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/master-templates-categories/{category_id}/master-templates
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}/master-templates'
Response samples
application/json
{}

View Email Templates

Get all user email templates

Get all user email templates

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/templates
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/templates'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your email templates.",
  • "data": {
    }
}

Create Email Template

Create email template

Create email template

Properties

Name Type Required Restrictions Description
template_name string true none The intended name for the new template.
template_id_master number true none The ID of the master template you want to base on.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/email/templates
Request samples
application/json
{
  • "template_id_master": 1,
  • "template_name": "bitpolypmus"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "New email template has been saved.",
  • "data": {
    }
}

View Email Template

Get specific user email template

Get specific user email templates

Parameters

Parameter In Type Required Description
template_id path integer(int32) true Email template id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
template_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/email/templates/{template_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
'https://rest.clicksend.com/v3/email/templates/{template_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here is your email template.",
  • "data": {
    }
}

Update Email Template

Update email template

Update email template

Parameters

Parameter In Type Required Description
template_id path integer(int32) true Email template id

Properties

Name Type Required Restrictions Description
template_name string false none The intended name for the template.
body string true none Your template body.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
template_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/email/templates/{template_id}
Request samples
application/json
{
  • "body": "Test"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Your email template has been updated.",
  • "data": {
    }
}

Delete Email Template

Delete user email template

Delete user email template

Parameters

Parameter In Type Required Description
template_id path integer(int32) true Email template id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
template_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

delete/v3/email/templates/{template_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request DELETE \
'https://rest.clicksend.com/v3/email/templates/{template_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Your email template has been deleted.",
  • "data": [ ]
}
Copyright © ClickSend 2024. All right reserved.