Everything about sending Emails
Send transactional email
Send transactional email
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 |
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.
Successful response
{- "to": [
- {
- "email": "test@test.com",
- "name": "test from"
}
], - "from": {
- "email_address_id": "{{addressId}}",
- "name": "test"
}, - "subject": "test subject",
- "body": "test body",
- "attachments": [
- {
- "content": "{{base64EncodedImageFile}}",
- "type": "image/jpeg",
- "filename": "test.jpg",
- "disposition": "inline",
- "content_id": "test"
}
]
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Transactional email queued for delivery.",
- "data": {
- "user_id": 1,
- "subaccount_id": 1,
- "from_email_address_id": 1,
- "from_name": "Joanne Doe",
- "to": [
- {
- "email": "test@clicksend.com",
- "name": "John Doe"
}
], - "cc": [
- {
- "email": "test2@clicksend.com",
- "name": "Jane Doe"
}
], - "bcc": [
- {
- "email": "test3@clicksend.com",
- "name": "Joseph Doe"
}
], - "subject": "Test subject",
- "body": "Lorem ipsum",
- "body_plain_text": "Lorem ipsum",
- "schedule": 1507018182,
- "message_id": "21C632C1-3FCC-4EFF-8191-6079244F0142",
- "status": "WaitApproval",
- "status_text": "Accepted for delivery",
- "soft_bounce_count": 0,
- "hard_bounce_count": 0,
- "price": "0.0050",
- "date_added": 1507018182,
- "custom_string": null,
- "_attachments": [
- {
- "file_name": "text.txt",
- "content_type": "text/plain",
- "content_disposition": "attachment",
- "content_id": "text",
}
], - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
}
Get transactional email price
Get transactional email price
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 |
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.
Successful response
{- "to": [
- {
- "email": "test@test.com",
- "name": "test from"
}
], - "from": {
- "email_address_id": "{{addressId}}",
- "name": "test"
}, - "subject": "test subject",
- "body": "test body"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here's your price.",
- "data": [
- {
- "user_id": 1,
- "subaccount_id": 1,
- "from_email_address_id": 1,
- "from_name": "Joanne Doe",
- "to": [
- {
- "email": "test@clicksend.com",
- "name": "John Doe"
}
], - "cc": [
- {
- "email": "test2@clicksend.com",
- "name": "Jane Doe"
}
], - "bcc": [
- {
- "email": "test3@clicksend.com",
- "name": "Joseph Doe"
}
], - "subject": "Test subject",
- "body": "Lorem ipsum",
- "body_plain_text": "Lorem ipsum",
- "schedule": 1507018182,
- "message_id": "21C632C1-3FCC-4EFF-8191-6079244F0142",
- "status": "WaitApproval",
- "status_text": "Accepted for delivery",
- "soft_bounce_count": 0,
- "hard_bounce_count": 0,
- "price": "0.0050",
- "date_added": 1507018182,
- "custom_string": null,
- "_attachments": [
- {
- "file_name": "text.txt",
- "content_type": "text/plain",
- "content_disposition": "attachment",
- "content_id": "text",
}
], - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
]
}
Get all transactional email history
Get all transactional email history
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/history'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your result.",
- "data": [
- {
- "user_id": 1,
- "subaccount_id": 1,
- "from_email_address_id": 1,
- "from_name": "Joanne Doe",
- "to": [
- {
- "email": "test@clicksend.com",
- "name": "John Doe"
}
], - "cc": [
- {
- "email": "test2@clicksend.com",
- "name": "Jane Doe"
}
], - "bcc": [
- {
- "email": "test3@clicksend.com",
- "name": "Joseph Doe"
}
], - "subject": "Test subject",
- "body": "Lorem ipsum",
- "body_plain_text": "Lorem ipsum",
- "schedule": 1507018182,
- "message_id": "21C632C1-3FCC-4EFF-8191-6079244F0142",
- "status": "WaitApproval",
- "status_text": "Accepted for delivery",
- "soft_bounce_count": 0,
- "hard_bounce_count": 0,
- "price": "0.0050",
- "date_added": 1507018182,
- "custom_string": null,
- "_attachments": [
- {
- "file_name": "text.txt",
- "content_type": "text/plain",
- "content_disposition": "attachment",
- "content_id": "text",
}
], - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
]
}
Export all Transactional Email history
Export all Transactional Email history
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/history/export?filename={filename}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Download your file here.",
}
Get all email addresses
Get all email addresses
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/addresses'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your email addresses",
- "data": {
- "total": 2,
- "per_page": 15,
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 2,
- "data": [
- {
- "email_address_id": 2,
- "email_address": "test@user.com",
- "verified": 1,
- "date_added": "1447736880"
}, - {
- "email_address_id": 3,
- "email_address": "test2@user.com",
- "verified": 0,
- "date_added": "1449042967"
}
]
}
}
Create allowed Email Address
Create allowed Email Address
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | string | true | Email to be allowed. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
{- "email_address": "test@test.com"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email address has been created.",
- "data": {
- "email_address_id": 2,
- "email_address": "test2@user.com",
- "verified": 0,
- "date_added": "1436157486"
}
}
Send verification token
Send verification token
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.
Successful response
{- "to": [
- {
- "email": "test@test.com",
- "name": "test from"
}
], - "from": {
- "email_address_id": 2,
- "name": "test"
}, - "subject": "test subject",
- "body": "test body"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Verification email has been sent.",
- "data": null
}
Verify email address using verification token
Verify email address using verification token
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.
Successful response
{- "to": [
- {
- "email": "test@test.com",
- "name": "test from"
}
], - "from": {
- "email_address_id": 2,
- "name": "test"
}, - "subject": "test subject",
- "body": "test body"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email address verified.",
- "data": {
- "email_address_id": 2,
- "email_address": "test2@user.com",
- "verified": 0,
- "date_added": "1436157486"
}
}
Get specific email address
Get specific email address
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your email address.",
- "data": {
- "email_address_id": 2,
- "email_address": "test2@user.com",
- "verified": 0,
- "date_added": "1436157486"
}
}
Delete specific email address
Delete specific email address
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ --request DELETE \ 'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email address deleted.",
- "data": null
}
Send email campaign
Send email campaign
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.
Successful response
{- "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>"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email campaign has been created.",
- "data": {
- "totlal_count": 1,
- "total_price": "0.0066",
- "queued_count": 1,
- "data": {
- "email_campaign_id": 64,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Sent",
- "date_added": "1455586793",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0,
- "body": "test body",
- "body_plain_text": "test body"
}, - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
}
Calculate email campaign price
Calculate email campaign price
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.
Successful response
{- "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>"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Total price for email campaign.",
- "data": {
- "total_count": 1,
- "total_price": "0.0066",
- "queued_count": 2,
- "data": {
- "name": "John Doe",
- "subject": "Lorem Ipsum",
- "from_email_address_id": 2,
- "from_name": "From name",
- "body": "<p>This is a test</p>",
- "list_id": 456
}, - "_currency": {
- "currency_name_short": "AUD",
- "currency_prefix_d": "$",
- "currency_prefix_c": "c",
- "currency_name_long": "Australian Dollars"
}
}
}
Get all email campaigns
Get all email campaigns
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email-campaigns'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your email campaigns",
- "data": {
- "total": 2,
- "per_page": 15,
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 2,
- "data": [
- {
- "email_campaign_id": 64,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Sent",
- "date_added": "1455586793",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0
}, - {
- "email_campaign_id": 65,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Queued",
- "date_added": "1455586848",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0
}
]
}
}
Get specific email campaign
Get specific email campaign
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email-campaigns/{email_campaign_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your email campaign.",
- "data": {
- "email_campaign_id": 64,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Sent",
- "date_added": "1455586793",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0,
- "body": "test body",
- "body_plain_text": "test body"
}
}
Edit email campaign
Edit email campaign
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.
Successful response
{- "schedule": 0,
- "list_id": 123,
- "subject": "subject",
- "from_email_address_id": 4062,
- "name": "name",
- "template_id": 4077,
- "body": "body",
- "from_name": "from_name"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email campaign has been updated.",
- "data": {
- "email_campaign_id": 64,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Sent",
- "date_added": "1455586793",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0,
- "body": "test body",
- "body_plain_text": "test body"
}
}
Cancel email campaign
Cancel email campaign
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.
Successful response
{- "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>"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Email campaign has been cancelled.",
- "data": {
- "email_campaign_id": 64,
- "name": "test email",
- "user_id": 1201,
- "subaccount_id": 1038,
- "subject": "My test subject",
- "list_id": 443,
- "from_email_address_id": 2,
- "from_name": "Test name",
- "template_id": 24,
- "schedule": "",
- "status": "Sent",
- "date_added": "1455586793",
- "custom_string": "",
- "send_count": 0,
- "open_count": 5,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0,
- "abuse_count": 0,
- "unsubscribe_count": 0,
- "body": "test body",
- "body_plain_text": "test body"
}
}
Get specific email campaign history
Get specific email campaign history
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your result.",
- "data": {
- "total": 2,
- "per_page": 15,
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 2,
- "data": [
- {
- "email_campaign_id": 77,
- "from_name": "test name",
- "from_address": "4",
- "to_name": "test2@test.com",
- "to_address": "test2@test.com",
- "contact_id": 669105,
- "subject": "test subject",
- "message_id": "7CB3227C-7F8C-4A72-A0CB-36283236D99F",
- "processed_at": null,
- "status": "SpamReport",
- "open_count": 0,
- "click_count": 0,
- "hard_bounce_count": 13,
- "soft_bounce_count": 1
}, - {
- "email_campaign_id": 77,
- "from_name": "test name",
- "from_address": "4",
- "to_name": "test2@test.com",
- "to_address": "test2@test.com",
- "contact_id": 669105,
- "subject": "test subject",
- "message_id": "603C5349-5A24-40B4-89ED-F7619F7CC8A3",
- "processed_at": null,
- "status": null,
- "open_count": 0,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0
}, - {
- "email_campaign_id": 77,
- "from_name": "test name",
- "from_address": "4",
- "to_name": "test2@test.com",
- "to_address": "test2@test.com",
- "contact_id": 669105,
- "subject": "test subject",
- "message_id": "5C5C0918-B263-42AA-8B5D-9E8ACECC0C64",
- "processed_at": null,
- "status": null,
- "open_count": 0,
- "click_count": 0,
- "hard_bounce_count": 0,
- "soft_bounce_count": 0
}
]
}
}
Export specific email campaign history
Export specific email campaign history
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history/export'
Get all master email templates.
Get all master email templates.
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/master-templates'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "List of Email Master Templates",
- "data": [
- {
- "template_id_master": 57,
- "template_name": "Welcome Email",
- "date_added": "1436157486",
}, - {
- "template_id_master": 1,
- "template_name": "Minty",
- "date_added": "1445848821",
}
]
}
Get specific master email template
Get specific master email template
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/master-templates/{template_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your email template",
- "data": {
- "template_id_master": 57,
- "template_name": "Welcome Email",
- "date_added": "1436157486",
- "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ...\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n</body>\n</html>",
}
}
Get all master email template categories
Get all master email template categories
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/master-templates-categories'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "List of Email Categories",
- "data": [
- {
- "category_id": 2,
- "category_name": "Alerts/Notificartions"
}, - {
- "category_id": 3,
- "category_name": "Art"
}, - {
- "category_id": 4,
- "category_name": "Birthday"
}, - {
- "category_id": 23,
- "category_name": "Blank Template"
}
]
}
Get specific master email template category
Get specific master email template category
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your data.",
- "data": {
- "category_id": 4,
- "name": "Birthday"
}
}
Get all master email templates in a category
Get all master email templates in a category
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}/master-templates'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "List of Email Templates By Category",
- "data": [
- {
- "template_id_master": 1,
- "category_id": 1,
- "template_name": "Minty",
- "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ...\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n</body>\n</html>",
- "date_added": "1445848821",
}
]
}
Get all user email templates
Get all user email templates
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/templates'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your email templates.",
- "data": {
- "total": 2,
- "per_page": 15,
- "current_page": 1,
- "last_page": 1,
- "next_page_url": null,
- "prev_page_url": null,
- "from": 1,
- "to": 15,
- "data": [
- {
- "template_id": 281,
- "template_name": "Test"
}, - {
- "template_id": 290,
- "template_name": "Minions"
}
]
}
}
Create email template
Create email template
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.
Successful response
{- "template_id_master": 1,
- "template_name": "bitpolypmus"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "New email template has been saved.",
- "data": {
- "template_id": 292,
- "template_id_master": 57,
- "template_name": "new minion template!",
- "body": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"..."
}
}
Get specific user email template
Get specific user email templates
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/email/templates/{template_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here is your email template.",
- "data": {
- "template_id": 292,
- "template_id_master": 57,
- "template_name": "new minion template!",
- "body": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"..."
}
}
Update email template
Update email template
Parameter | In | Type | Required | Description |
---|---|---|---|---|
template_id | path | integer(int32) | true | Email template id |
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.
Successful response
{- "body": "Test"
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your email template has been updated.",
- "data": {
- "template_id": 292,
- "template_id_master": 57,
- "template_name": "new minion template!",
- "body": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"..."
}
}
Delete user email template
Delete user email template
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.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ --request DELETE \ 'https://rest.clicksend.com/v3/email/templates/{template_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Your email template has been deleted.",
- "data": [ ]
}