The API is partially 'self documenting' in that you can explore it via your browser and see all of the functionality that it supports.
When proxying via ZAP go to http://zap/ and you should see this screen:
This is the top level and shows you all of the component which currently support the API.
If you click on the 'core' link you will see:
The API supports
- Views : these return information
- Actions : these control ZAP
The API is available in JSON, XML and HTML formats.
Links:
- Home: The ZAP API
- Next: Accessing views