REST API
Base URL: https://<your-slug>.pitchfire.app/api/v1. Alle responses zijn JSON.
Common parameters
page(int, default 1)pageSize(int, 1-100, default 25)search(string, full-text op naam)orderBy/orderDir(per-endpoint specifiek)
Endpoints
| Method | Path | Beschrijving |
|---|---|---|
| GET | /api/v1/campaigns | Lijst campagnes (paginatie, status filter) |
| POST | /api/v1/campaigns | Maak campagne aan |
| GET | /api/v1/campaigns/{id} | Detail van een campagne (incl. metrics) |
| PATCH | /api/v1/campaigns/{id} | Werk velden bij |
| DELETE | /api/v1/campaigns/{id} | Archiveer campagne (soft delete) |
| GET | /api/v1/assets | Lijst content-assets |
| POST | /api/v1/assets | Maak asset (whitepaper, video, tool) |
| GET | /api/v1/linkedin-posts | Geplande + gepubliceerde LinkedIn posts |
| POST | /api/v1/linkedin-posts | Plan een nieuwe post |
| GET | /api/v1/ad-campaigns | Gesynchroniseerde ad-campagnes (alle platforms) |
| GET | /api/v1/ad-metrics?days=30 | Geaggregeerde metrics over alle platforms |
| POST | /api/v1/ai/generate-copy | Stream Claude-gegenereerde ad-copy varianten |
| GET | /api/v1/ai/suggestions | Lijst openstaande AI-suggesties |
| POST | /api/v1/ai/suggestions/{id}/apply | Markeer suggestie als toegepast |
| GET | /api/v1/reports/{id}/pdf | White-label rapport als PDF |
| GET | /api/v1/webhooks | Lijst webhook-subscriptions |
| POST | /api/v1/webhooks | Maak webhook-subscription |
Voorbeeld: nieuwe campagne
curl https://acme.pitchfire.app/api/v1/campaigns \
-X POST \
-H "Authorization: Bearer pfk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Q3 Launch — NIS2 Classifier",
"status": "PLANNED",
"budgetCents": 5000000,
"budgetCurrency": "EUR",
"startDate": "2026-07-01",
"endDate": "2026-09-30",
"tags": ["nis2", "compliance", "ceo"]
}'Error responses
{
"error": {
"code": "VALIDATION_ERROR",
"message": "endDate moet na startDate liggen",
"fields": { "endDate": ["after_start_date"] }
}
}HTTP status codes: 200 success, 400 validatie, 401 unauthenticated, 403 plan-limiet/permissie, 404 niet gevonden, 429 rate-limit, 5xx server-fout.