Skip to content

Create a Comment

Terminal window
https://mapi.storyblok.com/v1/spaces/:space_id/discussions/:discussion_id/comments

This endpoint allows the creation of a comment in a particular discussion using the ID.

  • :space_id required number

    Numeric ID of a space

  • :discussion_id required number

    The ID of the discussion

  • comment The Comments Object

    The comments object

    Show The Comments Object child properties
    • message null | string

      The message of a comment, with the datatype of null or a string.

    • message_json required object

      The message_json property is an array containing JSON objects representing the comments’ messages.

      Show message_json object child properties
      • text string

        The text part

      • type string

        The type

      • attrs object

        Attributes

curl "https://mapi.storyblok.com/v1/spaces/606/discussions/456/comments" \
-X POST \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"comment\":{\"message_json\":[{\"text\":\"Hello new comment\",\"type\":\"text\"}]}}"