Oktopost
Publishing

Messages

Create and manage reusable content templates that can be scheduled as posts across your social networks.

A message is a reusable content template that includes text, links, and media attachments. Messages serve as the foundation for social media posts—each message can be scheduled multiple times across different social profiles and dates. Use these endpoints to create content templates, manage your message library, and prepare content for scheduling.

A single message can be used to create multiple posts, making it easy to share the same content across different profiles or time periods.

Get Message

Get data for a single message by Id.

Parameters

ParamDefaultDescription
withTags0Includes the message tags in the response.

Example Request

curl -i https://api.oktopost.com/v2/message/005000000000000?withTags=1

Example Result

{  
    "Result":true,
    "Message":{  
        "Id":"005000000000000",
        "Created":"2015-09-17 15:04:57",
        "Modified":"2015-09-17 15:04:57",
        "Status":"default",
        "AccountId":"001000000000000",
        "CreatedBy":"00A000000000000",
        "ModifiedBy":"00A000000000000",
        "CampaignId":"002000000000000",
        "Network":"Twitter",
        "Subject":"",
        "Message":"Using Animated GIFs on Twitter http:\/\/www.oktopost.com\/blog\/using-animated-gifs-twitter\/",
        "Md5":"4aeb3671d71f96f3b9bc3b056f41d6ab",
        "ImageUrl":"",
        "Description":"",
        "LinkTitle":"",
        "LinkUrl":"",
        "Url":"",
        "Clicks":1,
        "ChildClicks":0,
        "BoardClicks":0,
        "Converts":1,
        "ChildConverts":0,
        "BoardConverts":0,
        "ChildrenCount":0,
        "Picture":"1",
        "IsBoardMessage":0,
        "Media":[  
            {  
                "Id":"026000000000000",
                "Created":"2015-09-17 15:04:56",
                "Modified":"2015-09-17 15:04:57",
                "AccountId":"001000000000000",
                "Status":"valid",
                "CreatedBy":"00A000000000000",
                "ModifiedBy":"00A000000000000",
                "Type":"Image",
                "Size":190625,
                "Resource":"https:\/\/s3.amazonaws.com\/com-oktopost-app-message-pictures\/afbeb62d-64fe-4bcd-aea7-1fa1bf42e88a\/TwitGif_L.gif",
                "Name":"TwitGif_L.gif",
                "Description":""
            }
        ],
        "Tags": 
        [
            "pr",
            "smms"
        ]
    }
}

List Messages

List all messages in a single campaign.

Parameters

ParamDefaultDescription
campaignId-Mandatory field if not provided ids. The Oktopost campaign Id.
withTags0Includes the message tags in the response.
network-Filters by the social network: Twitter, LinkedIn, Facebook, Instagram, YouTube, WeChat, or Xing.
ids-Mandatory field if not provided campaignId. Coma separated list of Oktopost message ids, max 100.

Example Result

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"005000000000000",
            "Created":"2015-09-17 15:04:57",
            "Modified":"2015-09-17 15:04:57",
            "Status":"default",
            "AccountId":"001000000000000",
            "CreatedBy":"00A000000000000",
            "ModifiedBy":"00A000000000000",
            "CampaignId":"002000000000000",
            "Network":"Twitter",
            "Subject":"",
            "Message":"Using Animated GIFs on Twitter http:\/\/www.oktopost.com\/blog\/using-animated-gifs-twitter\/",
            "Md5":"4aeb3671d71f96f3b9bc3b056f41d6ab",
            "ImageUrl":"",
            "Description":"",
            "LinkTitle":"",
            "LinkUrl":"",
            "Url":"",
            "Clicks":1,
            "ChildClicks":0,
            "BoardClicks":0,
            "Converts":1,
            "ChildConverts":0,
            "BoardConverts":0,
            "ChildrenCount":0,
            "Picture":"1",
            "IsBoardMessage":0
        }
    ],
    "Total":1
}

Example Request

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

Create Message

Create a new message asset. Each message can have either a link attachment or a media assets attached. Media assets can be created using the Media endpoint.

Parameters

ParamDescription
networkFacebook, Twitter, LinkedIn, Youtube, or Instagram.
campaignIdThe campaign Id for the message.
messageThe messages' content.
linkUrlOptional. See Link Attachment Fields below.
linkTitleOptional. See Link Attachment Fields below.
descriptionOptional. See Link Attachment Fields below.
imageUrlOptional. See Link Attachment Fields below.
tagIdsOptional. A list of comma separated tag Ids. If empty, the message will inherit tags from the campaign.
mediaOptional. The media attachment Id.
titleOptional. The title for YouTube videos.

Example Requests

Create a message with a link attachment.

curl -i https://api.oktopost.com/v2/message -X POST \
    -d network=Facebook \
    -d campaignId=002000000000000 \
    -d linkUrl="https://www.oktopost.com" \
    -d linkTitle="Social Media Management for B2B" \
    -d description="Oktopost is a social media management software designed to publish social messages, converse with prospects and generate leads" \
    -d imageUrl="https://www.oktopost.com/assets/img/oktopost-og.png" \
    -d message="Oktopost Rocks" \    
    -d tagIds=0AF000000000001,0AF000000000002

Create a message with a media attachment.

curl -i https://api.oktopost.com/v2/message -X POST \
    -d network=Facebook \
    -d campaignId=00250yY80DW7Fz3 \
    -d message="Oktopost Rocks" \    
    -d media=026e5kltqedafpe

Create a message for YouTube.

curl -i https://api.oktopost.com/v2/message -X POST \
    -d network=Youtube \
    -d campaignId=00250yY80DW7Fz3 \
    -d message="YouTube video description" \ 
    -d media="026e5kltqedafpe" \
    -d title="YouTube video title"

To create or update link attachments the following 4 fields are mandatory.

FieldDescription
LinkUrlLink attachment Url
ImageUrlLink attachment image Url
LinkTitleLink attachment title
DescriptionLink attachment description

Media Limits

The following limits are for the amount of Media assets that can be attached for a single message.

NetworkLimit
Twitter4
Facebook18
Instagram10
LinkedIn9

Update Message

Update a single message by Id.

Example Request

curl -i https://api.oktopost.com/v2/message/005000000000000 -X POST \
    -d message="Hello World"
    -d linkUrl="https://www.oktopost.com" \
    -d linkTitle="Social Media Management for B2B" \
    -d description="Oktopost is a social media management software designed to publish social messages, converse with prospects and generate leads" \
    -d imageUrl="https://www.oktopost.com/assets/img/oktopost-og.png" \

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

Delete Message

Example Request

curl -i https://api.oktopost.com/v2/message/005000000000000 -X DELETE