Create or update attributes by sid

Is it possible to update attributes based on sid either by api or js? The objective is to sync subscribers.