List campaigns

GET /api/v1/campaigns Lists campaigns in your organization, with the saved preview text under both compatible names.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERAllowed
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Query parameters

ParameterTypeDescription
statusstringdraft, scheduled, paused, sending, sent, failed
searchstringMatches the campaign name, case-insensitive
pagenumberDefaults to 1
limitnumberDefaults to 20, capped at 100

Example

bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
  "https://www.agentsmail.io/api/v1/campaigns?status=sent&limit=20"

Response

  • 200 OK — the call succeeded.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 429 Too Many Requests — over 120 requests in a minute for this key.

Response fields

data is an array of campaigns, with a pagination object next to it.
FieldTypeDescription
successbooleanIndicates if the operation was successful
dataarrayCampaign objects.
data[].campaignUrlstring | nullCampaign page.
data[].campaignEditorUrlstring | nullContent editor for an editable draft.
data[].campaignStatsUrlstring | nullStatistics for a sent campaign.
data[].campaignPreviewUrlstring | nullInternal preview of a sent campaign.
data[].publicCampaignUrlstring | nullShareable archive for a sent campaign with public archives enabled.
data[].idstringIdentifier of the campaign
data[].namestringIts internal name
data[].subjectstringThe subject recipients see
data[].previewTextstring | nullSaved preview text
data[].preheaderstring | nullCompatible alias, equal to data[].previewText
data[].statusstringdraft, scheduled, paused, sending, sent, failed
data[].listIdstringThe list it targets
data[].tagIdstring | nullOptional tag narrowing the audience.
data[].topicIdstring | nullThe editorial topic it carries, if any
data[].scheduledAtstring \null
data[].sentAtstring \null
data[].createdAt / updatedAtstringISO dates
paginationobject{total, page, limit, totalPages}
All five links are absolute URLs in the organization’s language (en by default). Unavailable links are null; all are null when the organization has no URL slug. Internal links require sign-in and appropriate organization access; only publicCampaignUrl is public. API and MCP agents should display relevant non-null URLs as clickable Markdown links, for example [Open campaign](campaignUrl) using the returned URL. Creating or reading a campaign does not publish it.

Example response

json
{
  "success": true,
  "data": [
    {
      "id": "4d19c0a2",
      "name": "Newsletter",
      "subject": "August news",
      "previewText": "Three new things this month",
      "preheader": "Three new things this month",
      "status": "sent",
      "listId": "0b7c51e8",
      "scheduledAt": "2026-08-23T10:22:05.000Z",
      "sentAt": "2026-08-23T10:22:05.000Z",
      "tagId": null,
      "createdAt": "2026-08-23T10:20:05.000Z",
      "updatedAt": "2026-08-23T10:22:05.000Z",
      "campaignUrl": "https://www.agentsmail.io/en/team/my-team/campaigns/4d19c0a2",
      "campaignEditorUrl": null,
      "campaignStatsUrl": "https://www.agentsmail.io/en/team/my-team/campaigns/4d19c0a2/stats",
      "campaignPreviewUrl": "https://www.agentsmail.io/en/team/my-team/campaigns/4d19c0a2/preview",
      "publicCampaignUrl": "https://www.agentsmail.io/en/public/my-team/newsletter"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1
  }
}