Oktopost
Publishing

Posts

Create, schedule, and manage social media posts across your connected networks.

A social media post is content that has been scheduled or published to a specific social profile on a specific date and time. Posts are based on Messages, which are reusable content templates that can be scheduled multiple times across different profiles and dates. Use these endpoints to create posts from messages, schedule them for publication, retrieve post details and analytics, and manage your posting queue.

Get Post

Example Request

curl -i https://api.oktopost.com/v2/post/004000000000000

Example Result

{  
    "Result":true,
    "Post":{  
        "Id":"004000000000000",
        "Created":"2015-12-07 23:47:30",
        "Modified":"2015-12-08 12:55:11",
        "Status":"inqueue",
        "AccountId":"001000000000000",
        "CreatedBy":"00A000000000000",
        "ModifiedBy":"00A000000000000",
        "Source":"API",
        "ContentSource":"User",
        "Queued":1,
        "CampaignId":"002000000000000",
        "MessageId":"005000000000000",
        "MessageChildId":"",
        "MessageStatus":"default",
        "Network":"Twitter",
        "StartDateTime":"2015-12-08 00:00:00",
        "Groups":"",
        "GroupsCount":0,
        "TotalCount":1,
        "TargetGeo":"",
        "UpdateStatus":1,
        "Flag":"discussion",
        "Clicks":0,
        "Converts":0,
        "Comments":0,
        "NewComments":0,
        "Likes":0,
        "Utm":"",
        "Credentials":"003-001000000000000-12345678"
	}
}

Get Post Stats

To get updated stats per social post, add stats=1 to the query parameters, like so:

curl -i https://api.oktopost.com/v2/post/004000000000000?stats=1

This will result in:

{  
    "Result":true,
    "Post":{  
        "Id":"004000000000000",
        "Created":"2015-12-07 23:47:30",
        "Modified":"2015-12-08 12:55:11",
        "Status":"inqueue",
        "AccountId":"001000000000000",
        "CreatedBy":"00A000000000000",
        "ModifiedBy":"00A000000000000",
        "Source":"API",
        "ContentSource":"User",
        "Queued":1,
        "CampaignId":"002000000000000",
        "MessageId":"005000000000000",
        "MessageChildId":"",
        "MessageStatus":"default",
        "Network":"Twitter",
        "StartDateTime":"2015-12-08 00:00:00",
        "Groups":"",
        "GroupsCount":0,
        "TotalCount":1,
        "TargetGeo":"",
        "UpdateStatus":1,
        "Flag":"discussion",
        "Clicks":0,
        "Converts":0,
        "Comments":0,
        "NewComments":0,
        "Likes":0,
        "Utm":"",
        "Credentials":"003-001000000000000-12345678"
	},
	"Stats": {
        "LinkClicks": 0,
        "Conversions": 0,
        "Comments": 0,
        "Likes": 0,
        "Shares": 0,
        "ImpressionsAdded": 69
    }
}

List Posts

Example Request

curl -i https://api.oktopost.com/v2/post?campaignId=002000000000000

Parameters

The following parameters can be used to filter requests. We strongly recommend using filtering and ordering to get the desired results.

ParamDefaultDescription
_page0The current page
_count25The number of results per page. Options: 25, 50, 100
_ordercreatedOptions: created, modified, startDateTime
messageId-

See Messages API

campaignId-

See Campaigns API

status-Post status, see post statuses below
createdBy-The Id of the Oktopost User who created the post
source-The channel the post created from, see sources below
before-Exclusive. End of range for the current _order field. E.g. 2017-07-01 00:00:00
after-Inclusive. Start of range for the current _order field. E.g. 2017-07-01 00:00:00

Example Result

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"004000000000000",
            "Created":"2015-12-07 23:47:30",
            "Modified":"2015-12-08 12:55:11",
            "Status":"inqueue",
            "AccountId":"001000000000000",
            "CreatedBy":"00A000000000000",
            "ModifiedBy":"00A000000000000",
            "Source":"API",
            "ContentSource":"User",
            "Queued":1,
            "CampaignId":"002000000000000",
            "MessageId":"005000000000000",
            "MessageChildId":"",
            "MessageStatus":"default",
            "Network":"Twitter",
            "StartDateTime":"2015-12-08 00:00:00",
            "Groups":"",
            "GroupsCount":0,
            "TotalCount":1,
            "TargetGeo":"",
            "UpdateStatus":1,
            "Flag":"discussion",
            "Clicks":0,
            "Converts":0,
            "Comments":0,
            "NewComments":0,
            "Likes":0,
            "Utm":"",
            "Credentials":"003-001000000000000-12345678"
        },
        ...
    ],
    "Total":22509
}

Create Post

Example Request

curl -i https://api.oktopost.com/v2/post -X POST \
    -d messageId=005000000000000 \
    -d credentialIds=003-001000000000000-12345678 \
    -d startDateTime=1401908598

Parameters

ParamDefaultDescription
messageId-Required. The message Id
credentialIds-Required. Comma separated values of social profile Ids
startDateTime+1 minuteUnix timestamp. Scheduled time for the post to go out
statuspendingOptions: pending, inqueue, draft, inqueue-draft

Update Post

Posts can only be updated or deleted before they're published. Once a post has been sent to a social network, it cannot be modified or removed through the API.

All parameters available on post creation can be updated as-well.

Example Request

curl -i https://api.oktopost.com/v1/post/004000000000000 -X POST \
    -d startDateTime=1435767841 \
    -d messageId=005000000000000

On success, both create and update actions will return a similar response to the GET endpoint.

Delete Post

Example Request

curl -i https://api.oktopost.com/v1/post/004000000000000 -X DELETE

Example Response

{  
    "Result":true
}

Properties

Sources

Post sources represent the channel used to create each post. Sources are used in Oktopost to analyze performance by channel.

SourceDescription
UIPosts created using the Oktopost application
APIPosts created using the API
AutoposterPosts created using the Autoposter
BookmarkletPosts created using the bookmarklet or browser extension
BoardPosts created using the Social Advocacy Board
EmbeddedPosts created from the embedded API

Statuses

The following statuses represent the different states of each post. They can be used for filtering results or for creating and updating posts.

StatusDescription
pendingScheduled post
inqueueQueued post
inqueue-draftDraft post in queue
draftDraft post
completeSent post
incompleteSent with errors
errorHas errors