diff --git a/CHANGELOG b/CHANGELOG
index 7574387280141c15e13e3c76934d3060aa3ed5be..593e8f77ab47861b830f22d4e647d2e955452a75 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@ v 8.7.0 (unreleased)
   - Add default scope to projects to exclude projects pending deletion
   - Ensure empty recipients are rejected in BuildsEmailService
   - API: Ability to filter milestones by state `active` and `closed` (Robert Schilling)
+  - API: Fix milestone filtering by `iid` (Robert Schilling)
   - Implement 'Groups View' as an option for dashboard preferences !3379 (Elias W.)
   - Better errors handling when creating milestones inside groups
   - Implement 'TODOs View' as an option for dashboard preferences !3379 (Elias W.)
diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb
index 0f3f505fa05c8f9d03c7dfc1e400e1cc5bb2314f..84b4d4cdd6dc2dbfede61517bafa6ea2e18263e3 100644
--- a/lib/api/milestones.rb
+++ b/lib/api/milestones.rb
@@ -21,6 +21,7 @@ module API
       #   state (optional) - Return "active" or "closed" milestones
       # Example Request:
       #   GET /projects/:id/milestones
+      #   GET /projects/:id/milestones?iid=42
       #   GET /projects/:id/milestones?state=active
       #   GET /projects/:id/milestones?state=closed
       get ":id/milestones" do
@@ -28,6 +29,7 @@ module API
 
         milestones = user_project.milestones
         milestones = filter_milestones_state(milestones, params[:state])
+        milestones = filter_by_iid(milestones, params[:iid]) if params[:iid].present?
 
         present paginate(milestones), with: Entities::Milestone
       end
diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb
index d97bf6d38ff3e596db840fd35f3350b3bb85cf6d..344f0fe0b7fcbebae65249a9288656b83d9a7eee 100644
--- a/spec/requests/api/milestones_spec.rb
+++ b/spec/requests/api/milestones_spec.rb
@@ -50,10 +50,12 @@ describe API::API, api: true  do
     end
 
     it 'should return a project milestone by iid' do
-      get api("/projects/#{project.id}/milestones?iid=#{milestone.iid}", user)
+      get api("/projects/#{project.id}/milestones?iid=#{closed_milestone.iid}", user)
+
       expect(response.status).to eq 200
-      expect(json_response.first['title']).to eq milestone.title
-      expect(json_response.first['id']).to eq milestone.id
+      expect(json_response.size).to eq(1)
+      expect(json_response.first['title']).to eq closed_milestone.title
+      expect(json_response.first['id']).to eq closed_milestone.id
     end
 
     it 'should return 401 error if user not authenticated' do