Returns all your campaigns.
[ { id: 1, name: "Pass & Email", kind: 1, last_sent: null, list_id: null, email_content: "Email HTML content
", email_object: "Email subject", email_sender: "Email sender name" }, { id: 2, name: "SMS", kind: 4, last_sent: null, list_id: null, sms_content: "Text message", sms_sender: "Text or phone number" } ]
curl -i https://api.passdock.com/api/v1/campaigns?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
api_token required |
Your Passdock API key Value: Must be String |
Returns a campaign
{ id: 1, name: "Email", kind: 3, last_sent: null, list_id: null, email_content: "Email HTML content
", email_object: "Email subject", email_sender: "Email sender name" }
curl -i https://api.passdock.com/api/v1/campaigns/1?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
id required |
Campaign ID Value: Must be Fixnum |
api_token required |
Your Passdock API key Value: Must be String |
Create a new campaign.
At the moment it is not possible to create pass campaigns through the API.
{ id: 1, name: "Email", kind: 3, last_sent: null, list_id: null, email_content: "Email HTML content
", email_object: "Email subject", email_sender: "Email sender name" }
curl -i -H "Content-Type: application/json" -d '{"campaign":{"name":"Work", "kind":3, "email_content": "<p>Test</p>", "email_object": "Subject", "email_sender": "Sender name"}}' https://api.passdock.com/api/v1/campaigns?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
api_token required |
Your Passdock API key Value: Must be String |
campaign required |
Object that contains List's informations Value: Must be a Hash |
campaign[name] required |
List's name Value: Must be String |
campaign[kind] required |
Campaign kind. One of 3 or 4. At the moment it is not possible to create pass campaigns through the API. Value: Must be Fixnum |
campaign[list_id] optional |
List ID if you want to send the campaign only to a subset of contacts. Value: Must be String |
campaign[email_content] required |
Only for email campaigns: HTML content of the email Value: Must be String |
campaign[email_object] required |
Only for email campaigns: email subject Value: Must be String |
campaign[email_sender] required |
Only for email campaigns: email sender name (not the email from address!) Value: Must be String |
campaign[sms_content] required |
Only for SMS campaigns: SMS text Value: Must be String |
campaign[email_sender] required |
Only for SMS campaigns: either a phone number (which must be previously authorized) or a string Value: Must be String |
Update a Campaign.
curl -i -X PUT -H "Content-Type: application/json" -d '{"campaign":{"name":"Work", "kind":3, "email_content": "<p>Test</p>", "email_object": "Subject", "email_sender": "Sender name"}}' https://api.passdock.com/api/v1/campaigns/1?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
api_token required |
Your Passdock API key Value: Must be String |
id required |
Campaign ID Value: Must be Fixnum |
campaign required |
Object that contains List's informations Value: Must be a Hash |
campaign[name] required |
List's name Value: Must be String |
campaign[list_id] optional |
List ID if you want to send the campaign only to a subset of contacts. Value: Must be String |
campaign[email_content] required |
Only for email campaigns: HTML content of the email Value: Must be String |
campaign[email_object] required |
Only for email campaigns: email subject Value: Must be String |
campaign[email_sender] required |
Only for email campaigns: email sender name (not the email from address!) Value: Must be String |
campaign[sms_content] required |
Only for SMS campaigns: SMS text Value: Must be String |
campaign[email_sender] required |
Only for SMS campaigns: either a phone number (which must be previously authorized) or a string Value: Must be String |
Delete a Campaign.
curl -i -X DELETE https://api.passdock.com/api/v1/campaigns/1?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
id required |
Campaign ID Value: Must be Fixnum |
api_token required |
Your Passdock API key Value: Must be String |
Queues campaign for delivery.
curl -i -X POST https://api.passdock.com/api/v1/campaigns/1/deliver?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
api_token required |
Your Passdock API key Value: Must be String |
force optional |
If you haven't got enough credits, it will try to deliver the campaign to as many contacts as possible Value: Must be Boolean |
Returns all available campaign kinds you can use to create a new campaign.
{ 1: "Pass & Email", 2: "Pass & SMS", 3: "Email", 4: "SMS" }
curl -i https://api.passdock.com/api/v1/campaigns/kinds?api_token=75778a65dfdae310a107d2ef0bbd3780
Param name | Description |
---|---|
api_token required |
Your Passdock API key Value: Must be String |