I don't believe that the distinction is that clear at all. Hence my comment:
Unless you are arguing that network protocol compatibility is a different thing? It seems to me that there is a lot of overlap, since Samba relies on re implementing the same behavior as a Windows file server.
I think it is pretty easy to argue that the pattern of network calls needed to make calls (eg authentication) is an API.
Is a WSDL SOAP definition an API? I think most would say yes. A REST endpoint and the definition of how to use it? Why exactly is the definition of the HTTP protocol different to the definition of the REST endpoint?
IANAL, etc. Which seems important these days.
The API's that Samba uses to access that protocol are nothing like the Windows API calls (and are a completely independent implementation).
I'm just pointing out that it isn't at all clear to me that the strong distinction that software people see between APIs and protocols is as clear under law.
And of course Samba isn't built of WIN32 APIs, that's not what we're talking about.
Please learn the difference between an API and a network protocol, else you end up looking foolish.
https://www.samba.org/ftp/tridge/misc/french_cafe.txt