Add Blog Post

From KickApps Documentation

Jump to: navigation, search

Blogs use a different data structure within the KIT Cloud Social platform and as a result the API uses a slightly different URI:

http://api.kickapps.com/rest/blog/save/add/{as}

We use “add” instead of “upload” because this call doesn’t include a media file upload – only textual data is being sent to the server.

Contents

Parameters

  • as. The affiliate site that the media will be associated with. Each affiliate site has a unique as.

Post Parameters

  • t. String. Required. Your access permissions.
  • callback. String. Optional. The name of your JavaScript callback function.
  • clientIP. String. Optional. Use the clientIP parameter to pass the IP address of the user making the call. If the IP has been blocked by the webmaster under the Affiliate Center -> Manage Members section, an error message will be returned starting with "status":"-1","error":"This IP address has been banned".
  • name. Required. The name for this media. Max length 125 characters.
  • description. Optional. The body text for the blog that is being added.
  • tags. One or more comma-separated keyword tags. Enclose multi-word tags inside quotations ("tag tag",tag). You can also add tags to an existing media item using the separate Add Tags call.

Each mediaId can have a maximum of 512 characters of associated tags, including the commas that separate each tag. Each tag must not be longer than 20 characters, not including the commas that separate each tag. Use URL-encoded space characters (%20) to create spaces between words. Tags cannot include special characters, only letters, numbers, and spaces.

  • adminTags. One or more comma-separated tags. You must be logged in as an administrator in order to add admin tags. Enclose multi-word tags inside quotations ("tag tag",tag). Each mediaId can have a maximum of 512 characters of associated tags, including the commas that separate each tag. Each tag must not be longer than 20 characters, not including the commas that separate each tag. Use URL-encoded space characters (%20) to create spaces between words. Tags cannot include special characters, only letters, numbers, and spaces.
  • category. Optional. Up to three levels of categories that members can use to find this media, written in the following format level1name/level2name/level3name. Level names should be preexisting categories for this site. An error will be returned if you try to add a category that does not already exist.
  • country. The member's country. The values in your upload form must exactly match those used by KIT Cloud Social.

If country is 1 for the United States of America, 2 for Canada, or 15 for Australia, the value for the Zip or Postal Code field will also be validated.

  • state. The abbreviation for the member's state. The value selected in the upload form will correspond to those shown on this page: Geographic Values for Media Uploads.
  • stateOrProvince. The abbreviation for the member's province. The value selected in the upload form will correspond to those shown on this page: Geographic Values for Media Uploads.
  • AusState. The abbreviation for the member's state. The value selected in the upload form will correspond to those shown on this page: Geographic Values for Media Uploads
  • otherStateOrProvince. The abbreviation for the member's state or province if country is not 1 for the United States of America, 2 for Canada, or 15 for Australia. Zip and postal codes are not validated for these values.
  • city. The member's city. The max character length for this field is 128 characters.
  • zipcode. The member's zip or postal code. The max character length for this field is 32 characters. If country is 1 for the United States of America, 2 for Canada, or 15 for Australia, the value for the Zip or Postal Code field will also be validated.
  • updatedAt. Optional. The date on which the media should be marked as modified. If its not passed the the time this call is made will be used. Format: mm/dd/yyyy hh:mm
  • createdAt. Optional. The date on which the media should be marked as created. If its not passed the the time this call is made will be used. Format: mm/dd/yyyy hh:mm
  • isPrivacyEnabled. True or False. True if the media is private. False if media is public.
  • isAddToMediaSetAllowed. True or False. True if other community members can add this media to their sets. False if other community members are not permitted to add this media to their sets.
  • allowPublicTagging. true or false. Whether members can tag this media.
  • allowPublicCommenting. true or false. Default is true. By default, form is set to true. Whether members can comment on this media.
  • status. Optional. active or pending. To bypass the moderation settings and post media as active i.e. available on site immidiately set the status to be "active. To add the media as pending for webmaster approval set status to be "pending". If no value is passed the media will be given a status based on the default moderation settings. This param can only be accessed by the webmaster or the editor.

Payload

On success, a return that begins with "status":1 and the mediaId of the blog that was added.

{"payload_type":"json","status":1,"error":"","mediaId":2573559}

List of Kit Cloud Social API Calls


Note: Occasionally (and without advanced warning) we modify our API calls by adding new parameters in the response payload. Please keep this in mind when designing your strategy for parsing our responses.