Using the API
Gophish was designed to be API-first. This means that the UI is just a wrapper around a powerful JSON RESTful API.
You can find our API documentation here.
Python API Client
The Gophish team maintains an official Python API client for easily interacting with the API.