{"action":"created","comment":{"url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/comments/58096362","id":58096362,"diff_hunk":"@@ -118,3 +118,51 @@ Key | Description\n ### Parameters\n \n The `POST` and/or `PUT` body can include fields from the [Account Object](#accounts).\n+\n+\n+## Invite to Account\n+\n+Managers can be invited to unclaimed accounts by using this endpoint.\n+\n+### HTTP Request\n+`POST <%=@api_prefix%>/2/account/{account_id}/invite`\n+\n+> Example Request\n+\n+```shell\n+curl -X POST <%=@api_prefix%>/2/account/35/invite \\\n+ -H \"W-Token: <%=@wiw_token%>\" \\\n+ -data '{\"email\":\"sally@example.com\",\"manager_name\":\"Sally Smith\",\"message\":\"This scheduling app is really slick!\"}'\n+```\n+```php\n+<?php\n+$wiw = new Wheniwork(\"<%=@wiw_token%>\");\n+$result = $wiw->post(\"account/11/invite\", array(\n+    \"email\" => \"sally@example.com\",\n+    \"manager_name\" => \"Sally Smith\",\n+    \"message\" => \"This scheduling app is really slick!\",\n+));\n+?>\n+```\n+\n+> Example Response\n+\n+<% json do %>\n+{\n+  \"success\": true\n+}\n+<% end %>\n+\n+### Parameters\n+\n+Either `email` or `phone_number` must be provided. If both are provided, an SMS and an email will be sent.\n+\n+Key | Description\n+--- | -----------\n+<% param \"account_id\" do %>ID of the account object.<% end %>\n+<% param \"email\" do %>Email address of the manager.<% end %>\n+<% param \"phone_number\" do %>Phone number of the manager.<% end %>\n+<% param \"region\" do %>Two letter country code of the phone number. This can be omitted if the phone number is in E164 format.<% end %>","path":"source/methods/accounts.md.erb","position":48,"original_position":48,"commit_id":"35026dc2037e5c0287e7053226236e9c5908800c","original_commit_id":"35026dc2037e5c0287e7053226236e9c5908800c","user":{"login":"ameech","id":831646,"avatar_url":"https://avatars.githubusercontent.com/u/831646?v=3","gravatar_id":"","url":"https://api.github.com/users/ameech","html_url":"https://github.com/ameech","followers_url":"https://api.github.com/users/ameech/followers","following_url":"https://api.github.com/users/ameech/following{/other_user}","gists_url":"https://api.github.com/users/ameech/gists{/gist_id}","starred_url":"https://api.github.com/users/ameech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameech/subscriptions","organizations_url":"https://api.github.com/users/ameech/orgs","repos_url":"https://api.github.com/users/ameech/repos","events_url":"https://api.github.com/users/ameech/events{/privacy}","received_events_url":"https://api.github.com/users/ameech/received_events","type":"User","site_admin":false},"body":"Can we link to the E164 format? Or is that already covered somewhere else?","created_at":"2016-03-31T17:44:44Z","updated_at":"2016-03-31T17:44:44Z","html_url":"https://github.com/wheniwork/wheniwork-api/pull/75#discussion_r58096362","pull_request_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/comments/58096362"},"html":{"href":"https://github.com/wheniwork/wheniwork-api/pull/75#discussion_r58096362"},"pull_request":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75","id":64803629,"html_url":"https://github.com/wheniwork/wheniwork-api/pull/75","diff_url":"https://github.com/wheniwork/wheniwork-api/pull/75.diff","patch_url":"https://github.com/wheniwork/wheniwork-api/pull/75.patch","issue_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/75","number":75,"state":"open","locked":false,"title":"Add docs for account invite endpoint","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":"Refs WEB-3300","created_at":"2016-03-31T14:53:05Z","updated_at":"2016-03-31T17:44:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87553e4977c8a60be9d77c322dc3a28e3fb47439","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75/commits","review_comments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75/comments","review_comment_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/75/comments","statuses_url":"https://api.github.com/repos/wheniwork/wheniwork-api/statuses/35026dc2037e5c0287e7053226236e9c5908800c","head":{"label":"wheniwork:feature/invite-endpoint","ref":"feature/invite-endpoint","sha":"35026dc2037e5c0287e7053226236e9c5908800c","user":{"login":"wheniwork","id":1588384,"avatar_url":"https://avatars.githubusercontent.com/u/1588384?v=3","gravatar_id":"","url":"https://api.github.com/users/wheniwork","html_url":"https://github.com/wheniwork","followers_url":"https://api.github.com/users/wheniwork/followers","following_url":"https://api.github.com/users/wheniwork/following{/other_user}","gists_url":"https://api.github.com/users/wheniwork/gists{/gist_id}","starred_url":"https://api.github.com/users/wheniwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheniwork/subscriptions","organizations_url":"https://api.github.com/users/wheniwork/orgs","repos_url":"https://api.github.com/users/wheniwork/repos","events_url":"https://api.github.com/users/wheniwork/events{/privacy}","received_events_url":"https://api.github.com/users/wheniwork/received_events","type":"Organization","site_admin":false},"repo":{"id":17457848,"name":"wheniwork-api","full_name":"wheniwork/wheniwork-api","owner":{"login":"wheniwork","id":1588384,"avatar_url":"https://avatars.githubusercontent.com/u/1588384?v=3","gravatar_id":"","url":"https://api.github.com/users/wheniwork","html_url":"https://github.com/wheniwork","followers_url":"https://api.github.com/users/wheniwork/followers","following_url":"https://api.github.com/users/wheniwork/following{/other_user}","gists_url":"https://api.github.com/users/wheniwork/gists{/gist_id}","starred_url":"https://api.github.com/users/wheniwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheniwork/subscriptions","organizations_url":"https://api.github.com/users/wheniwork/orgs","repos_url":"https://api.github.com/users/wheniwork/repos","events_url":"https://api.github.com/users/wheniwork/events{/privacy}","received_events_url":"https://api.github.com/users/wheniwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wheniwork/wheniwork-api","description":"Documentation for the wildly popular When I Work API.","fork":false,"url":"https://api.github.com/repos/wheniwork/wheniwork-api","forks_url":"https://api.github.com/repos/wheniwork/wheniwork-api/forks","keys_url":"https://api.github.com/repos/wheniwork/wheniwork-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wheniwork/wheniwork-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wheniwork/wheniwork-api/teams","hooks_url":"https://api.github.com/repos/wheniwork/wheniwork-api/hooks","issue_events_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/events{/number}","events_url":"https://api.github.com/repos/wheniwork/wheniwork-api/events","assignees_url":"https://api.github.com/repos/wheniwork/wheniwork-api/assignees{/user}","branches_url":"https://api.github.com/repos/wheniwork/wheniwork-api/branches{/branch}","tags_url":"https://api.github.com/repos/wheniwork/wheniwork-api/tags","blobs_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wheniwork/wheniwork-api/statuses/{sha}","languages_url":"https://api.github.com/repos/wheniwork/wheniwork-api/languages","stargazers_url":"https://api.github.com/repos/wheniwork/wheniwork-api/stargazers","contributors_url":"https://api.github.com/repos/wheniwork/wheniwork-api/contributors","subscribers_url":"https://api.github.com/repos/wheniwork/wheniwork-api/subscribers","subscription_url":"https://api.github.com/repos/wheniwork/wheniwork-api/subscription","commits_url":"https://api.github.com/repos/wheniwork/wheniwork-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/wheniwork/wheniwork-api/contents/{+path}","compare_url":"https://api.github.com/repos/wheniwork/wheniwork-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wheniwork/wheniwork-api/merges","archive_url":"https://api.github.com/repos/wheniwork/wheniwork-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wheniwork/wheniwork-api/downloads","issues_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues{/number}","pulls_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls{/number}","milestones_url":"https://api.github.com/repos/wheniwork/wheniwork-api/milestones{/number}","notifications_url":"https://api.github.com/repos/wheniwork/wheniwork-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wheniwork/wheniwork-api/labels{/name}","releases_url":"https://api.github.com/repos/wheniwork/wheniwork-api/releases{/id}","deployments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/deployments","created_at":"2014-03-05T22:39:25Z","updated_at":"2016-01-12T14:33:40Z","pushed_at":"2016-03-31T14:53:06Z","git_url":"git://github.com/wheniwork/wheniwork-api.git","ssh_url":"git@github.com:wheniwork/wheniwork-api.git","clone_url":"https://github.com/wheniwork/wheniwork-api.git","svn_url":"https://github.com/wheniwork/wheniwork-api","homepage":"http://dev.wheniwork.com","size":932,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":17,"forks":4,"open_issues":17,"watchers":2,"default_branch":"docs"}},"base":{"label":"wheniwork:docs","ref":"docs","sha":"181df3657d40e45af72e30c02e29130e62639709","user":{"login":"wheniwork","id":1588384,"avatar_url":"https://avatars.githubusercontent.com/u/1588384?v=3","gravatar_id":"","url":"https://api.github.com/users/wheniwork","html_url":"https://github.com/wheniwork","followers_url":"https://api.github.com/users/wheniwork/followers","following_url":"https://api.github.com/users/wheniwork/following{/other_user}","gists_url":"https://api.github.com/users/wheniwork/gists{/gist_id}","starred_url":"https://api.github.com/users/wheniwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheniwork/subscriptions","organizations_url":"https://api.github.com/users/wheniwork/orgs","repos_url":"https://api.github.com/users/wheniwork/repos","events_url":"https://api.github.com/users/wheniwork/events{/privacy}","received_events_url":"https://api.github.com/users/wheniwork/received_events","type":"Organization","site_admin":false},"repo":{"id":17457848,"name":"wheniwork-api","full_name":"wheniwork/wheniwork-api","owner":{"login":"wheniwork","id":1588384,"avatar_url":"https://avatars.githubusercontent.com/u/1588384?v=3","gravatar_id":"","url":"https://api.github.com/users/wheniwork","html_url":"https://github.com/wheniwork","followers_url":"https://api.github.com/users/wheniwork/followers","following_url":"https://api.github.com/users/wheniwork/following{/other_user}","gists_url":"https://api.github.com/users/wheniwork/gists{/gist_id}","starred_url":"https://api.github.com/users/wheniwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wheniwork/subscriptions","organizations_url":"https://api.github.com/users/wheniwork/orgs","repos_url":"https://api.github.com/users/wheniwork/repos","events_url":"https://api.github.com/users/wheniwork/events{/privacy}","received_events_url":"https://api.github.com/users/wheniwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wheniwork/wheniwork-api","description":"Documentation for the wildly popular When I Work API.","fork":false,"url":"https://api.github.com/repos/wheniwork/wheniwork-api","forks_url":"https://api.github.com/repos/wheniwork/wheniwork-api/forks","keys_url":"https://api.github.com/repos/wheniwork/wheniwork-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wheniwork/wheniwork-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wheniwork/wheniwork-api/teams","hooks_url":"https://api.github.com/repos/wheniwork/wheniwork-api/hooks","issue_events_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/events{/number}","events_url":"https://api.github.com/repos/wheniwork/wheniwork-api/events","assignees_url":"https://api.github.com/repos/wheniwork/wheniwork-api/assignees{/user}","branches_url":"https://api.github.com/repos/wheniwork/wheniwork-api/branches{/branch}","tags_url":"https://api.github.com/repos/wheniwork/wheniwork-api/tags","blobs_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wheniwork/wheniwork-api/statuses/{sha}","languages_url":"https://api.github.com/repos/wheniwork/wheniwork-api/languages","stargazers_url":"https://api.github.com/repos/wheniwork/wheniwork-api/stargazers","contributors_url":"https://api.github.com/repos/wheniwork/wheniwork-api/contributors","subscribers_url":"https://api.github.com/repos/wheniwork/wheniwork-api/subscribers","subscription_url":"https://api.github.com/repos/wheniwork/wheniwork-api/subscription","commits_url":"https://api.github.com/repos/wheniwork/wheniwork-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/wheniwork/wheniwork-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/wheniwork/wheniwork-api/contents/{+path}","compare_url":"https://api.github.com/repos/wheniwork/wheniwork-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wheniwork/wheniwork-api/merges","archive_url":"https://api.github.com/repos/wheniwork/wheniwork-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wheniwork/wheniwork-api/downloads","issues_url":"https://api.github.com/repos/wheniwork/wheniwork-api/issues{/number}","pulls_url":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls{/number}","milestones_url":"https://api.github.com/repos/wheniwork/wheniwork-api/milestones{/number}","notifications_url":"https://api.github.com/repos/wheniwork/wheniwork-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wheniwork/wheniwork-api/labels{/name}","releases_url":"https://api.github.com/repos/wheniwork/wheniwork-api/releases{/id}","deployments_url":"https://api.github.com/repos/wheniwork/wheniwork-api/deployments","created_at":"2014-03-05T22:39:25Z","updated_at":"2016-01-12T14:33:40Z","pushed_at":"2016-03-31T14:53:06Z","git_url":"git://github.com/wheniwork/wheniwork-api.git","ssh_url":"git@github.com:wheniwork/wheniwork-api.git","clone_url":"https://github.com/wheniwork/wheniwork-api.git","svn_url":"https://github.com/wheniwork/wheniwork-api","homepage":"http://dev.wheniwork.com","size":932,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":17,"forks":4,"open_issues":17,"watchers":2,"default_branch":"docs"}},"_links":{"self":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75"},"html":{"href":"https://github.com/wheniwork/wheniwork-api/pull/75"},"issue":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/75"},"comments":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/wheniwork/wheniwork-api/statuses/35026dc2037e5c0287e7053226236e9c5908800c"}}}}