api: check id is valid for bounce checking