trackagoat logotrackagoat/Docs

Getting started

  • Welcome
  • Quickstart
  • Core concepts

Guides

  • Creators
  • Videos
  • Campaigns
  • Creator Goals
  • Tracking Inbox
  • Content calendar
  • How scraping works
  • Analytics & metrics
  • Similar creator pools
  • Over-posting & suppression
  • Program Health
  • Sentiment Radar
  • API keys
  • Limits & plan tiers
  • Notifications
  • Payouts

API reference

  • Overview
  • Authentication
  • Errors
  • Projects
  • Creators
  • Videos
  • Campaigns
  • Analytics
  • Aggregate Analytics
  • Goal Compliance
  • Payouts
  • Schema

For agents

  • Agent guide
  • Data model
  • MCP & tooling

Platform

  • Brand
  • Changelog
  • Support
DocsAPI reference

Campaigns

Create, update, and delete campaigns. Manage campaign membership (items).

PreviousVideosNextAnalytics

On this page

  • GET /api/v1/campaigns
  • Request
  • Query parameters
  • Response fields
  • POST /api/v1/projects/{projectId}/campaigns
  • PATCH /api/v1/campaigns/{id}
  • Body
  • DELETE /api/v1/campaigns/{id}
  • POST /api/v1/campaigns/{id}/items
  • DELETE /api/v1/campaigns/{id}/items
  • Analytics (time-series)

GET /api/v1/campaigns

List campaigns in your organization.

Request

bash
curl -H "Authorization: Bearer tga_<key>" \
  "https://www.trackagoat.com/api/v1/campaigns?project_id=<uuid>"

Query parameters

ParameterTypeDefaultDescription
project_iduuid:Filter to a specific project
limitnumber50Items per page (max 100)
cursorstring:Pagination cursor

Response fields

FieldTypeDescription
iduuidCampaign ID
project_iduuidProject this campaign belongs to
namestringCampaign name
readmestring | nullMarkdown notes / agent context (rendered in the Notes tab)
metadataobjectAgent-writable structured data
created_at

POST /api/v1/projects//campaigns

Create a campaign. Requires the write scope.

bash
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"

PATCH /api/v1/campaigns/

Update a campaign. At least one field required. Requires the write scope.

Body

FieldTypeDescription
namestringCampaign name (max 200 chars).
readmestring | nullMarkdown notes. Pass null to clear.
target_viewsnumber | nullTarget total view goal for the campaign.
target_atISO 8601 datetime | nullTarget completion date.

DELETE /api/v1/campaigns/

Delete a campaign and all its item memberships. Requires the write scope.

bash
curl -X DELETE -H "Authorization: Bearer tga_<key>" \
  https://www.trackagoat.com/api/v1/campaigns/<uuid>

POST /api/v1/campaigns//items

Add a creator, video, or sub-campaign to a campaign. Requires the write scope.

bash
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 fieldTypeDescription
item_typecreator | video | campaignThe type of item to add.
item_iduuidID of the creator, video, or sub-campaign.

Returns 409 if the item is already in the campaign or would create a circular reference.


DELETE /api/v1/campaigns//items

Remove an item from a campaign. Pass the item_type and item_id in the request body. Requires the write scope.

bash
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>/items

Analytics (time-series)

Campaign 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.

bash
# 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}/stats returned 410 Gone as of v1.2. Use GET /api/v1/analytics?entity=campaign&entity_id={id} instead.

ISO 8601
Creation timestamp
updated_atISO 8601Last update
-H
"Authorization: Bearer tga_<key>"
\
"https://www.trackagoat.com/api/v1/analytics?entity=campaign&entity_ids=<uuid1>,<uuid2>,<uuid3>&metric=views&granularity=week"