{"action":"created","comment":{"url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/comments/97881525","pull_request_review_id":18505975,"id":97881525,"diff_hunk":"@@ -0,0 +1,28 @@\n+## Department deleted\n+\n+This web hook fires when departments are deleted from the Greenhouse system from the Configure &raquo; Organization screen. This only happens when the \"Remove\" button is clicked after clicking the \"X\" next to an office name. This will not fire individually when an organization is deleted.\n+\n+```json\n+{\n+  \"action\": \"department_deleted\",\n+  \"payload\": {\n+    \"department\": {\n+      \"id\": 106,\n+      \"name\": \"Creative\",\n+      \"child_ids\": [\n+        23328\n+      ],\n+      \"parent_id\": 5\n+    }\n+  }\n+}\n+```\n+\n+### Noteworthy response attributes\n+\n+| Attribute | Note |\n+|------------|--------|\n+| `id` | The Greenhouse id for the department |\n+| `name` | The name of the department deleted |\n+| `child_ids` | Any former child department ids |","path":"source/includes/webhooks/_department_deleted.md","position":27,"original_position":27,"commit_id":"f3d9917bdf2b2f87126aba08e21bebc8cba25b7c","original_commit_id":"f3d9917bdf2b2f87126aba08e21bebc8cba25b7c","user":{"login":"tdphillipsjr","id":2415411,"avatar_url":"https://avatars.githubusercontent.com/u/2415411?v=3","gravatar_id":"","url":"https://api.github.com/users/tdphillipsjr","html_url":"https://github.com/tdphillipsjr","followers_url":"https://api.github.com/users/tdphillipsjr/followers","following_url":"https://api.github.com/users/tdphillipsjr/following{/other_user}","gists_url":"https://api.github.com/users/tdphillipsjr/gists{/gist_id}","starred_url":"https://api.github.com/users/tdphillipsjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdphillipsjr/subscriptions","organizations_url":"https://api.github.com/users/tdphillipsjr/orgs","repos_url":"https://api.github.com/users/tdphillipsjr/repos","events_url":"https://api.github.com/users/tdphillipsjr/events{/privacy}","received_events_url":"https://api.github.com/users/tdphillipsjr/received_events","type":"User","site_admin":false},"body":"I'd clarify this includes all descendants, including grandchildren, etc.  Also, what this looks like if there are no children... `nil` vs `[]`","created_at":"2017-01-25T21:24:27Z","updated_at":"2017-01-25T21:25:54Z","html_url":"https://github.com/grnhse/greenhouse-api-docs/pull/65#discussion_r97881525","pull_request_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/comments/97881525"},"html":{"href":"https://github.com/grnhse/greenhouse-api-docs/pull/65#discussion_r97881525"},"pull_request":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65","id":103005986,"html_url":"https://github.com/grnhse/greenhouse-api-docs/pull/65","diff_url":"https://github.com/grnhse/greenhouse-api-docs/pull/65.diff","patch_url":"https://github.com/grnhse/greenhouse-api-docs/pull/65.patch","issue_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/65","number":65,"state":"open","locked":false,"title":"Add documentation for the Office Deleted and Department Deleted web h…","user":{"login":"richeyb","id":12497204,"avatar_url":"https://avatars.githubusercontent.com/u/12497204?v=3","gravatar_id":"","url":"https://api.github.com/users/richeyb","html_url":"https://github.com/richeyb","followers_url":"https://api.github.com/users/richeyb/followers","following_url":"https://api.github.com/users/richeyb/following{/other_user}","gists_url":"https://api.github.com/users/richeyb/gists{/gist_id}","starred_url":"https://api.github.com/users/richeyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richeyb/subscriptions","organizations_url":"https://api.github.com/users/richeyb/orgs","repos_url":"https://api.github.com/users/richeyb/repos","events_url":"https://api.github.com/users/richeyb/events{/privacy}","received_events_url":"https://api.github.com/users/richeyb/received_events","type":"User","site_admin":false},"body":"…ooks","created_at":"2017-01-24T21:21:05Z","updated_at":"2017-01-25T21:25:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33cf6c032afd71f5cd7369b6d9a703f3c6edb1f9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65/commits","review_comments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65/comments","review_comment_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/65/comments","statuses_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/statuses/f3d9917bdf2b2f87126aba08e21bebc8cba25b7c","head":{"label":"grnhse:GREEN-6537-add-office-department-deleted-webhook-docs","ref":"GREEN-6537-add-office-department-deleted-webhook-docs","sha":"f3d9917bdf2b2f87126aba08e21bebc8cba25b7c","user":{"login":"grnhse","id":5897040,"avatar_url":"https://avatars.githubusercontent.com/u/5897040?v=3","gravatar_id":"","url":"https://api.github.com/users/grnhse","html_url":"https://github.com/grnhse","followers_url":"https://api.github.com/users/grnhse/followers","following_url":"https://api.github.com/users/grnhse/following{/other_user}","gists_url":"https://api.github.com/users/grnhse/gists{/gist_id}","starred_url":"https://api.github.com/users/grnhse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnhse/subscriptions","organizations_url":"https://api.github.com/users/grnhse/orgs","repos_url":"https://api.github.com/users/grnhse/repos","events_url":"https://api.github.com/users/grnhse/events{/privacy}","received_events_url":"https://api.github.com/users/grnhse/received_events","type":"Organization","site_admin":false},"repo":{"id":48455385,"name":"greenhouse-api-docs","full_name":"grnhse/greenhouse-api-docs","owner":{"login":"grnhse","id":5897040,"avatar_url":"https://avatars.githubusercontent.com/u/5897040?v=3","gravatar_id":"","url":"https://api.github.com/users/grnhse","html_url":"https://github.com/grnhse","followers_url":"https://api.github.com/users/grnhse/followers","following_url":"https://api.github.com/users/grnhse/following{/other_user}","gists_url":"https://api.github.com/users/grnhse/gists{/gist_id}","starred_url":"https://api.github.com/users/grnhse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnhse/subscriptions","organizations_url":"https://api.github.com/users/grnhse/orgs","repos_url":"https://api.github.com/users/grnhse/repos","events_url":"https://api.github.com/users/grnhse/events{/privacy}","received_events_url":"https://api.github.com/users/grnhse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grnhse/greenhouse-api-docs","description":"Beautiful static documentation for your API","fork":true,"url":"https://api.github.com/repos/grnhse/greenhouse-api-docs","forks_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/forks","keys_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/teams","hooks_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/hooks","issue_events_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/events{/number}","events_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/events","assignees_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/assignees{/user}","branches_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/branches{/branch}","tags_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/tags","blobs_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/languages","stargazers_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/stargazers","contributors_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/contributors","subscribers_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/subscribers","subscription_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/subscription","commits_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/contents/{+path}","compare_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/merges","archive_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/downloads","issues_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues{/number}","pulls_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/labels{/name}","releases_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/releases{/id}","deployments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/deployments","created_at":"2015-12-22T21:43:37Z","updated_at":"2017-01-10T19:30:38Z","pushed_at":"2017-01-25T21:20:26Z","git_url":"git://github.com/grnhse/greenhouse-api-docs.git","ssh_url":"git@github.com:grnhse/greenhouse-api-docs.git","clone_url":"https://github.com/grnhse/greenhouse-api-docs.git","svn_url":"https://github.com/grnhse/greenhouse-api-docs","homepage":"","size":2528,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":7,"default_branch":"master"}},"base":{"label":"grnhse:master","ref":"master","sha":"715c90dfcc9c75be0ac4854b32e499ccf1d8d857","user":{"login":"grnhse","id":5897040,"avatar_url":"https://avatars.githubusercontent.com/u/5897040?v=3","gravatar_id":"","url":"https://api.github.com/users/grnhse","html_url":"https://github.com/grnhse","followers_url":"https://api.github.com/users/grnhse/followers","following_url":"https://api.github.com/users/grnhse/following{/other_user}","gists_url":"https://api.github.com/users/grnhse/gists{/gist_id}","starred_url":"https://api.github.com/users/grnhse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnhse/subscriptions","organizations_url":"https://api.github.com/users/grnhse/orgs","repos_url":"https://api.github.com/users/grnhse/repos","events_url":"https://api.github.com/users/grnhse/events{/privacy}","received_events_url":"https://api.github.com/users/grnhse/received_events","type":"Organization","site_admin":false},"repo":{"id":48455385,"name":"greenhouse-api-docs","full_name":"grnhse/greenhouse-api-docs","owner":{"login":"grnhse","id":5897040,"avatar_url":"https://avatars.githubusercontent.com/u/5897040?v=3","gravatar_id":"","url":"https://api.github.com/users/grnhse","html_url":"https://github.com/grnhse","followers_url":"https://api.github.com/users/grnhse/followers","following_url":"https://api.github.com/users/grnhse/following{/other_user}","gists_url":"https://api.github.com/users/grnhse/gists{/gist_id}","starred_url":"https://api.github.com/users/grnhse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grnhse/subscriptions","organizations_url":"https://api.github.com/users/grnhse/orgs","repos_url":"https://api.github.com/users/grnhse/repos","events_url":"https://api.github.com/users/grnhse/events{/privacy}","received_events_url":"https://api.github.com/users/grnhse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grnhse/greenhouse-api-docs","description":"Beautiful static documentation for your API","fork":true,"url":"https://api.github.com/repos/grnhse/greenhouse-api-docs","forks_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/forks","keys_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/teams","hooks_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/hooks","issue_events_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/events{/number}","events_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/events","assignees_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/assignees{/user}","branches_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/branches{/branch}","tags_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/tags","blobs_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/languages","stargazers_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/stargazers","contributors_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/contributors","subscribers_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/subscribers","subscription_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/subscription","commits_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/contents/{+path}","compare_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/merges","archive_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/downloads","issues_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues{/number}","pulls_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/labels{/name}","releases_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/releases{/id}","deployments_url":"https://api.github.com/repos/grnhse/greenhouse-api-docs/deployments","created_at":"2015-12-22T21:43:37Z","updated_at":"2017-01-10T19:30:38Z","pushed_at":"2017-01-25T21:20:26Z","git_url":"git://github.com/grnhse/greenhouse-api-docs.git","ssh_url":"git@github.com:grnhse/greenhouse-api-docs.git","clone_url":"https://github.com/grnhse/greenhouse-api-docs.git","svn_url":"https://github.com/grnhse/greenhouse-api-docs","homepage":"","size":2528,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65"},"html":{"href":"https://github.com/grnhse/greenhouse-api-docs/pull/65"},"issue":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/65"},"comments":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/grnhse/greenhouse-api-docs/statuses/f3d9917bdf2b2f87126aba08e21bebc8cba25b7c"}}}}
{"actor":{"display_login":"tdphillipsjr"}}