{"action":"created","comment":{"url":"https://api.github.com/repos/smooch/smooch-docs/pulls/comments/124803359","pull_request_review_id":47124810,"id":124803359,"diff_hunk":"@@ -235,6 +233,67 @@ An `image` type message is a message that is sent with an image, and, optionally\n | **mediaUrl**<br/><span class='req'>required*</span>  | The image URL used for the image message. |\n | **mediaType**<br/><span class='opt'>optional</span>  | The media type is defined here, for example `image/jpeg`. If `mediaType` is not specified, the media type will be resolved with the `mediaUrl`. |\n \n+### File Message\n+\n+> Request:\n+\n+```shell\n+curl https://api.smooch.io/v1/appusers/c7f6e6d6c3a637261bd9656f/messages \\\n+     -X POST \\\n+     -H 'content-type: application/json' \\\n+     -H 'authorization: Bearer your-jwt' \\\n+     -d '\n+{\n+    \"role\": \"appMaker\",\n+    \"type\": \"file\",\n+    \"mediaUrl\": \"http://example.org/document.pdf\",\n+    \"mediaType\": \"application/pdf\"\n+}'\n+```\n+```js\n+smooch.appUsers.sendMessage('c7f6e6d6c3a637261bd9656f', {\n+    role: 'appMaker',\n+    type: 'file',\n+    mediaUrl: 'http://example.org/document.pdf'\n+}).then(() => {\n+    // async code\n+});\n+```\n+\n+> Response:\n+\n+```\n+201 CREATED\n+```\n+```json\n+{\n+  \"message\": {\n+    \"_id\": \"57966d21c19c9da00839a5e9\",\n+    \"role\": \"appMaker\",\n+    \"type\": \"file\",\n+    \"mediaUrl\": \"http://example.org/document.pdf\",\n+    \"mediaType\": \"application/pdf\"\n+  }\n+}\n+```\n+```js\n+201 CREATED\n+```\n+\n+A `file` type message is a message that is sent with a file attachment.\n+If you have a raw unhosted file you want to send, you can use the [attachments upload API](#upload-attachment) to upload the file to Smooch before sending the message.\n+\n+| **Arguments**                |                       |\n+|------------------------------|-----------------------|\n+| **text**<br/><span class='opt'>optional</span>  | Some text to send with the file attachment. |\n+| **mediaUrl**<br/><span class='req'>required</span>  | The URL of the file attachment. |\n+| **mediaType**<br/><span class='opt'>optional</span>  | The media type is defined here, for example `application/pdf`. If `mediaType` is not specified, the media type will be resolved with the `mediaUrl`. |\n+\n+#### Channel Support\n+\n+File uploads are only fully supported on Facebook Messenger for now.","path":"slate/source/includes/rest/core/_conversations.md","position":89,"original_position":89,"commit_id":"a5acd9e8f3b47f60bf20927cce951bd83c7b86b6","original_commit_id":"a5acd9e8f3b47f60bf20927cce951bd83c7b86b6","user":{"login":"spasiu","id":2235885,"avatar_url":"https://avatars3.githubusercontent.com/u/2235885?v=3","gravatar_id":"","url":"https://api.github.com/users/spasiu","html_url":"https://github.com/spasiu","followers_url":"https://api.github.com/users/spasiu/followers","following_url":"https://api.github.com/users/spasiu/following{/other_user}","gists_url":"https://api.github.com/users/spasiu/gists{/gist_id}","starred_url":"https://api.github.com/users/spasiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spasiu/subscriptions","organizations_url":"https://api.github.com/users/spasiu/orgs","repos_url":"https://api.github.com/users/spasiu/repos","events_url":"https://api.github.com/users/spasiu/events{/privacy}","received_events_url":"https://api.github.com/users/spasiu/received_events","type":"User","site_admin":false},"body":"How about \"File uploads are only fully supported on Facebook Messenger at the moment, where they will be displayed as rich content\"?","created_at":"2017-06-29T13:45:32Z","updated_at":"2017-06-29T13:46:18Z","html_url":"https://github.com/smooch/smooch-docs/pull/334#discussion_r124803359","pull_request_url":"https://api.github.com/repos/smooch/smooch-docs/pulls/334","_links":{"self":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/comments/124803359"},"html":{"href":"https://github.com/smooch/smooch-docs/pull/334#discussion_r124803359"},"pull_request":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/smooch/smooch-docs/pulls/334","id":128146488,"html_url":"https://github.com/smooch/smooch-docs/pull/334","diff_url":"https://github.com/smooch/smooch-docs/pull/334.diff","patch_url":"https://github.com/smooch/smooch-docs/pull/334.patch","issue_url":"https://api.github.com/repos/smooch/smooch-docs/issues/334","number":334,"state":"open","locked":false,"title":"Add docs for attachment API","user":{"login":"jugarrit","id":12450961,"avatar_url":"https://avatars2.githubusercontent.com/u/12450961?v=3","gravatar_id":"","url":"https://api.github.com/users/jugarrit","html_url":"https://github.com/jugarrit","followers_url":"https://api.github.com/users/jugarrit/followers","following_url":"https://api.github.com/users/jugarrit/following{/other_user}","gists_url":"https://api.github.com/users/jugarrit/gists{/gist_id}","starred_url":"https://api.github.com/users/jugarrit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jugarrit/subscriptions","organizations_url":"https://api.github.com/users/jugarrit/orgs","repos_url":"https://api.github.com/users/jugarrit/repos","events_url":"https://api.github.com/users/jugarrit/events{/privacy}","received_events_url":"https://api.github.com/users/jugarrit/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-06-29T13:06:10Z","updated_at":"2017-06-29T13:46:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2886d9995e06c900c3c2c6c61238b32ada2f423","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jpjoyal","id":32315,"avatar_url":"https://avatars1.githubusercontent.com/u/32315?v=3","gravatar_id":"","url":"https://api.github.com/users/jpjoyal","html_url":"https://github.com/jpjoyal","followers_url":"https://api.github.com/users/jpjoyal/followers","following_url":"https://api.github.com/users/jpjoyal/following{/other_user}","gists_url":"https://api.github.com/users/jpjoyal/gists{/gist_id}","starred_url":"https://api.github.com/users/jpjoyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpjoyal/subscriptions","organizations_url":"https://api.github.com/users/jpjoyal/orgs","repos_url":"https://api.github.com/users/jpjoyal/repos","events_url":"https://api.github.com/users/jpjoyal/events{/privacy}","received_events_url":"https://api.github.com/users/jpjoyal/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/smooch/smooch-docs/pulls/334/commits","review_comments_url":"https://api.github.com/repos/smooch/smooch-docs/pulls/334/comments","review_comment_url":"https://api.github.com/repos/smooch/smooch-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smooch/smooch-docs/issues/334/comments","statuses_url":"https://api.github.com/repos/smooch/smooch-docs/statuses/a5acd9e8f3b47f60bf20927cce951bd83c7b86b6","head":{"label":"smooch:f/attachment-api","ref":"f/attachment-api","sha":"a5acd9e8f3b47f60bf20927cce951bd83c7b86b6","user":{"login":"smooch","id":14301989,"avatar_url":"https://avatars0.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"repo":{"id":39525331,"name":"smooch-docs","full_name":"smooch/smooch-docs","owner":{"login":"smooch","id":14301989,"avatar_url":"https://avatars0.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smooch/smooch-docs","description":"Docs living at docs.smooch.io","fork":false,"url":"https://api.github.com/repos/smooch/smooch-docs","forks_url":"https://api.github.com/repos/smooch/smooch-docs/forks","keys_url":"https://api.github.com/repos/smooch/smooch-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smooch/smooch-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smooch/smooch-docs/teams","hooks_url":"https://api.github.com/repos/smooch/smooch-docs/hooks","issue_events_url":"https://api.github.com/repos/smooch/smooch-docs/issues/events{/number}","events_url":"https://api.github.com/repos/smooch/smooch-docs/events","assignees_url":"https://api.github.com/repos/smooch/smooch-docs/assignees{/user}","branches_url":"https://api.github.com/repos/smooch/smooch-docs/branches{/branch}","tags_url":"https://api.github.com/repos/smooch/smooch-docs/tags","blobs_url":"https://api.github.com/repos/smooch/smooch-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smooch/smooch-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smooch/smooch-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/smooch/smooch-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smooch/smooch-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/smooch/smooch-docs/languages","stargazers_url":"https://api.github.com/repos/smooch/smooch-docs/stargazers","contributors_url":"https://api.github.com/repos/smooch/smooch-docs/contributors","subscribers_url":"https://api.github.com/repos/smooch/smooch-docs/subscribers","subscription_url":"https://api.github.com/repos/smooch/smooch-docs/subscription","commits_url":"https://api.github.com/repos/smooch/smooch-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/smooch/smooch-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/smooch/smooch-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/smooch/smooch-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/smooch/smooch-docs/contents/{+path}","compare_url":"https://api.github.com/repos/smooch/smooch-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smooch/smooch-docs/merges","archive_url":"https://api.github.com/repos/smooch/smooch-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smooch/smooch-docs/downloads","issues_url":"https://api.github.com/repos/smooch/smooch-docs/issues{/number}","pulls_url":"https://api.github.com/repos/smooch/smooch-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/smooch/smooch-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/smooch/smooch-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smooch/smooch-docs/labels{/name}","releases_url":"https://api.github.com/repos/smooch/smooch-docs/releases{/id}","deployments_url":"https://api.github.com/repos/smooch/smooch-docs/deployments","created_at":"2015-07-22T19:13:33Z","updated_at":"2017-01-17T19:05:39Z","pushed_at":"2017-06-29T13:06:11Z","git_url":"git://github.com/smooch/smooch-docs.git","ssh_url":"git@github.com:smooch/smooch-docs.git","clone_url":"https://github.com/smooch/smooch-docs.git","svn_url":"https://github.com/smooch/smooch-docs","homepage":"https://docs.smooch.io","size":178691,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"smooch:master","ref":"master","sha":"256372076f2f7cf51089660dcb976ce2016b074a","user":{"login":"smooch","id":14301989,"avatar_url":"https://avatars0.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"repo":{"id":39525331,"name":"smooch-docs","full_name":"smooch/smooch-docs","owner":{"login":"smooch","id":14301989,"avatar_url":"https://avatars0.githubusercontent.com/u/14301989?v=3","gravatar_id":"","url":"https://api.github.com/users/smooch","html_url":"https://github.com/smooch","followers_url":"https://api.github.com/users/smooch/followers","following_url":"https://api.github.com/users/smooch/following{/other_user}","gists_url":"https://api.github.com/users/smooch/gists{/gist_id}","starred_url":"https://api.github.com/users/smooch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smooch/subscriptions","organizations_url":"https://api.github.com/users/smooch/orgs","repos_url":"https://api.github.com/users/smooch/repos","events_url":"https://api.github.com/users/smooch/events{/privacy}","received_events_url":"https://api.github.com/users/smooch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smooch/smooch-docs","description":"Docs living at docs.smooch.io","fork":false,"url":"https://api.github.com/repos/smooch/smooch-docs","forks_url":"https://api.github.com/repos/smooch/smooch-docs/forks","keys_url":"https://api.github.com/repos/smooch/smooch-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smooch/smooch-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smooch/smooch-docs/teams","hooks_url":"https://api.github.com/repos/smooch/smooch-docs/hooks","issue_events_url":"https://api.github.com/repos/smooch/smooch-docs/issues/events{/number}","events_url":"https://api.github.com/repos/smooch/smooch-docs/events","assignees_url":"https://api.github.com/repos/smooch/smooch-docs/assignees{/user}","branches_url":"https://api.github.com/repos/smooch/smooch-docs/branches{/branch}","tags_url":"https://api.github.com/repos/smooch/smooch-docs/tags","blobs_url":"https://api.github.com/repos/smooch/smooch-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smooch/smooch-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smooch/smooch-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/smooch/smooch-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smooch/smooch-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/smooch/smooch-docs/languages","stargazers_url":"https://api.github.com/repos/smooch/smooch-docs/stargazers","contributors_url":"https://api.github.com/repos/smooch/smooch-docs/contributors","subscribers_url":"https://api.github.com/repos/smooch/smooch-docs/subscribers","subscription_url":"https://api.github.com/repos/smooch/smooch-docs/subscription","commits_url":"https://api.github.com/repos/smooch/smooch-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/smooch/smooch-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/smooch/smooch-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/smooch/smooch-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/smooch/smooch-docs/contents/{+path}","compare_url":"https://api.github.com/repos/smooch/smooch-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smooch/smooch-docs/merges","archive_url":"https://api.github.com/repos/smooch/smooch-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smooch/smooch-docs/downloads","issues_url":"https://api.github.com/repos/smooch/smooch-docs/issues{/number}","pulls_url":"https://api.github.com/repos/smooch/smooch-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/smooch/smooch-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/smooch/smooch-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smooch/smooch-docs/labels{/name}","releases_url":"https://api.github.com/repos/smooch/smooch-docs/releases{/id}","deployments_url":"https://api.github.com/repos/smooch/smooch-docs/deployments","created_at":"2015-07-22T19:13:33Z","updated_at":"2017-01-17T19:05:39Z","pushed_at":"2017-06-29T13:06:11Z","git_url":"git://github.com/smooch/smooch-docs.git","ssh_url":"git@github.com:smooch/smooch-docs.git","clone_url":"https://github.com/smooch/smooch-docs.git","svn_url":"https://github.com/smooch/smooch-docs","homepage":"https://docs.smooch.io","size":178691,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/334"},"html":{"href":"https://github.com/smooch/smooch-docs/pull/334"},"issue":{"href":"https://api.github.com/repos/smooch/smooch-docs/issues/334"},"comments":{"href":"https://api.github.com/repos/smooch/smooch-docs/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smooch/smooch-docs/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/smooch/smooch-docs/statuses/a5acd9e8f3b47f60bf20927cce951bd83c7b86b6"}}}}
{"actor":{"display_login":"spasiu"}}