Update topic.

Resource url

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

Parameters

Parameter Value Required? Options Description
id Integer yes Topic ID
header String no Topic header
description String no Topic's description
type Integer no Get available types with GET forums/[forum_id]/types Topic's type
category Integer no 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 Display voter
custom_fields no Example: "custom_fields":{"cf_1":"test", "cf_2":5} Save custom fields value
assigned_to Integer no Pass Agent ID as param

If any parameter will not passed, it will be not changed. To clear value, just send null for Integer, "" for String, [] for list.

Request example #1

{
    "id" : 1,
    "header" : "Test topic - replaced"
}

Request example #2

{
    "id" : 1,
    "header" : "Test topic - replaced",
    "description" : "Test topic description",
    "type":3,
    "category":1,
    "tags":[1, 2, 3],
    "show_voter": false
}

Request example #3

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

Request example #4

{
    "id" : 1,
    "header" : "Test topic - replaced",
    "description" : "Test topic description",
    "type":3,
    "category":null,
    "tags":[]
}

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