Skip to content

CLI Campaigns

Manage campaigns that live inside a graph8 repository. You can list summaries, retrieve full detail (including all documents), fetch a single campaign document, create a new campaign, apply partial updates, and launch a campaign — all scoped to a repo_id.


List Campaigns

GET /repos/{repo_id}/campaigns

Returns a paginated array of campaign summaries for the given repository.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger50Items per page

Example

Terminal window
curl "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns?page=1&limit=50" \
-H "Authorization: Bearer $API_KEY"

Response

[
{
"id": "camp_001",
"name": "Q3 Outbound Push",
"category": "Outbound",
"brief": "Drive pipeline for the Q3 push.",
"core_concept": "Land-and-expand via champions",
"primary_hook": "Cut your CAC by 40%",
"target_persona": "VP Sales at Series B SaaS",
"goal": "50 meetings booked"
}
]

Get Campaign

GET /repos/{repo_id}/campaigns/{campaign_id}

Returns full campaign detail, including all associated documents.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID
campaign_idstringThe campaign ID

Example

Terminal window
curl "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns/camp_001" \
-H "Authorization: Bearer $API_KEY"

Response

{
"id": "camp_001",
"name": "Q3 Outbound Push",
"category": "Outbound",
"brief": "Drive pipeline for the Q3 push.",
"core_concept": "Land-and-expand via champions",
"primary_hook": "Cut your CAC by 40%",
"target_persona": "VP Sales at Series B SaaS",
"goal": "50 meetings booked",
"documents": [
{
"id": "doc_001",
"title": "Outreach Sequence",
"content": "..."
}
]
}

Get Campaign Document

GET /repos/{repo_id}/campaigns/{campaign_id}/documents/{document_id}

Returns a single campaign document with its full content.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID
campaign_idstringThe campaign ID
document_idstringThe document ID

Example

Terminal window
curl "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns/camp_001/documents/doc_001" \
-H "Authorization: Bearer $API_KEY"

Response

{
"id": "doc_001",
"title": "Outreach Sequence",
"content": "Full document content here..."
}

Create Campaign

POST /repos/{repo_id}/campaigns

Create a new campaign in the given repository.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID

Request Body

FieldTypeRequiredDescription
namestringYesCampaign name
categorystringNoCampaign category (default: "Outbound")
briefstringNoShort campaign brief
core_conceptstringNoCore strategic concept
primary_hookstringNoThe primary hook or value proposition
target_personastringNoDescription of the target persona
goalstringNoCampaign goal or success metric

Example

Terminal window
curl -X POST "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Q3 Outbound Push",
"category": "Outbound",
"brief": "Drive pipeline for the Q3 push.",
"core_concept": "Land-and-expand via champions",
"primary_hook": "Cut your CAC by 40%",
"target_persona": "VP Sales at Series B SaaS",
"goal": "50 meetings booked"
}'

Response

{
"id": "camp_001",
"name": "Q3 Outbound Push",
"category": "Outbound",
"brief": "Drive pipeline for the Q3 push.",
"core_concept": "Land-and-expand via champions",
"primary_hook": "Cut your CAC by 40%",
"target_persona": "VP Sales at Series B SaaS",
"goal": "50 meetings booked"
}

Update Campaign

PATCH /repos/{repo_id}/campaigns/{campaign_id}

Partially update a campaign. Only include the fields you want to change. Uses the same partial-update body as PATCH /campaigns/{id} on the GTM surface.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID
campaign_idstringThe campaign ID

Request Body

All fields are optional. Include only the fields to update.

FieldTypeDescription
namestringCampaign name
categorystringCampaign category
briefstringShort campaign brief
core_conceptstringCore strategic concept
primary_hookstringThe primary hook or value proposition
target_personastringDescription of the target persona
goalstringCampaign goal or success metric

Example

Terminal window
curl -X PATCH "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns/camp_001" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"primary_hook": "Reduce churn by 25%",
"goal": "60 meetings booked"
}'

Response

{
"id": "camp_001",
"name": "Q3 Outbound Push",
"primary_hook": "Reduce churn by 25%",
"goal": "60 meetings booked"
}

Launch Campaign

POST /repos/{repo_id}/campaigns/{campaign_id}/launch

Launch a campaign. No request body required. Follows the same launch flow as POST /campaigns/{id}/launch on the GTM surface.

Path Parameters

ParameterTypeDescription
repo_idstringThe repository ID
campaign_idstringThe campaign ID

Example

Terminal window
curl -X POST "https://be.graph8.com/api/v1/repos/repo_abc123/campaigns/camp_001/launch" \
-H "Authorization: Bearer $API_KEY"

Response

{
"status": "launched"
}