Messages

Messages describe the content of a social post. The following endpoint allows to read, create, update and delete messages from Oktopost.

Get Message

Get data for a single message by Id.

Example Request

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

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":""
            }
        ]
    }
}

List Messages

List all messages in a single campaign.

Example Request

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

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
}

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.

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="http://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 isBoardMessage=1

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 isBoardMessage=1 \
-d media=026e5kltqedafpe

Link Attachments

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

Field Description
LinkUrl Link attachment Url
ImageUrl Link attachment image Url
LinkTitle Link attachment title
Description Link attachment description

Media Limits

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

Network Limit
Twitter 3
Facebook 1
Google Plus 1
LinkedIn N/A

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="http://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

Feedback and Knowledge Base