When asked to design an API (Application Programming Interface), most people will approach this different to an internal interface between modules. Both should be treated in a similar manner to ensure that validation is more manageable, and also to ensure that, should the internal interface be accidentally or intentionally exposed, it doesn’t cause a mass panic about making it more “resilient”.
An external API if done well, will:
Now given these design constraints for an external API, is there a good reason to dismiss them for an internal API? The biggest excuse is performance. In rare circumstances this may be true. However, consider the following points:
Determine your interfaces and treat them in the same manner as external API.