send correct status code when creating a link