[api] fix rewrites