API reference / Outreach
Get the samples of a campaign
The latest samples that a teammate wrote for the campaign, each with its flags and what it took from the lead's material.
get
/api/v1/campaigns/{id}/samplesOther ways to call it
CLI
troopy campaigns get-samplesMCP tool
troopy_get_campaign_samplesRate limit240 calls in 60 seconds, for each key
Path parameters
id*stringA 24-character id
Response
200 · application/jsondata*object5 properties
status*enum<string>writing: poll statusUrl every few seconds
nonewritingdonefailed
step*integer | nullThe step they are for, from 0
emails*array<object>7 properties
lead*object3 properties
name*string | nullemail*string | nullcompany*string | nullstep*integersubject*stringbody*stringnote*string | nullused*array<object>3 properties
source*stringurl*string | nullquote*stringflags*array<string>error*string | nullat*string | nullWhen they were asked for
Errors
400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
404 not_foundCheck the path and any id in it. Every operation is listed in /api/v1/openapi.json.
429 rate_limitedWait the number of seconds in Retry-After, then retry.