ClickSend Transactional Email API
Send transactional email from verified sender addresses, price and view email history, and manage verified from-addresses via POST /email/send, /email/price, GET /email/history and /email/addresses.
Send transactional email from verified sender addresses, price and view email history, and manage verified from-addresses via POST /email/send, /email/price, GET /email/history and /email/addresses.
openapi: 3.0.3
info:
title: ClickSend v3 API
description: >-
Representative OpenAPI 3.x description of the ClickSend v3 REST API, a single
cloud communications API for SMS, MMS, voice / text-to-speech, transactional
email, and physical post (letters and postcards), plus contacts and lists,
delivery receipts, inbound handling, and account/balance. All requests use
HTTP Basic authentication with your ClickSend username and API key. This
document models a representative subset of the documented endpoints; see the
official reference for the complete surface.
termsOfService: https://www.clicksend.com/au/legal/terms-of-service/
contact:
name: ClickSend Support
email: support@clicksend.com
url: https://developers.clicksend.com/
version: '3.1'
servers:
- url: https://rest.clicksend.com/v3
description: ClickSend v3 production API
security:
- basicAuth: []
tags:
- name: SMS
description: Send and view SMS messages.
- name: MMS
description: Send and view MMS messages.
- name: Voice
description: Send and view voice (text-to-speech) messages.
- name: Email
description: Send and view transactional email.
- name: Post Letter
description: Print and mail physical letters.
- name: Post Postcard
description: Print and mail physical postcards.
- name: Contact
description: Manage contacts.
- name: ContactList
description: Manage contact lists.
- name: Receipts
description: Delivery receipts, inbound messages, and automations.
- name: Account
description: Account details, usage, and balance.
paths:
/sms/send:
post:
tags:
- SMS
operationId: smsSendPost
summary: Send one or more SMS messages.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SmsMessageCollection'
responses:
'200':
description: Messages queued.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/price:
post:
tags:
- SMS
operationId: smsPricePost
summary: Calculate the total price for one or more SMS messages before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SmsMessageCollection'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/history:
get:
tags:
- SMS
operationId: smsHistoryGet
summary: Get a paginated list of sent SMS messages.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of SMS messages.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/{message_id}/cancel:
put:
tags:
- SMS
operationId: smsCancelPut
summary: Cancel a queued SMS message that has not yet been sent.
parameters:
- name: message_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Message cancelled.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/templates:
get:
tags:
- SMS
operationId: smsTemplatesGet
summary: Get a list of saved SMS templates.
responses:
'200':
description: A list of SMS templates.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/mms/send:
post:
tags:
- MMS
operationId: mmsSendPost
summary: Send one or more MMS messages with a media file and subject.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MmsMessageCollection'
responses:
'200':
description: MMS queued.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/mms/price:
post:
tags:
- MMS
operationId: mmsPricePost
summary: Calculate the total price for one or more MMS messages before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MmsMessageCollection'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/mms/history:
get:
tags:
- MMS
operationId: mmsHistoryGet
summary: Get a paginated list of sent MMS messages.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of MMS messages.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/voice/send:
post:
tags:
- Voice
operationId: voiceSendPost
summary: Send one or more voice (text-to-speech) messages.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMessageCollection'
responses:
'200':
description: Voice messages queued.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/voice/price:
post:
tags:
- Voice
operationId: voicePricePost
summary: Calculate the total price for one or more voice messages before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMessageCollection'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/voice/lang:
get:
tags:
- Voice
operationId: voiceLangGet
summary: Get a list of supported voice languages and voices.
responses:
'200':
description: A list of supported languages.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/voice/{message_id}/cancel:
put:
tags:
- Voice
operationId: voiceCancelPut
summary: Cancel a queued voice message.
parameters:
- name: message_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Voice message cancelled.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/email/send:
post:
tags:
- Email
operationId: emailSendPost
summary: Send a transactional email from a verified sender address.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Email'
responses:
'200':
description: Email queued.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/email/price:
post:
tags:
- Email
operationId: emailPricePost
summary: Calculate the price of an email before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Email'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/email/history:
get:
tags:
- Email
operationId: emailHistoryGet
summary: Get a paginated list of sent emails.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of emails.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/email/addresses:
get:
tags:
- Email
operationId: emailAddressesGet
summary: Get a list of verified email from-addresses.
responses:
'200':
description: A list of verified email addresses.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/letters/send:
post:
tags:
- Post Letter
operationId: postLettersSendPost
summary: Print and mail one or more letters from an uploaded PDF.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostLetter'
responses:
'200':
description: Letters queued for print and mail.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/letters/price:
post:
tags:
- Post Letter
operationId: postLettersPricePost
summary: Calculate the price of a letter before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostLetter'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/letters/history:
get:
tags:
- Post Letter
operationId: postLettersHistoryGet
summary: Get a paginated list of sent letters.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of letters.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/letters/detect-address:
post:
tags:
- Post Letter
operationId: postLettersDetectAddressPost
summary: Detect and validate a delivery address on an uploaded letter PDF.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
file_url:
type: string
responses:
'200':
description: Address detection result.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/postcards/send:
post:
tags:
- Post Postcard
operationId: postPostcardsSendPost
summary: Print and mail one or more postcards from an uploaded PDF.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostPostcard'
responses:
'200':
description: Postcards queued for print and mail.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/postcards/price:
post:
tags:
- Post Postcard
operationId: postPostcardsPricePost
summary: Calculate the price of a postcard before sending.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostPostcard'
responses:
'200':
description: Price calculated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/post/postcards/history:
get:
tags:
- Post Postcard
operationId: postPostcardsHistoryGet
summary: Get a paginated list of sent postcards.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of postcards.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/uploads:
post:
tags:
- Post Letter
operationId: uploadsPost
summary: Upload a media file (PDF, image) to reference in post, MMS, or campaigns.
parameters:
- name: convert
in: query
required: true
schema:
type: string
enum: [mms, post, campaign]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Upload'
responses:
'200':
description: File uploaded; returns a referenceable URL.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/lists:
get:
tags:
- ContactList
operationId: listsGet
summary: Get a paginated list of contact lists.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of contact lists.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
post:
tags:
- ContactList
operationId: listsPost
summary: Create a new contact list.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ContactList'
responses:
'200':
description: Contact list created.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/lists/{list_id}/contacts:
get:
tags:
- Contact
operationId: listContactsGet
summary: Get a paginated list of contacts within a list.
parameters:
- name: list_id
in: path
required: true
schema:
type: integer
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of contacts.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
post:
tags:
- Contact
operationId: listContactsPost
summary: Create a new contact within a list.
parameters:
- name: list_id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
responses:
'200':
description: Contact created.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/lists/{list_id}/import:
post:
tags:
- ContactList
operationId: listImportPost
summary: Import contacts into a list from an uploaded file.
parameters:
- name: list_id
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
file_url:
type: string
field_order:
type: array
items:
type: string
responses:
'200':
description: Contacts imported.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/search/contacts-lists:
get:
tags:
- ContactList
operationId: searchContactsLists
summary: Search across contacts and lists.
parameters:
- name: q
in: query
required: true
schema:
type: string
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: Search results.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/receipts:
get:
tags:
- Receipts
operationId: smsReceiptsGet
summary: Get a paginated list of SMS delivery receipts.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of delivery receipts.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/receipts-read:
put:
tags:
- Receipts
operationId: smsReceiptsReadPut
summary: Mark SMS delivery receipts as read.
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
date_before:
type: integer
responses:
'200':
description: Receipts marked as read.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/sms/inbound:
get:
tags:
- Receipts
operationId: smsInboundGet
summary: Get a paginated list of inbound SMS messages.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of inbound SMS.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/voice/receipts:
get:
tags:
- Receipts
operationId: voiceReceiptsGet
summary: Get a paginated list of voice delivery receipts.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of voice receipts.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/mms/receipts:
get:
tags:
- Receipts
operationId: mmsReceiptsGet
summary: Get a paginated list of MMS delivery receipts.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of MMS receipts.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/automations/sms/receipts:
get:
tags:
- Receipts
operationId: automationsSmsReceiptsGet
summary: Get the configured SMS delivery-receipt automation (webhook) rules.
responses:
'200':
description: A list of receipt automation rules.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
post:
tags:
- Receipts
operationId: automationsSmsReceiptsPost
summary: Create an SMS delivery-receipt automation that forwards receipts to a webhook URL.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AutomationRule'
responses:
'200':
description: Automation rule created.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/automations/sms/inbound:
get:
tags:
- Receipts
operationId: automationsSmsInboundGet
summary: Get the configured inbound-SMS automation (webhook) rules.
responses:
'200':
description: A list of inbound automation rules.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
post:
tags:
- Receipts
operationId: automationsSmsInboundPost
summary: Create an inbound-SMS automation that forwards inbound messages to a webhook URL.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AutomationRule'
responses:
'200':
description: Automation rule created.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/account:
get:
tags:
- Account
operationId: accountGet
summary: Get account details, including the current credit balance.
responses:
'200':
description: Account details.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/account/usage/{year}/{month}/subaccount:
get:
tags:
- Account
operationId: accountUsageBySubaccountGet
summary: Get account usage broken down by subaccount for a given month.
parameters:
- name: year
in: path
required: true
schema:
type: integer
- name: month
in: path
required: true
schema:
type: integer
responses:
'200':
description: Usage by subaccount.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/subaccounts:
get:
tags:
- Account
operationId: subaccountsGet
summary: Get a paginated list of subaccounts.
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A paginated list of subaccounts.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
description: >-
HTTP Basic authentication using your ClickSend username and API key.
The username is your ClickSend account username; the password is your
API key from the ClickSend dashboard.
parameters:
page:
name: page
in: query
required: false
schema:
type: integer
default: 1
description: Page number for paginated results.
limit:
name: limit
in: query
required: false
schema:
type: integer
default: 10
description: Number of results per page.
schemas:
ApiResponse:
type: object
properties:
http_code:
type: integer
example: 200
response_code:
type: string
example: SUCCESS
response_msg:
type: string
data:
type: object
SmsMessage:
type: object
properties:
source:
type: string
description: Source of the message (e.g., php, sdk).
default: sdk
from:
type: string
description: Sender ID or dedicated number.
body:
type: string
description: Message body.
to:
type: string
description: Recipient number in E.164 format.
schedule:
type: integer
description: Unix timestamp to schedule delivery.
custom_string:
type: string
country:
type: string
list_id:
type: integer
required:
- body
- to
SmsMessageCollection:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/SmsMessage'
required:
- messages
MmsMessage:
type: object
properties:
source:
type: string
default: sdk
from:
type: string
body:
type: string
to:
type: string
subject:
type: string
media_file:
type: string
description: URL of the uploaded media file.
schedule:
type: integer
country:
type: string
required:
- to
- subject
- media_file
MmsMessageCollection:
type: object
properties:
media_file:
type: string
messages:
type: array
items:
$ref: '#/components/schemas/MmsMessage'
required:
- messages
VoiceMessage:
type: object
properties:
source:
type: string
default: sdk
body:
type: string
description: Text to be read aloud via text-to-speech.
to:
type: string
lang:
type: string
description: Language / voice code, e.g. en-us.
voice:
type: string
enum: [female, male]
schedule:
type: integer
custom_string:
type: string
country:
type: string
machine_detection:
type: integer
require_input:
type: integer
required:
- body
- to
- lang
- voice
VoiceMessageCollection:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/VoiceMessage'
required:
- messages
Email:
type: object
properties:
to:
type: array
items:
type: object
properties:
email:
type: string
name:
type: string
cc:
type: array
items:
type: object
bcc:
type: array
items:
type: object
from:
type: object
properties:
email_address_id:
type: integer
name:
type: string
subject:
type: string
body:
type: string
attachments:
type: array
items:
type: object
schedule:
type: integer
required:
- to
- from
- subject
- body
PostLetter:
type: object
properties:
file_url:
type: string
description: URL of the uploaded PDF to print and mail.
template_used:
type: integer
colour:
type: integer
description: 1 for colour, 0 for black and white.
duplex:
type: integer
description: 1 for double-sided, 0 for single-sided.
priority_post:
type: integer
recipients:
type: array
items:
$ref: '#/components/schemas/PostRecipient'
required:
- file_url
- recipients
PostPostcard:
type: object
properties:
file_url:
type: string
description: URL of the uploaded PDF design to print and mail.
recipients:
type: array
items:
$ref: '#/components/schemas/PostRecipient'
required:
- file_url
- recipients
PostRecipient:
type: object
properties:
address_name:
type: string
address_line_1:
type: string
address_line_2:
type: string
address_city:
type: string
address_state:
type: string
address_postal_code:
type: string
address_country:
type: string
return_address_id:
type: integer
schedule:
type: integer
required:
- address_name
- address_line_1
- address_city
- address_postal_code
- address_country
ContactList:
type: object
properties:
list_name:
type: string
required:
- list_name
Contact:
type: object
properties:
first_name:
type: string
last_name:
type: string
email:
type: string
phone_number:
type: string
fax_number:
type: string
organization_name:
type: string
address_line_1:
type: string
address_city:
type: string
address_state:
type: string
address_postal_code:
type: string
address_country:
type: string
custom_1:
type: string
Upload:
type: object
properties:
content:
type: string
description: Base64-encoded or hosted file content reference.
required:
- content
AutomationRule:
type: object
properties:
rule_name:
type: string
url:
type: string
description: Webhook URL to which events are forwarded.
dedicated_number:
type: string
enabled:
type: integer
required:
- url