I. Introduction 

The WebHook allows to receive, for a specific event, a HTTP POST request on a configured URL. This request is always composed by an "action" field that defines the event. 

New posts are identified with the value feed_item_new in the request action field. It includes the feed_item (post) object composed by several fields and objects (references, author, newsfeed).  Publication changes are identified by an action feed_item_edit and include all some fields than for the creation. Deletions are identified by feed_item_delete and include only the post identifier.

New comments are identified with the value comment_new in the request action field. It includes the comment object composed by several fields and objects (references, author, newsfeed). Comment changes are identified by an action comment_edit and include all some fields than for the creation. Deletions are identified by comment_delete and include only the comment identifier.

Please read below all object's details. 

II. Object: feed_item (post)

Object name: feed_item 

III. Object: comment

Object name: comment

IV. Object: references 

Object name: references

V. Object: author (auteur) 

Object name: author

VI. Object: newsfeed

Object name: newsfeed

VII. Examples Json

  1. New post

{
  "action": "feed_item_new",
  "feed_item": {
    "id": 34,
    "type": "post",
    "body": "Hello\nGood morning!"
    "date": "2018-07-12T15:19:21+00:00",
    "from_mobile": false,
    "url": “https://incenteev.my.incenteev.com/spaces/1/news-feed/34”,
    "references": [
      {
        "type": "image",
        "url": "https://incenteev.my.incenteev.com/spaces/515/files/78980",
        "thumbnail": "https://incenteev-uploads.s3.amazonaws.com/media/1/image-b40e766116916873c91252426ce08fbf.png"
      },
      {
        "type": "video",
        "url": "https://incenteev.my.incenteev.com/spaces/515/files/77721",
        "thumbnail": "https://incenteev-uploads.s3.amazonaws.com/media/1/f200e1e377c0c9bedc30b8436f10e47b.jpg"
      }
    ],
    "author": {
      "id": 2,
      "email": "test@company.com",
      "name": "Jean Test"
      "first_name": "Jean",
      "last_name": "Test",
      "profile_picture": "https://incenteev-uploads.s3.amazonaws.com/media/1/295285f8125f83b6bd53abded7b0a91d."
    },
    "newsfeed": {
      "id": 1,
      "name": "Discussions"
    }
  }

      2. New comment

{
  "action": "comment_new",
  "comment": {
    "id": 87,
    "body": "Good morning to you :)",
    "date": "2018-07-13T04:42:14+00:00",
    "from_mobile": true,
    "references": [],
    "author": {
      "id": 2,
      "email": "boss@company.com",
      "name": "Steve Boss",
      "first_name": "Steve",
      "last_name": "Boss",
      "profile_picture": "https://www.gravatar.com/avatar/1d86067b5ea4a0f4b832ea73cdb07e42?d=identicon&s=200"
    },
    "feed_item": {
      "id": 34,
      "url": "https://incenteev.my.incenteev.com/spaces/1/news-feed/34"
    }
  }
}

Avez-vous trouvé votre réponse?