Campaigns

The following endpoint can be used to read, create, update and delete Oktopost campaigns.

Get Campaign

Get a single campaign by Id.

Example Request

curl -i https://api.oktopost.com/v2/campaign/002000000000000

Example Result

{  
    "Result":true,
    "Campaign":{  
        "Id":"002000000000000",
        "Created":"2015-09-24 22:11:36",
        "Modified":"2015-09-24 22:11:40",
        "Name":"Oktopost Rocks",
        "Status":"active",
        "AccountId":"001000000000000",
        "CreatedBy":"00A000000000000",
        "ModifiedBy":"00A000000000000",
        "Url":"",
        "Color":"#de8736",
        "ShortUrl":"",
        "StartDate":"0000-00-00 00:00:00",
        "EndDate":"0000-00-00 00:00:00",
        "LastConversionDate":"0000-00-00 00:00:00",
        "LastCommentFound":"0000-00-00 00:00:00",
        "SendSummary":"",
        "Clicks":0,
        "ChildClicks":0,
        "BoardClicks":0,
        "Converts":0,
        "ChildConverts":0,
        "BoardConverts":0,
        "Comments":0,
        "NewComments":0,
        "Likes":0,
        "TotalMessages":0,
        "TotalPosts":0,
        "TotalPendingPosts":0,
        "TotalDraftPosts":0,
        "SFDCCampaignId":"701b0000000NOhlAAG",
        "SFDCCampaignName":"Oktopost: Hello",
        "SFDCCampaignOption":"account-campaign-only",
        "Utm":""
    }
}

List Campaigns

Example Request

curl -i https://api.oktopost.com/v2/campaign

Example Result

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"002000000000000",
            "Name":"Hello World",
            "TotalPosts":0,
            "TotalPendingPosts":0,
            "TotalDraftPosts":0,
            "Clicks":0,
            "Converts":0,
            "Created":"2015-09-24 22:11:36",
            "Status":"active",
            "Comments":0,
            "PostsSent":0
        },
        ...
    ],
    "Total":193
}

Create Campaign

Example Request

curl -i https://api.oktopost.com/v2/campaign -X POST \
-d name="Oktopost Rocks" \
-d url="http://www.oktopost.com"

Update Campaign

Example Request

curl -i https://api.oktopost.com/v2/campaign/002hdrn7bv1iogb -X POST \
-d name="Oktopost Rocks Again" \
-d url="http://www.oktopost.com/tour/social-media-publishing"

Both create and update actions will return a similar response to the GET endpoint.

Delete Campaign

Example Request

curl -i https://api.oktopost.com/v2/campaign/00243ZdmqL9gwkM -X DELETE

Example Result

{
	"Result": true
}

Feedback and Knowledge Base