Q:

Run Google Apps Script Function via API

I have a few Google documents; some are normal Docs, some are Google Scripts.
When I'm logged in with my account, I can run one of my scripts manually, that interacts with my Docs (it opens an existing Doc and copies the content to a new one for example).
Is there any way for a random user, who is not logged in, to run my functions via API?
Everybody should be able to run my scripts easily, but not be able to see the code or what it actually does.

A:

Yes,  publish it as a service and to anonymous users.   Then setup some specific crafted URLs that run the functions you want it to run. 

