Calendar

This endpoint allows you to list posts available in your social calendar.

Get Calendar

Example Request

curl -i https://api.oktopost.com/v2/calendar -X POST
-d fromDate=2018-02-01 \
-d toDate=2018-02-20

Example Result

{
    "Campaigns": {
        "002000000000001": {
            "Color": "#3492bf",
            "Id": "002000000000001",
            "Name": "2018-02 General Campaign",
            "Status": "complete"
        }
    },
    "Credentials": {
        "003-001000000000001-1234": {
            "BoardOnly": 0,
            "DisplayName": "OktoTest1",
            "ExpiresOn": "3999-12-31 23:59:59",
            "Id": "003-001000000000001-1234",
            "ImageLink": "https://s3.amazonaws.com/dev-com-oktopost-app-credential-pictures/Facebook-1234.png",
            "IsHidden": 0,
            "Name": "OktoTest  (Page)",
            "Network": "Facebook",
            "NetworkAccountId": "1234",
            "NetworkUsername": "1234",
            "ParentCredentialId": "003-001000000000001-100001878919601",
            "Status": "valid"
        }
    },
    "Media": [],
    "Messages": {
        "005000000000001": {
            "CampaignId": "002000000000001",
            "Clicks": 0,
            "Converts": 0,
            "Description": "Oktopost is a social media management platform designed to publish social messages, engage with social sales and support employee social advocacy",
            "Id": "005000000000001",
            "ImageUrl": "https://s3.amazonaws.com/dev-com-oktopost-app-message-pictures/0010000000000015a8acb3e6e9d47.59722266/imac-from-side.jpg",
            "IsBoardMessage": 0,
            "LinkTitle": "Social Media Management for B2B Marketing - Oktopost",
            "LinkUrl": "https://www.oktopost.com/",
            "MediaIds": [],
            "Message": "hello https://www.oktopost.com/",
            "MessageLength": 31,
            "Network": "Facebook",
            "Status": "default",
            "Subject": "",
            "Type": "link-attachment",
            "Url": ""
        }
    },
    "Posts": {
        "004000000000001": {
            "CampaignId": "002000000000001",
            "Clicks": 0,
            "ContentSource": "User",
            "Converts": 0,
            "CredentialIds": [
                "003-001000000000001-1234"
            ],
            "Id": "004000000000001",
            "MessageId": "005000000000001",
            "Network": "Facebook",
            "Source": "UI",
            "StartDateTime": "2018-02-19 08:03:00",
            "Status": "complete",
            "TotalCount": 1
        }
    },
    "Result": true
}

Parameters

Param Description
fromDate Required. Format: YYYY-MM-DD
toDate Required. Format: YYYY-MM-DD
filters Optional. JSON Object. See structure below

Filters

The following parameters can be used to build the filters object in your request.

Param Type Description
campaigns Array See Campaigns API
credentials Array See Profiles API
messages Array See Message API
networks Array Options: Facebook, Twitter, LinkedIn, and Google
postSources Array See Post API
statuses Array See Post API
users Array See Users API

Example request with filters

curl -i https://api.oktopost.com/v2/calendar -X POST
-d fromDate=2018-02-01 \
-d toDate=2018-02-20 \
-d filters={"campaigns": ["002000000000001"]}

Feedback and Knowledge Base