You always have to test your APIs before deploying them with your application. Unit tests are great for unit level code, but how could you test your API in a dev-related environment with test data?
There's always mocking frameworks, but it just isn't the same.
You could always create a new environment, but it would require a test database.
So what do you do?