agentlyleads docs
Campaigns API

The Campaign object

A campaign is one email sent to an audience: everyone with a tag, a fixed list of contacts, or every contact with an email address.

Campaigns are draft-first, like all mail in agentlyleads. You create a campaign as a DRAFT and launch it when it is ready. Launching does not send anything: it queues one recipient per emailable, non-suppressed contact, and the send tick turns each into a draft email that a person approves in the app before it leaves.

FieldTypeNotes
idstringCUID (read-only)
namestringInternal name
subjectstringEmail subject. {{firstName}} is replaced per recipient
bodyHtmlstringEmail body as HTML. {{firstName}} works here too
statusstringDRAFT, SCHEDULED, SENDING, SENT, CANCELED, or OUTREACH (a container for one-to-one AI outreach drafts, never launched)
segmentobjectThe audience: { type, tagId, contactIds }. type is tag, static or all
fromEmailstring | nullThe sending identity, or null for the workspace default
offeringobject | nullThe product it promotes, { id, name }
scheduledAtstring (ISO 8601) | nullWhen a scheduled launch runs
recipientCountintegerRecipients queued so far (zero until launch)
createdAtstring (ISO 8601)Read-only
updatedAtstring (ISO 8601)Read-only

Lifecycle

FromActionTo
DRAFTLaunch nowSENDING
DRAFTLaunch with scheduledAtSCHEDULED (then SENDING when the time comes)
DRAFT, SCHEDULEDEditunchanged
DRAFT, SCHEDULED, SENDINGCancelCANCELED
DRAFTDeletegone

Once a campaign is SENDING it can no longer be edited. Create a new one instead.

Scopes

ScopeGrants
read:campaignsGET /api/v1/campaigns, GET /api/v1/campaigns/{id}
write:campaignsCreate, edit, delete, launch and cancel

Attachments

Files that go out with every recipient email are managed through the Files API with entity: "CAMPAIGN". They can be added or removed only before the campaign sends.

On this page