They are very close terms and I have already found texts that interchange these concepts, as if in certain situations the definitions are almost the same.
What are the technical definitions that distinguish an API from a library or a Framework ?
Are there situations in which it is permissible to interchange these terms without violating the correct technical definition?
A library is a set of elements (functions, classes, predefined types, constants, global variables, macros, etc.) that can be used in a program to facilitate the implementation of that program.
API comes from the English "Application programming interface" which means "Interface for application programming". It is the part of a library that is accessed by a program that uses the library; thus making the use of the library independent of the implementation details. An API can be implemented by different libraries.
A framework is an integrated set of tools that facilitate software development. May include APIs and libraries. But it can also include other elements such as debugging tools, graphic design, prototyping, editing, etc.
The terms API and library are often used interchangeably. But keep in mind that an API is always unique (apart from different versions) and that an API does not include implementation details. Whereas a library does not have to be unique and must contain a complete implementation. That an API is unique is very important, it is what allows you to write a program in C++ for Linux and that program, without modification, works for Mac if the libraries it uses are available for both systems.
An example of a library is Oracle's JavaMail. It is possible to make a program that sends email by directly programming sockets. But it is much faster to use JavaMail or any other email library as these libraries already implement the functionality you need. As well as being faster it is also less error prone, especially in a widely used library; as the code is tested by millions of users and the development community will generally do a better job than the individual program team can.
CORBA is an API. But there may be an implementation for Linux, another for Mac, etc.
An example of a framework would be Unity3D, which offers a set of tools that facilitate the development of video games.
Good, regarding the technical definitions, with that I don't think there will be any problems with answers, for the rest it could create confusion.
A library is a collection of objects and functions that serve a particular purpose.
A framework is a collection of patterns to help you build a web, app...
An API is an interface for other programs to interact with your program without having direct access.
In short, a library is like a plugin, the framework is the skeleton and the API is the part that is oriented towards the visual layer to interact with it.