Create a chat topic (manager)

POST /manager/chat-topics
application/json

Body Required

  • active boolean
  • position integer(int32)
  • color string
  • contents array[object]
    Hide contents attributes Show contents attributes object
    • lang string

      Values are en_GB, fr_FR, es_ES, or de_DE.

    • content string

Responses

  • 201 application/json

    returns the created chat topic

    Hide response attributes Show response attributes object
    • id_chat_topic integer
    • color string
    • contents array[object]
      Hide contents attributes Show contents attributes object
      • id_i18n_content integer
      • lang string

        Values are en_GB, fr_FR, es_ES, or de_DE.

      • content string
    • position integer
    • date_insert string(date-time)
    • roles array[string]
    • date_update string(date-time)
    • active boolean
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

POST /manager/chat-topics
curl \
 --request POST 'https://domain.tld/api/v2/manager/chat-topics' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"active":true,"position":42,"color":"string","contents":[{"lang":"en_GB","content":"Hello"}]}'
Request examples
{
  "active": true,
  "position": 42,
  "color": "string",
  "contents": [
    {
      "lang": "en_GB",
      "content": "Hello"
    }
  ]
}
Response examples (201)
{
  "id_chat_topic": 8,
  "color": "#FF0000",
  "contents": [
    {
      "id_i18n_content": 42,
      "lang": "en_GB",
      "content": "Hello"
    }
  ],
  "position": 1,
  "date_insert": "2021-06-01T00:00:00Z",
  "roles": [
    "administrator",
    "seller"
  ],
  "date_update": "2022-06-01T00:00:00Z",
  "active": true
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}