Automation

Integrate Phish with ops tooling, webhooks, and AI agents that execute the REST API on your behalf.

Webhooks

Subscribe to sent, opened, clicked, submitted, and reported events. Configure under Developers → Webhooks or POST /webhooks.

Verify payloads with the X-Phish-Signature HMAC header when a secret is configured.

AI agents

AI agents and integrations should use API keys, not browser sessions. Fetch recipes first, validate setup, then launch.

  1. GET /meta/agent — recipes, field names, and example payloads
  2. GET /catalog — resolve template, landing, SMTP, and group names to IDs
  3. POST /setup/validate — dry-run before sending
  4. POST /campaigns/quick — launch the simulation
  5. GET /campaigns/{id}/status — poll until complete

Endpoints

Create webhook

POST/api/v1/webhooks

Registers a webhook URL for campaign events. Payloads are signed with X-Phish-Signature when a secret is set.

Headers

NameTypeDescription
X-API-KeyrequiredstringOrg API key

Request body

NameTypeDescription
namestringWebhook label
urlrequiredstringHTTPS endpoint
secretstringHMAC secret
eventsstringEvent filter or *

Responses

{ "id": "…", "url": "https://ops.example.com/hooks/phish" }

Example

terminal
curl -s -X POST \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  https://app-fish.pandaone.dev/api/v1/webhooks
  -d ''{"name":"Ops","url":"https://ops.example.com/hooks/phish","events":"*"}''

Get agent recipes

GET/api/v1/meta/agent

Returns field names, example payloads, and recommended call order for AI agents and integrations.

Headers

NameTypeDescription
X-API-KeyrequiredstringOrg API key

Responses

{ "recipes": [...], "endpoints": [...] }

Example

terminal
curl -s -X GET \
  -H "X-API-Key: YOUR_KEY" \
  https://app-fish.pandaone.dev/api/v1/meta/agent

Plan from goal

POST/api/v1/agent/plan

Turns a natural-language goal into ordered API steps an agent can execute.

Headers

NameTypeDescription
X-API-KeyrequiredstringOrg API key

Request body

NameTypeDescription
goalrequiredstringWhat you want to accomplish

Responses

{ "steps": ["GET /catalog", "POST /campaigns/quick"] }

Example

terminal
curl -s -X POST \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  https://app-fish.pandaone.dev/api/v1/agent/plan
  -d ''{"goal":"Run a Microsoft 365 drill for finance next week"}''