List all campaigns

List campaigns

GET/workspaces/{workspaceId}/tcr-brands/{brandId}/campaigns
Authorization
Path parameters
workspaceId*string
brandId*string
Query parameters
Response

OK

Body
results*array of Campaign (object)
nextPageTokenstring

The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display.

Request
const response = await fetch('/workspaces/{workspaceId}/tcr-brands/{brandId}/campaigns', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "subscription": {
        "status": "active",
        "subscribedAt": "2024-09-13T15:46:03.137Z",
        "updatedAt": "2024-09-13T15:46:03.137Z",
        "cancelledAt": "2024-09-13T15:46:03.137Z"
      },
      "status": "DRAFT",
      "usecase": "text",
      "subUsecases": [
        "text"
      ],
      "description": "text",
      "embeddedLink": false,
      "embeddedPhone": false,
      "numberPool": false,
      "ageGated": false,
      "directLending": false,
      "subscriberOptin": false,
      "subscriberOptout": false,
      "subscriberHelp": false,
      "samples": [
        "text"
      ],
      "messageFlow": "text",
      "helpMessage": "text",
      "helpKeywords": "text",
      "optoutKeywords": "text",
      "optinKeywords": "text",
      "optinMessage": "text",
      "optoutMessage": "text",
      "termsAndConditions": false,
      "brandId": "123e4567-e89b-12d3-a456-426614174000",
      "rejection": {
        "description": "text",
        "code": "text"
      },
      "attachments": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "status": "PENDING",
          "createdAt": "2024-09-13T15:46:03.137Z",
          "updatedAt": "2024-09-13T15:46:03.137Z",
          "filename": "attachment.txt",
          "contentType": "text/plain"
        }
      ],
      "createdAt": "2024-09-13T15:46:03.137Z",
      "updatedAt": "2024-09-13T15:46:03.137Z"
    }
  ],
  "nextPageToken": "text"
}
TypeDescription

CampaignResponse object describes a submitted campaign

Last updated