Short answer

Document / specify interfaces by providing unit-tests. We hope that you would create such unit tests anyway, so you can re-use them as part of your interface documentation.

(not much) Longer answer

Describe syntax, semantic, protocoll/interaction of your interfaces, show sample interactions, provide sample data. Add some unit tests and/or other example code.

For REST APIs, there exist several (quite technical) options.