List campaigns

GET /api/v1/campaigns

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, sending, sent, failed
searchstringFilters on the campaign name
page / limitstringPagination, limit capped at 100

Query parameters

ParameterTypeDescription
statusstringdraft, scheduled, 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
data[].idstringIdentifier of the campaign
data[].namestringIts internal name
data[].subjectstringThe subject recipients see
data[].statusstringdraft, scheduled, sending, sent, failed
data[].listIdstringThe list it targets
data[].tagId / segmentIdstring \null
data[].scheduledAtstring \null
data[].sentAtstring \null
data[].createdAt / updatedAtstringISO dates
paginationobject{total, page, limit, totalPages}

Example response

json
{
  "success": true,
  "data": [
    {
      "id": "4d19c0a2",
      "name": "Newsletter",
      "subject": "August news",
      "status": "subscribed",
      "listId": "0b7c51e8",
      "tagId` / `segmentId": "value",
      "scheduledAt": "2026-08-23T10:22:05.000Z",
      "sentAt": "2026-08-23T10:22:05.000Z",
      "createdAt` / `updatedAt": "value"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1
  }
}