Calendar
View and manage your social media content calendar with scheduled posts and publishing timeline.
The Calendar endpoint provides access to your social media calendar, allowing you to retrieve scheduled posts, view publishing timelines, and manage your content schedule across all connected social networks and campaigns.
Get Calendar
Retrieve every post in a date window, with its campaigns, profiles, messages, and postlogs.
POST /v2/calendar
One request returns every post in the date window. The response is not paginated. fromDate and toDate cannot span more than 60 days. A longer range fails with Time period should not exceed 60 days. Each message in Messages includes the full Message body.
Postlogs lists one entry per profile the post was sent to. Each entry has Id, CredentialId, PostId, MessageId, Status, RemoteUrl, and PublishedDate. It does not include RemoteId. To read the network post ID, use one of:
- List by Post ID:
GET /v2/postlog?postId= - List Posts with
withPostlogs=1:Postlogsis embedded on each item - Get Post with
postlogs=1:Postlogsis returned besidePost
Parameters
Prop
Type
The following fields can be used to build the filters object in your request.
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/calendar" \
-u ACCOUNT_ID:API_KEY \
-d fromDate=2018-02-01 \
-d toDate=2018-02-20With filters:
curl -X POST "https://api.oktopost.com/v2/calendar" \
-u ACCOUNT_ID:API_KEY \
-d fromDate=2018-02-01 \
-d toDate=2018-02-20 \
-d 'filters={"campaigns": ["002000000000001"]}'Example Response
{
"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",
"ApproveStatus": "Approved",
"TotalCount": 1
}
},
"Postlogs": [
{
"Id": "007000000000001",
"CredentialId": "003-001000000000001-1234",
"PostId": "004000000000001",
"MessageId": "005000000000001",
"Status": "success",
"RemoteUrl": "https://www.facebook.com/1234/posts/xxxx",
"PublishedDate": "2018-02-19 08:03:00"
}
],
"FirstComments": [],
"CommentLogs": [],
"CustomEvents": [],
"Result": true
}Entries in CustomEvents use the custom event format, with an ID key. Every other object uses Id.
Custom Calendar Events
Custom events allow you to add non-holiday events to the calendar, including campaign milestones, meetings, product launches, deadlines, and reminders.
Custom event responses omit empty fields. For example, an event with no description has no Description key, and an event with no campaigns has no Campaigns key.
Get Custom Calendar Event
Retrieve a single custom calendar event.
GET /v2/calendar/custom-events
A 404 error is returned when the event does not exist or the authenticated user does not have access to it.
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/calendar/custom-events?id=0CE000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Item": {
"ID": "0CE000000000001",
"Title": "Product launch",
"Description": "Launch the new product website.",
"Color": "#3492bf",
"StartDateTime": "2026-08-10 12:00:00",
"EndDateTime": "2026-08-10 13:00:00",
"Campaigns": [
{
"Id": "002000000000001",
"Name": "Product Launch",
"Url": "https://www.example.com/launch",
"Color": "#3492bf",
"Status": "active"
}
]
}
}Get Custom Calendar Events
List the custom calendar events that are visible to the authenticated user.
GET /v2/calendar/custom-events
When no campaign IDs are provided, all events available to the authenticated user are returned.
Parameters
Prop
Type
See Pagination for shared behavior.
Example Request
curl -X GET -G "https://api.oktopost.com/v2/calendar/custom-events" \
-u ACCOUNT_ID:API_KEY \
--data-urlencode after=1785542400 \
--data-urlencode before=1788220799 \
--data-urlencode "campaignIds[]=002000000000001" \
--data-urlencode _page=0 \
--data-urlencode _count=25 \
--data-urlencode _order=startDateTimeBy event IDs:
curl -X GET -G "https://api.oktopost.com/v2/calendar/custom-events" \
-u ACCOUNT_ID:API_KEY \
--data-urlencode "ids[]=0CE000000000001" \
--data-urlencode "ids[]=0CE000000000002"Example Response
{
"Result": true,
"Total": 2,
"Items": {
"0CE000000000001": {
"ID": "0CE000000000001",
"Title": "Product launch",
"Description": "Launch the new product website.",
"Color": "#3492bf",
"StartDateTime": "2026-08-10 12:00:00",
"EndDateTime": "2026-08-10 13:00:00",
"Campaigns": [
{
"Id": "002000000000001",
"Name": "Product Launch",
"Url": "https://www.example.com/launch",
"Color": "#3492bf",
"Status": "active"
}
]
},
"0CE000000000002": {
"ID": "0CE000000000002",
"Title": "Campaign review",
"Description": "Review the first week of campaign performance.",
"Color": "#9b59b6",
"StartDateTime": "2026-08-17 10:00:00",
"EndDateTime": "2026-08-17 11:00:00",
"Campaigns": [
{
"Id": "002000000000001",
"Name": "Product Launch",
"Url": "https://www.example.com/launch",
"Color": "#3492bf",
"Status": "active"
}
]
}
}
}Items is an object keyed by event ID, in the requested order. When no events match, Items is an empty array ([]).
Add Custom Calendar Event
Create a custom calendar event.
POST /v2/calendar/custom-events
When endDate is not provided, a single-day event is created.
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/calendar/custom-events" \
-u ACCOUNT_ID:API_KEY \
-d title="Product launch" \
-d description="Launch the new product website." \
-d startDate=1786352400 \
-d endDate=1786356000 \
-d "campaignIds[]=002000000000001"Example Response
{
"Result": true,
"Item": {
"ID": "0CE000000000001",
"Title": "Product launch",
"Description": "Launch the new product website.",
"Color": "#3492bf",
"StartDateTime": "2026-08-10 12:00:00",
"EndDateTime": "2026-08-10 13:00:00",
"Campaigns": [
{
"Id": "002000000000001",
"Name": "Product Launch",
"Url": "https://www.example.com/launch",
"Color": "#3492bf",
"Status": "active"
}
]
}
}Edit Custom Calendar Event
Update an existing custom calendar event.
PUT /v2/calendar/custom-events
Only the id parameter is required. Properties that are not included in the request retain their existing values.
Parameters
Prop
Type
Example Request
curl -X PUT "https://api.oktopost.com/v2/calendar/custom-events" \
-u ACCOUNT_ID:API_KEY \
-d id="0CE000000000001" \
-d title="Updated product launch" \
-d endDate=1786356000 \
-d "campaignIds[]=002000000000001"Example Response
{
"Result": true,
"Item": {
"ID": "0CE000000000001",
"Title": "Updated product launch",
"Description": "Launch the new product website.",
"Color": "#3492bf",
"StartDateTime": "2026-08-10 12:00:00",
"EndDateTime": "2026-08-10 13:00:00",
"Campaigns": [
{
"Id": "002000000000001",
"Name": "Product Launch",
"Url": "https://www.example.com/launch",
"Color": "#3492bf",
"Status": "active"
}
]
}
}Delete Custom Calendar Event
Delete a custom calendar event.
DELETE /v2/calendar/custom-events
A 404 error is returned when the event does not exist. A 403 error is returned when the authenticated user does not have permission to delete the event.
Parameters
Prop
Type
Example Request
curl -X DELETE "https://api.oktopost.com/v2/calendar/custom-events" \
-u ACCOUNT_ID:API_KEY \
-d id="0CE000000000001"Example Response
{
"Result": true
}