Send Post Letter
POST
/post/letters/send
Post Letter
We support
pdf
, docx
and doc
files. Contact us to add support for any other file type. If you're using docx
or doc
files, you'll need to convert the file first using our uploads endpoint with the querystring parameter convert=post
e.g. POST /uploads?convert=post
. This will return a URL to the converted pdf file that can be used in the /post/letters/send
endpoint.pdf
document. For example, you might generate the pdf
on your server./uploads
endpoint to upload the document. The /uploads
endpoint returns a URL that can be used in the /post/letters/send
endpoint.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://rest.clicksend.com/v3/post/letters/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"colour": 1,
"duplex": 0,
"file_url": "http://yourdomain.com/file.pdf",
"priority_post": 0,
"recipients": [
{
"address_city": "CITY",
"address_country": "AU",
"address_line_1": "Address 1",
"address_line_2": "Address 2",
"address_name": "My Home Address",
"address_postal_code": 123456,
"address_state": "State",
"custom_string": "Custom kn0ChLhwn6",
"return_address_id": 1,
"schedule": 1449573604
}
],
"template_used": 1
}'
Response Response Example
{
"data": {
"_currency": {
"currency_name_long": "Australian Dollars",
"currency_name_short": "AUD",
"currency_prefix_c": "c",
"currency_prefix_d": "$"
},
"queued_count": 1,
"recipients": [
{
"_api_username": "my_api_username",
"_file_url": "http://yourdomain.com/file.pdf",
"_return_address": {
"address_city": "Flynn",
"address_country": "AU",
"address_line_1": "Maritime Avenue",
"address_line_2": "",
"address_name": "John Smith",
"address_postal_code": "6302",
"address_state": "WA",
"return_address_id": 1,
"user_id": 1
},
"address_city": "CITY",
"address_country": "AU",
"address_line_1": "Address 1",
"address_line_2": "",
"address_name": "John Smith",
"address_postal_code": "123456",
"address_state": "State",
"colour": 1,
"custom_string": "kn0ChLhwn6",
"date_added": 1459131623,
"duplex": 0,
"message_id": "A00A1066-BBAE-432B-9B2D-E88969B12C46",
"post_pages": 7,
"post_price": "13.4200",
"priority_post": 0,
"return_address_id": 1,
"schedule": 1449573604,
"source": ".rest.v3",
"status": "SUCCESS",
"subaccount_id": 1,
"user_id": 1
}
],
"total_count": 1,
"total_price": 13.42
},
"http_code": 200,
"response_code": "SUCCESS",
"response_msg": "Letters queued for delivery."
}
Request
Body Params application/json