Campaign Documents
Campaign Documents
MachFive generates research and strategy documents at the campaign level (target audience research, social proof, lead magnets, offer creation, campaign strategy). This endpoint lists those documents with their status and, for ready documents, a short-lived signed download URL.
For the workspace-level company summary and market research, see Workspace Documents.
Download URLs are short-lived. Each
download_urlis a signed link valid for ~5 minutes. Fetch the document promptly, or call the endpoint again to get a fresh link. URLs are generated server-side and scoped to your workspace.
List campaign documents
GET /api/v1/campaigns/:id/documents · scope campaigns:read
Returns the generated documents for one campaign.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Campaign ID. |
Example request
curl -X GET "https://app.machfive.io/api/v1/campaigns/CAMPAIGN_ID/documents" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200 OK)
{
"campaign_id": "uuid",
"documents": [
{
"type": "target_audience_research",
"title": "Target Audience Research",
"status": "ready",
"download_url": "https://.../signed-url"
},
{
"type": "campaign_strategy",
"title": "Campaign Strategy",
"status": "processing",
"download_url": null
}
]
}Document type values: target_audience_research, social_proof, lead_magnets, offer_creation, campaign_strategy.
Document status
| Status | Meaning |
|---|---|
ready | The document exists; download_url is a short-lived signed link. |
processing | The document is being generated (or re-generated); download_url is null. |
unavailable | The document has not been generated; download_url is null. |
Error responses
| Status | Error | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the campaigns:read scope. |
| 404 | NOT_FOUND | Campaign not found or not in this workspace. |
| 500 | INTERNAL_ERROR | Server error. |