Create New Campaign
POST
/post/direct-mail/campaigns/send
Post Direct Mail
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://rest.clicksend.com/v3/post/direct-mail/campaigns/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"areas": [
{
"location_id": 1,
"quantity": 100
},
{
"location_id": 2,
"quantity": 100
},
{
"location_id": 3,
"quantity": 50
}
],
"file_urls": [
"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_front.pdf",
"https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_public/_examples/a5_back.pdf"
],
"name": "My Campaign",
"schedule": 1477032023,
"size": "A5",
"source": "wordpress"
}'
Response Response Example
{
"data": {
"currency": {
"currency_name_long": "British Pounds",
"currency_name_short": "GBP",
"currency_prefix_c": "p",
"currency_prefix_d": "£"
},
"data": {
"_areas": [
{
"campaign_id": 80,
"location_id": 22,
"price": "222.00",
"status": "Scheduled"
},
{
"campaign_id": 80,
"location_id": 21,
"price": "22.20",
"status": "Scheduled"
},
{
"campaign_id": 80,
"location_id": 21,
"price": "22.20",
"status": "Scheduled"
}
],
"campaign_id": 80,
"custom_string": "Custom String",
"date_added": 1477291825,
"name": "My Campaign",
"schedule": 1477384503,
"status": "Scheduled",
"user_id": 1
},
"total_price": 266.4,
"total_quantity": 30
},
"http_code": 200,
"response_code": "SUCCESS",
"response_msg": "New direct mail campaign created."
}
Request
Body Params application/json