/api/2.0/campaigns/email/

POST https://developer.salesfusion.com/api/2.0/campaigns/email/

Description:

Creates a new campaign.

Note: You cannot add or edit the email content through the API, you need to add or edit the content through the Sugar Market UI after creating the email.

Sample Response:
{
    "url": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/",
    "clicks": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/clicks/",
    "opens": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/opens/",
    "unsubscribes": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/unsubscribes/",
    "bounces": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/bounces/",
    "delivered": "https://developer.salesfusion.com/api/2.0/campaigns/email/8808/delivered/",
    "is_recallable": false,
    "campaign_id": 8808,
    "subject": "",
    "status": 9,
    "post_date": "2018-12-19T14:19:51.444259",
    "created_by": "https://developer.salesfusion.com/api/2.0/users/2/",
    "create_date": "2018-12-19T14:19:51.444273",
    "campaign_name": "TJ Gonna send it to ya!",
    "text_only": false,
    "ab_test": false,
    "last_update_date": "2018-12-19T14:19:51.444344",
    "updated_by": "https://developer.salesfusion.com/api/2.0/users/2/",
    "folder": "https://developer.salesfusion.com/api/2.0/tenant/folders/208/",
    "created_by_id": 2,
    "created_by_name": "Michael North",
    "updated_by_id": 2,
    "updated_by_name": "Michael North",
    "folder_id": 208,
    "folder_name": "Harry"
}

Request Body

{"campaign_name"=>"Test Campaign Name", "from_email"=>"testemail@sugarcrm.com", "display_name"=>"test campaign!", "html"=>"<h1>This is some email content!</h1>", "folder_id"=>41}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring