Creates a new topic.

Resource url

https://yourproject.userecho.com/api/v2/forums/[forum_id]/topics.json

Parameters

Parameter Value Required? Default Options Description
header String yes Topic header
description String no Topic's description
type Integer yes Get available types with GET forums/[forum_id]/types Topic's type
category Integer no (yes if set in forum's settings) Get available categories with GET forums/[forum_id]/categories Topic's category
tags List of integer no Get available tags with GET forums/[forum_id]/tags Topic's tags
show_voter Boolean no true true,false Display voter
custom_fields no Example: "custom_fields":{"cf_1":"test", "cf_2":5} Save custom fields value
needs_review Boolean no auto true,false Set "needs_review" status to the topic

Request example #1

    { "header" : "Test topic", "type":1 }
  

Request example #2

    { "header" : "Test topic", "description" : "Test topic description", "type":1, "category":1, "tags":[1, 2, 3], "show_voter": true }
  

Request example #3

    { "id" : 1, "header" : "Test topic", "custom_fields":{"cf_1":"test", "cf_2":10} }
  

Response example

    { "status": "success", "data": { "status": { "color": "999999", "updated": "2014-03-17T03:38:35.696Z", "id": 1, "name": "" }, "updated": "2014-03-17T03:38:35.696Z", "description": "

Test topic description

", "tags": [], "created": "2014-03-17T03:38:35.696Z", "header": "Test topic", "comment_count": 0, "author": { "avatar_url": "https://secure.gravatar.com/avatar/f70e785b1cb1a52832e763df9ddf8e0c?default=https%3A%2F%2Fcdn.userecho.com%2Fimages%2Fno_avatar_48.jpg&s=48", "id": 1, "name": "Vladimir Mullagaliyev", "title": "" }, "vote": { "diff": 0, "positive": 0, "total": 0, "negative": 0, "current_user": 0 }, "type": { "id": 1, "name": "Ideas" }, "id": 7874, "custom_fields": [ { "code_name": "cf_1", "id": 1, "value": "", "name": "test" }, { "code_name": "cf_9", "id": 9, "value": "", "name": "test date" } ] } }
© 2024 Stamul, LLC. All rights reserved.