If an automation idea can be automated by using API within an allowed timeline, you should consider doing that. However, given the flexibility and easiness of RPA, sometimes it makes sense to create a solution using RPA to quickly address an immediate problem and simultaneously working on a solution with API.