Rewrite API