Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Outreach

Grant Autopilot

Lets a running campaign send its emails without a person approving each one, up to a date at most 30 days out and a number a day within its mailboxes' caps, once people approved at least 10 leads' emails since its steps last changed. Drafts without flags waiting now are approved by it; flagged ones always wait for a person. It ends by itself when its date comes, its steps change, the campaign pauses, one of its mailboxes stops, or 3 of its last 100 emails were unsubscribed from, and what it approved that hasn't gone goes back to draft. Owners and admins.

post/api/v1/campaigns/{id}/autopilot

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy campaigns autopilot
MCP toolNone. Call it over REST or with the CLI.
Rate limit20 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Path parameters

id*string

A 24-character id

Body

application/json
until*string

When it ends, at most 30 days out

dailyCap*integer

Emails it may send a day

At least 1 · At most 10000

Response

200 · application/json
data*object
14 properties
id*string

A 24-character id

name*string
list*object | null

The list of people it is for

2 properties
id*string

A 24-character id

name*string
where*array<object>
3 properties
column*string
op*enum<string>

isis_notcontainsgtltemptynot_empty

valuestring | number | boolean | null
steps*array<object>
6 properties
kind*"email"
wait*integer
write*enum<string>

fixed: the body is the email, with variables filled in for each lead. ai: a teammate writes the email for each lead from the brief

fixedai

brief*string | null
subject*string | null
body*string | null
mailboxes*array<string>

The mailboxes it sends from

window*object
4 properties
days*array<integer>
start*integer
end*integer
timezone*string
status*enum<string>

draftactivepauseddone

stats*object
7 properties
enrolled*integer
active*integer
replied*integer
bounced*integer
unsubscribed*integer
sent*integer
review*integer

Drafts waiting for a person

writer*object

The emails that a teammate writes for each lead

2 properties
busy*boolean

A teammate writes emails of it now

error*string | null

Why its emails could not be written lately. The teammate tries again after 10 minutes

autopilot*object | null

An owner's or admin's grant to send without a person approving each email; null when never granted

7 properties
on*boolean

In force now

until*string

ISO 8601 date and time

dailyCap*integer
grantedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
grantedAt*string

ISO 8601 date and time

endedAt*string | null
why*string | null

Why it ended

createdBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

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.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.