{"__v":0,"_id":"579960b131a6ce200044d7bd","initVersion":{"_id":"543424cee532ff0800e18343","version":"1.0"},"project":"543424cee532ff0800e18340","user":{"_id":"543424a8e532ff0800e1833b","username":"","name":"Neville Samuell"},"hidden":false,"createdAt":"2016-07-28T01:32:33.939Z","fullscreen":false,"htmlmode":false,"html":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Events\"\n}\n[/block]\nThe below events currently support webhooks. You can configure a unique webhook URL per event or can subscribe to multiple events with a single webhook URL - it's your choice!\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"conversation_create\",\n    \"1-0\": \"conversation_update\",\n    \"2-0\": \"conversation_delete\",\n    \"3-0\": \"comment_create\",\n    \"4-0\": \"comment_update\",\n    \"5-0\": \"comment_delete\",\n    \"6-0\": \"gathering_create\",\n    \"7-0\": \"gathering_update\",\n    \"8-0\": \"gathering_delete\",\n    \"9-0\": \"gathering_user_create\",\n    \"10-0\": \"gathering_user_update\",\n    \"11-0\": \"gathering_user_delete\",\n    \"0-1\": \"Any time a [Conversation](doc:conversations) is created in a gathering.\",\n    \"1-1\": \"Any time a [Conversation](doc:conversations) is updated.\",\n    \"2-1\": \"Any time a [Conversation](doc:conversations) is deleted.\",\n    \"3-1\": \"Any time a [Comment](doc:comments) is created.\",\n    \"4-1\": \"Any time a [Comment](doc:comments) is updated.\",\n    \"5-1\": \"Any time a [Comment](doc:comments) is deleted.\",\n    \"6-1\": \"Any time a [Gathering](doc:gatherings) is created.\",\n    \"7-1\": \"Any time a [Gathering](doc:gatherings) is updated.\",\n    \"8-1\": \"Any time a [Gathering](doc:gatherings) is deleted.\",\n    \"9-1\": \"Any time a [Gathering User](doc:gathering-users) is created.\",\n    \"10-1\": \"Any time a [Gathering User](doc:gathering-users) is updated.\",\n    \"11-1\": \"Any time a [Gathering User](doc:gathering-users) is deleted.\",\n    \"12-0\": \"path_create\",\n    \"12-1\": \"Any time a [Path](doc:paths) is created\",\n    \"13-0\": \"path_update\",\n    \"13-1\": \"Any time a [Path](doc:paths) is updated\",\n    \"14-0\": \"path_delete\",\n    \"14-1\": \"Any time a [Path](doc:paths) is deleted\",\n    \"15-0\": \"content_create\",\n    \"15-1\": \"Any time [Content](doc:content) is created. Note that content webhooks do not apply to content created from an integration (e.g. the LMS)\",\n    \"16-0\": \"content_update\",\n    \"16-1\": \"Any time [Content](doc:content) is updated.\",\n    \"17-0\": \"content_delete\",\n    \"17-1\": \"Any time [Content](doc:content) is deleted.\"\n  },\n  \"cols\": 2,\n  \"rows\": 18\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Payload\"\n}\n[/block]\nEach event will send a payload that follows a consistent format. That format is as follows:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  action: 'name of the event, which is listed above',\\n  payload: {\\n    // NOTE: 'root' will be replaced with type of data sent. This root is always the name of the event minus the 'action' (e.g. 'create', 'update', 'delete'). So, let's say the event is the 'gathering_create' event. That means the root would be 'gathering'.\\n    root: {\\n      // The documented API format of each object, which is linked to above in each event description\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nAs an example, let's say the event is the 'gathering_user_created' event. The payload sent to your webhook URL would look something like this, using the format of the [GatheringUser object documented](doc:gathering-users).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  action: 'gathering_user_created',\\n  payload: {\\n    gathering_user: {\\n      \\\"_type\\\": \\\"GatheringUser\\\",\\n      \\\"created_at\\\": \\\"2015-08-23T23:29:58.391-04:00\\\",\\n      \\\"gathering\\\": {\\n        \\\"_type\\\": \\\"Gathering\\\",\\n        \\\"closed\\\": true,\\n        \\\"conversations_count\\\": 0,\\n        \\\"courses_count\\\": 2,\\n        \\\"custom_id\\\": null,\\n        \\\"description\\\": \\\"This gathering is all about charts!\\\",\\n        \\\"id\\\": \\\"5309e41b-db4f-466e-8184-ac61897ac8ba\\\",\\n        \\\"image\\\": \\\"https://www.example-gathering-user.com/image.png\\\",\\n        \\\"name\\\": \\\"Chart Gathering\\\",\\n        \\\"paths_count\\\": 1,\\n        \\\"users_count\\\": 1\\n      },\\n      \\\"id\\\": \\\"9de9e421-3738-4cb9-98b5-5f7bfeb9bc92\\\",\\n      \\\"is_admin\\\": true,\\n      \\\"user\\\": {\\n        \\\"_type\\\": \\\"User\\\",\\n        \\\"admin\\\": true,\\n        \\\"created_at\\\": \\\"2014-04-26T12:51:29.407-04:00\\\",\\n        \\\"custom_id\\\": null,\\n        \\\"deactivated\\\": false,\\n        \\\"email\\\": \\\"jamie@pathgather.com\\\",\\n        \\\"first_name\\\": \\\"Jamie\\\",\\n        \\\"hire_date\\\": \\\"2013-03-13\\\",\\n        \\\"id\\\": \\\"4cea0449-666a-433f-8396-857e269449a9\\\",\\n        \\\"job_title\\\": \\\"CTO\\\",\\n        \\\"last_active_at\\\": \\\"2015-08-30\\\",\\n        \\\"last_name\\\": \\\"Davidson\\\",\\n        \\\"location\\\": \\\"New York, NY\\\",\\n        \\\"updated_at\\\": \\\"2015-08-30T18:10:43.848-04:00\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","slug":"webhooks","title":"Webhooks"}

Webhooks


[block:api-header] { "type": "basic", "title": "Events" } [/block] The below events currently support webhooks. You can configure a unique webhook URL per event or can subscribe to multiple events with a single webhook URL - it's your choice! [block:parameters] { "data": { "h-0": "Name", "h-1": "Description", "0-0": "conversation_create", "1-0": "conversation_update", "2-0": "conversation_delete", "3-0": "comment_create", "4-0": "comment_update", "5-0": "comment_delete", "6-0": "gathering_create", "7-0": "gathering_update", "8-0": "gathering_delete", "9-0": "gathering_user_create", "10-0": "gathering_user_update", "11-0": "gathering_user_delete", "0-1": "Any time a [Conversation](doc:conversations) is created in a gathering.", "1-1": "Any time a [Conversation](doc:conversations) is updated.", "2-1": "Any time a [Conversation](doc:conversations) is deleted.", "3-1": "Any time a [Comment](doc:comments) is created.", "4-1": "Any time a [Comment](doc:comments) is updated.", "5-1": "Any time a [Comment](doc:comments) is deleted.", "6-1": "Any time a [Gathering](doc:gatherings) is created.", "7-1": "Any time a [Gathering](doc:gatherings) is updated.", "8-1": "Any time a [Gathering](doc:gatherings) is deleted.", "9-1": "Any time a [Gathering User](doc:gathering-users) is created.", "10-1": "Any time a [Gathering User](doc:gathering-users) is updated.", "11-1": "Any time a [Gathering User](doc:gathering-users) is deleted.", "12-0": "path_create", "12-1": "Any time a [Path](doc:paths) is created", "13-0": "path_update", "13-1": "Any time a [Path](doc:paths) is updated", "14-0": "path_delete", "14-1": "Any time a [Path](doc:paths) is deleted", "15-0": "content_create", "15-1": "Any time [Content](doc:content) is created. Note that content webhooks do not apply to content created from an integration (e.g. the LMS)", "16-0": "content_update", "16-1": "Any time [Content](doc:content) is updated.", "17-0": "content_delete", "17-1": "Any time [Content](doc:content) is deleted." }, "cols": 2, "rows": 18 } [/block] [block:api-header] { "type": "basic", "title": "Payload" } [/block] Each event will send a payload that follows a consistent format. That format is as follows: [block:code] { "codes": [ { "code": "{\n action: 'name of the event, which is listed above',\n payload: {\n // NOTE: 'root' will be replaced with type of data sent. This root is always the name of the event minus the 'action' (e.g. 'create', 'update', 'delete'). So, let's say the event is the 'gathering_create' event. That means the root would be 'gathering'.\n root: {\n // The documented API format of each object, which is linked to above in each event description\n }\n }\n}", "language": "json" } ] } [/block] As an example, let's say the event is the 'gathering_user_created' event. The payload sent to your webhook URL would look something like this, using the format of the [GatheringUser object documented](doc:gathering-users). [block:code] { "codes": [ { "code": "{\n action: 'gathering_user_created',\n payload: {\n gathering_user: {\n \"_type\": \"GatheringUser\",\n \"created_at\": \"2015-08-23T23:29:58.391-04:00\",\n \"gathering\": {\n \"_type\": \"Gathering\",\n \"closed\": true,\n \"conversations_count\": 0,\n \"courses_count\": 2,\n \"custom_id\": null,\n \"description\": \"This gathering is all about charts!\",\n \"id\": \"5309e41b-db4f-466e-8184-ac61897ac8ba\",\n \"image\": \"https://www.example-gathering-user.com/image.png\",\n \"name\": \"Chart Gathering\",\n \"paths_count\": 1,\n \"users_count\": 1\n },\n \"id\": \"9de9e421-3738-4cb9-98b5-5f7bfeb9bc92\",\n \"is_admin\": true,\n \"user\": {\n \"_type\": \"User\",\n \"admin\": true,\n \"created_at\": \"2014-04-26T12:51:29.407-04:00\",\n \"custom_id\": null,\n \"deactivated\": false,\n \"email\": \"jamie@pathgather.com\",\n \"first_name\": \"Jamie\",\n \"hire_date\": \"2013-03-13\",\n \"id\": \"4cea0449-666a-433f-8396-857e269449a9\",\n \"job_title\": \"CTO\",\n \"last_active_at\": \"2015-08-30\",\n \"last_name\": \"Davidson\",\n \"location\": \"New York, NY\",\n \"updated_at\": \"2015-08-30T18:10:43.848-04:00\"\n }\n }\n }\n}", "language": "json" } ] } [/block]