Создает новый топик.

URL ресурса

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

Параметры

Параметр Значение Обязательный? По умолчанию Опции Описание
header String yes Заголовок топика
description String no Описание темы
type Integer yes Get available types with GET forums/[forum_id]/types Тип темы
category Integer no (yes if set in forum's settings) Get available categories with GET forums/[forum_id]/categories Категория темы
tags List of integer no Get available tags with GET forums/[forum_id]/tags Теги темы
show_voter Boolean no true true,false Показывать голосование
custom_fields no Example: "custom_fields":{"cf_1":"test", "cf_2":5} Save custom fields value
needs_review Boolean no auto true,false Установить "требует внимания" статус к теме

Пример запроса #1

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

Пример запроса #2

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

Пример запроса #3

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

Пример ответа

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