
Create, update, and delete campaigns. Manage campaign membership (items).
List campaigns in your organization.
curl -H "Authorization: Bearer tga_<key>" \
"https://www.trackagoat.com/api/v1/campaigns?project_id=<uuid>"| Parameter | Type | Default | Description |
|---|---|---|---|
project_id | uuid | : | Filter to a specific project |
limit | number | 50 | Items per page (max 100) |
cursor | string | : | Pagination cursor |
| Field | Type | Description |
|---|---|---|
id | uuid | Campaign ID |
project_id | uuid | Project this campaign belongs to |
name | string | Campaign name |
readme | string | null | Markdown notes / agent context (rendered in the Notes tab) |
metadata | object | Agent-writable structured data |
created_at |
Create a campaign. Requires the write scope.
curl -X POST \
-H "Authorization: Bearer tga_<key>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name": "Summer Drop Campaign"}' \
"https://www.trackagoat.com/api/v1/projects/<projectId>/campaigns"Update a campaign. At least one field required. Requires the write scope.
| Field | Type | Description |
|---|---|---|
name | string | Campaign name (max 200 chars). |
readme | string | null | Markdown notes. Pass null to clear. |
target_views | number | null | Target total view goal for the campaign. |
target_at | ISO 8601 datetime | null | Target completion date. |
Delete a campaign and all its item memberships. Requires the write scope.
curl -X DELETE -H "Authorization: Bearer tga_<key>" \
https://www.trackagoat.com/api/v1/campaigns/<uuid>Add a creator, video, or sub-campaign to a campaign. Requires the write scope.
curl -X POST \
-H "Authorization: Bearer tga_<key>" \
-H "Content-Type: application/json" \
-d '{"item_type": "creator", "item_id": "<uuid>"}' \
https://www.trackagoat.com/api/v1/campaigns/<campaignId>/items| Body field | Type | Description |
|---|---|---|
item_type | creator | video | campaign | The type of item to add. |
item_id | uuid | ID of the creator, video, or sub-campaign. |
Returns 409 if the item is already in the campaign or would create a circular reference.
Remove an item from a campaign. Pass the item_type and item_id in the request body. Requires the write scope.
curl -X DELETE \
-H "Authorization: Bearer tga_<key>" \
-H "Content-Type: application/json" \
-d '{"item_type": "creator", "item_id": "<uuid>"}' \
https://www.trackagoat.com/api/v1/campaigns/<campaignId>/itemsCampaign time-series analytics have moved to the unified endpoint. The new endpoint also supports breakdown by video or creator, multi-granularity buckets, and prior-period comparison.
# Daily new views for a campaign
curl -H "Authorization: Bearer tga_<key>" \
"https://www.trackagoat.com/api/v1/analytics?entity=campaign&entity_id=<uuid>&metric=views&mode=new&granularity=day"
# Monthly cumulative views
curl -H "Authorization: Bearer tga_<key>" \
"https://www.trackagoat.com/api/v1/analytics?entity=campaign&entity_id=<uuid>&metric=views&mode=cumulative&granularity=month"
# Top-10 video breakdown
curl -H "Authorization: Bearer tga_<key>" \
"https://www.trackagoat.com/api/v1/analytics?entity=campaign&entity_id=<uuid>&metric=views&breakdown=video&top_n=10"
# Engagement rate (derived)
curl -H "Authorization: Bearer tga_<key>" \
"https://www.trackagoat.com/api/v1/analytics?entity=campaign&entity_id=<uuid>&metric=engagement_rate_by_views&mode=rate"
# Multi-entity overlay: compare up to 5 campaigns side-by-side
curl
See the Analytics API reference for the full parameter and response documentation.
Removed:
GET /api/v1/campaigns/{id}/statsreturned410 Goneas of v1.2. UseGET /api/v1/analytics?entity=campaign&entity_id={id}instead.
| ISO 8601 |
| Creation timestamp |
updated_at | ISO 8601 | Last update |