Code can implement an API, but an API is not code. Not using any reasonable definition of code. Code is something you are theoretically able to execute, in one way or another.
The term "code" also on my opinion doesn't have only one meaning. You can for example see the HTML code in your browser if you use "view source code" functionality of your browser. So authors of browsers consider HTML the code. I've always thought about code as about some text that's machine processable (parsed, interpreted, compiled...). This means I've also seen API as a code.
OK, for some time I've lived in one file projects (PHP) where I've defined interface and in the same file implemented the code itself, so I've seen too little difference... Maybe in other projects the difference is sharper.
Most likely yes. Because you gave it a specific implementation that is not required to make it work. The functionality - and any elements of the module that spring directly from that functionality - is not copyrightable.
If you gave a programmer pseudo code for your module and they created near enough the same module from it then the creative elements don't lie in the aesthetic art and so the copyright in it is very weak.