Create Topic

Overview

  • This API allows users to create a new topic under the given parent topic ID.
  • If the parent topic ID is not given, new topic is created as top level topic under the given department ID.

Permissions

  • The user must have 'Create' action on 'Topic' resource.
  • The user sending the request should be from the same or shared department as the topic.

Preconditions

  • Parent topic ID, department ID and language ID supplied in the request body must be valid and must exist.
  • The language of topic creation supplied in the request body must be assigned to the user.
  • Parent topic must not be Auto Generated Topic.
  • If both Parent topic ID and Department ID are provided in the request body then Parent topic ID must belong to the provided department.
SecurityoAuthUser
Request
Request Body schema: application/json
object (department)
object (parentTopic)
name
required
string (name) [ 1 .. 255 ] characters
required
object (language)
description
string (description) [ 1 .. 255 ] characters
imageUrl
string (imageUrl)
isTranslatable
boolean (isTranslatable)
autoGenerated
boolean (autoGenerated)
object (articleForTopicHomeContent)
object (CustomAttributes)
Responses
201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

406

Not acceptable

409

Conflict

412

Preconditions failed

500

Internal server error

post/topics
Request samples
application/json
{
  • "name": "New Topic",
  • "language": {
    },
  • "department": {
    }
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}