Create Content

Last Updated on : 2023-06-15 05:11:24

Create the image and text content or video content.

API address

POST: /v1.0/iot-03/app-contents

Request parameter

Description of body

Parameter name Type IN Required Description
title String true The title.
sub_title String false The sub-title.
lang String true The language.
main_pic String true The main image.
sub_pic String false The sub-image.
content String false The body of a specified article.
video_url String false The URL of the video.
type Integer true The type of the article. Valid values:
  • 1: images and text.
  • 2: video.
category_id String true The ID of a specified category.
publish Integer true Indicates whether the content is released. Valid values:
  • 1: released.
  • 2: saved.
operator String true The ID of a specified operator.
schema String true App schema

Return parameter

Parameter name Type Description
result Boolean The returned result.

Request example

POST: /v1.0/iot-03/app-contents
{ "schema": "3131", "title": "Great Discount on Smart Locks", "lang": "zh", "main_pic": "/suramar/content/1619002638fd391d975de.jpeg", "video_url": "/suramar/content/16196872089f000412038.mp4", "type": 2, "category_id": "1432271805678096432", "operator": "13", "publish": 1 }

Return example

{ "result": true, "t": 1630329550936, "success": true }

Error code

For more information, see error code.