Create a predefined message (manager)

POST /manager/predefined-messages
application/json

Body

Responses

  • 201 application/json

    returns the created predefined message

    Hide response attributes Show response attributes object
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
  • 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/predefined-messages
curl \
 -X POST https://domain.tld/api/v2/manager/predefined-messages \
 -H "Content-Type: application/json" \
 -d '{"contents":[{"lang":"en_GB","content":"Hello"}],"position":1,"active":true}'
Request examples
{
  "contents": [
    {
      "lang": "en_GB",
      "content": "Hello"
    }
  ],
  "position": 1,
  "active": true
}
Response examples (201)
{
  "id_predefined_message": 1,
  "contents": [
    {
      "id_i18n_content": 42,
      "lang": "en_GB",
      "content": "Hello"
    }
  ],
  "position": 1,
  "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"
    ]
  }
}