diff --git a/examples/update_user.rb b/examples/update_user.rb
index <HASH>..<HASH> 100644
--- a/examples/update_user.rb
+++ b/examples/update_user.rb
@@ -11,3 +11,4 @@ puts client.username_update(username: "Batman", new_username: "Alfred")
 puts client.user_update(username: "Batman", name: "Bruce Wayne")
 puts client.email_update(username: "Batman", email: "batman@example.com")
 puts client.toggle_avatar(username: "Batman", use_uploaded_avatar: true)
+puts client.upload_avatar(username: "DiscourseHero", file: "http://cdn.discourse.org/assets/logo.png")
diff --git a/lib/discourse_api/client.rb b/lib/discourse_api/client.rb
index <HASH>..<HASH> 100644
--- a/lib/discourse_api/client.rb
+++ b/lib/discourse_api/client.rb
@@ -29,4 +29,7 @@ class DiscourseApi::Client < DiscourseApi::Resource
   put :toggle_avatar    => '/users/:username/preferences/avatar/toggle',
                         :require => [:username]
 
+  post :upload_avatar    => '/users/:username/preferences/avatar',
+                        :require => [:username, :file]
+
 end
Added a post request to upload avatars with a url