List campaigns

SDK platic.campaigns.list()

Get the active campaigns of the workspace, page by page.

Example

await platic.campaigns.list();

Query parameters

ParameterTypeDescriptionRequired
limitnumberCampaigns per page, from 1 to 200. Default: 50—
pageTokenstringThe nextPageToken from the previous page. Send it with the same sortBy, sortDirection, limit, and workspace—
sortByenumField to sort by: lastUpdate (default), creationDate, or title—
sortDirectionenumSort direction: desc (default) or asc—
workspacestringOnly if the credential covers several workspaces: the workspace you read. It is required there—

You read one workspace per request. With a single-workspace credential you do not send workspace; with a multi-workspace one, the answer without it is 400.

Response

{
  "status": "success",
  "data": [
    {
      "id": "EgIOvaKPmrQFfuh6D023",
      "title": "tax_id_request",
      "category": "UTILITY",
      "platform": "whatsapp",
      "templateName": "tax_id_request",
      "owners": ["support@acme.com"],
      "language": "en_US",
      "creationDate": "2026-02-11T18:55:52.061Z",
      "lastUpdate": "2026-02-11T19:46:29.285Z"
    },
    {
      "id": "FhJPrbLQnsRGgvi7E134",
      "title": "Summer promo",
      "category": "MARKETING",
      "platform": "whatsapp",
      "templateName": "summer_promo_2026",
      "owners": [],
      "creationDate": "2026-02-14T10:00:00.000Z",
      "lastUpdate": "2026-02-14T12:00:00.000Z"
    }
  ],
  "nextPageToken": null
}

Response fields

FieldDescription
dataThe campaigns on this page
nextPageTokenToken to request the next page; null on the last one

Each item in data

FieldDescription
idInternal ID of the campaign
titleCampaign title
categoryCategory: MARKETING, UTILITY, or AUTHENTICATION
platformSend platform
templateNameName of the associated template, or null
ownersList of responsible-user emails
languageTemplate language when it applies (may be omitted)
wabaIdThe campaign's WhatsApp Business account, when it has one
creationDateCreation date in ISO 8601 format
lastUpdateLast update date in ISO 8601 format

Errors

Statusdetails.codeWhen
400INVALID_REQUESTA parameter is not valid, the pageToken is not from this list (another order, another limit, or another workspace), or the credential covers several workspaces and workspace is missing or is not one of them (details.available lists the valid ones)
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have the Campaigns permission in that workspace
{
  "code": 400,
  "error": "Bad Request - The request has validation errors",
  "details": {
    "code": "INVALID_REQUEST",
    "message": "Must specify a valid workspace (multi-workspace API key)",
    "available": ["ws_abc123", "ws_def456"]
  }
}

See Errors for the full shape of an error.