Post

To share your content, you need to use the following endpoints:


POST Method

/post/update

/post/updatewithimage        
        

POST /post/update

Create new text post updates.

Parameters

post_content require string The status update text
group_id optional integer A group id whose associated accounts will receive the status update. Invalid ids will be ignored.
account_id require array An array of social account ids that the status update should be sent to. Invalid ids will be ignored.
preview optional array

An array of preview variables

title optional string A preview title
url optional string An URL of the preview title
image optional string A preview image path
description optional string A short description for the preview
now optional boolean If now is set to true, this update will be sent immediately.
schedule_date optional Y-m-d H:i A (i.e. 2017-02-27 10:20 PM) A date describing when the update should be posted. Overrides now parameter.

Example Request

POST https://panel.socialpilot.co/oauth/post/update
            
POST DATA: 
group_id=4&
account_id[0]=484&
post_content=socialpilot.co is leading social marketing tool for all&
preview[title]=Automate Your Social Media Postings&
preview[url]=http://socialpilot.co&
preview[image]=http://socialpilot.co/themes/mainwebsite/assets/img/static-hero.png&
preview[description]=socialpilot.co helps you to engage your audience&
now=1&
schedule_date=2014-07-18 9:05 PM&
access_token=<YOUR ACCESS TOKEN>
            

Example Response

{
  "error": 0,
  "data": {
    "post_id": "48"
  }
}

Example Error Response

 {
  "error": 1,
  "msg": "<div class=\"errorSummary\">\n<ul>\n<li>Status Description cannot be blank.</li>\n</ul></div>"
}

POST /post/updatewithimage

Create new Image post updates.

Parameters

post_content require string The status update text
group_id optional integer A group id whose associated accounts will receive the status update. Invalid ids will be ignored.
account_id require array An array of social account ids that the status update should be sent to. Invalid ids will be ignored.
image_url require string Your image URL to share.
now optional boolean If now is set to true, this update will be sent immediately.
schedule_date optional Y-m-d H:i A (i.e. 2017-02-27 10:20 PM) A date describing when the update should be posted. Overrides now parameter.

Example Request

POST https://panel.socialpilot.co/oauth/post/updatewithimage
            
POST DATA: 
group_id=4&
account_id[0]=561&
account_id[1]=560&
post_content=Socialpilot helps you to engage your audience and generate new leads through automated postings&
image_url=http://socialpilot.co/themes/mainwebsite/assets/img/static-hero.png&
now=1&
schedule_date=&
access_token=<YOUR ACCESS TOKEN>

Example Response

{
  "error": 0,
  "data": {
    "post_id": "48"
  }
}

Example Error Response

 {
  "error": 1,
  "msg": "<div class=\"errorSummary\">\n<ul>\n<li>Image url cannot be blank.</li>\n</ul></div>"
}