> An API, despite looking like works, is not a literary expression of a process, it is a machine
That is incorrect.
> . If I change the names of things in a table of contents to synonyms, I can still use it to find what I am looking for.
If I change the name to be something you cannot refer to, you cannot.
> If I change the names of things my implementation of an API, it no longer functions as an interface for the things that worked with it previously.
This is irrelevant to the API. The API does not make a guarantee about functionality. If I have an endpoint /foo and later /foo increments an internal counter by 1, the API remains unchanged. Documentation supplements and is not part of the API per se, which is an important distinction. The fact that Documentation and an API are being referred to in conjunction, was a failure that software will suffer for more than the lifetime of my children.