Send Test Campaign

Sends a test campaign.

POST https://api.cm.com/messages/v1/accounts/{accountId}/messages/test

Parameters

TypeNameDescriptionSchema
PathaccountId
required
The accountId.string (uuid)

Body parameter

The Campaign.

Name : testCampaign
Flags : required
Type : CM.Platform.Campaigns.Models.ApiTestCampaignRequest

Responses

HTTP CodeDescriptionSchema
201CreatedCM.Platform.Campaigns.Models.ApiCampaignResponse

Example HTTP request

Request path
https://api.cm.com/messages/v1/accounts/00000000-0000-0000-0000-000000000000/messages/test
Request body
{
  "message" : {
    "isArchived" : true,
    "body" : "string",
    "channels" : [ "string" ],
    "countrySpecificSenders" : {
      "string" : "string"
    },
    "grouping" : "string",
    "ignoreUnsubscribes" : true,
    "name" : "string",
    "recipients" : [ {
      "contact" : "00000000-0000-0000-0000-000000000000",
      "data" : {
        "string" : "string"
      },
      "group" : "00000000-0000-0000-0000-000000000000",
      "msisdn" : "string"
    } ],
    "recurrence" : "string",
    "content" : [ {
      "media" : {
        "mediaName" : "string",
        "mediaUri" : "string",
        "mimeType" : "string"
      },
      "whatsAppTemplate" : {
        "templateId" : "00000000-0000-0000-0000-000000000000",
        "languageCode" : "string",
        "languageFixed" : true,
        "parameters" : [ {
          "text" : "string",
          "currency" : "string",
          "currencyAmount" : "string",
          "currencyCode" : "string",
          "currencyDecimalSeparator" : "string",
          "dateTime" : "string",
          "dateOptions" : {
            "showDayOfWeek" : true,
            "showYear" : true,
            "showMonth" : true,
            "showDayOfMonth" : true,
            "showHour" : true,
            "showMinute" : true
          }
        } ]
      },
      "text" : "string"
    } ],
    "scheduledAtUtc" : "string",
    "senderPreset" : "00000000-0000-0000-0000-000000000000",
    "senders" : [ "string" ],
    "spread" : {
      "durationMinutes" : 0,
      "timeFrames" : [ {
        "days" : [ "string" ],
        "startTime" : "string",
        "endTime" : "string"
      } ],
      "until" : "string"
    },
    "status" : "string",
    "options": {
      "urlShortenerDomainId": "00000000-0000-0000-0000-000000000000"
    },
    "updatedAtUtc" : "string"
  },
  "testRecipients" : [ {
    "contact" : "00000000-0000-0000-0000-000000000000",
    "data" : {
      "string" : "string"
    },
    "group" : "00000000-0000-0000-0000-000000000000",
    "msisdn" : "string"
  } ]
}

Example HTTP response

Response 201
{
  "id" : "00000000-0000-0000-0000-000000000000",
  "isStatsComplete" : true,
  "isArchived" : true,
  "analytics" : {
    "accepted" : 0,
    "converted" : 0,
    "countryErrorStats" : [ {
      "country" : "string",
      "count" : 0,
      "errorCode" : 0
    } ],
    "countryStats" : [ {
      "country" : "string",
      "accepted" : 0,
      "converted" : 0,
      "delivered" : 0,
      "deliveryTime" : 0.0,
      "dispatched" : 0,
      "failed" : 0,
      "messages" : 0,
      "optedOut" : 0,
      "optOutReceived" : 0,
      "recipients" : 0
    } ],
    "deduplicated" : 0,
    "delivered" : 0,
    "deliveryTime" : 0.0,
    "dispatched" : 0,
    "euroPrice" : 0.0,
    "failed" : 0,
    "localCurrency" : "string",
    "localPrice" : 0.0,
    "messages" : 0,
    "optedOut" : 0,
    "optOutReceived" : 0,
    "recipients" : 0,
    "test" : 0,
    "updatedAtUtc" : "string"
  },
  "preview" : {
    "previews" : [ "string" ],
    "previewCode" : "string",
    "sender" : "string",
    "recipientsPerCountry" : [ {
      "count" : 0,
      "countryCode" : "string"
    } ],
    "languages" : [ "string" ]
  },
  "body" : "string",
  "channels" : [ "string" ],
  "countrySpecificSenders" : {
    "string" : "string"
  },
  "grouping" : "string",
  "ignoreUnsubscribes" : true,
  "name" : "string",
  "recipients" : [ {
    "contact" : "00000000-0000-0000-0000-000000000000",
    "data" : {
      "string" : "string"
    },
    "group" : "00000000-0000-0000-0000-000000000000",
    "msisdn" : "string"
  } ],
  "recurrence" : "string",
  "content" : [ {
    "media" : {
      "mediaName" : "string",
      "mediaUri" : "string",
      "mimeType" : "string"
    },
    "whatsAppTemplate" : {
      "templateId" : "00000000-0000-0000-0000-000000000000",
      "languageCode" : "string",
      "languageFixed" : true,
      "parameters" : [ {
        "text" : "string",
        "currency" : "string",
        "currencyAmount" : "string",
        "currencyCode" : "string",
        "currencyDecimalSeparator" : "string",
        "dateTime" : "string",
        "dateOptions" : {
          "showDayOfWeek" : true,
          "showYear" : true,
          "showMonth" : true,
          "showDayOfMonth" : true,
          "showHour" : true,
          "showMinute" : true
        }
      } ]
    },
    "text" : "string"
  } ],
  "scheduledAtUtc" : "string",
  "senderPreset" : "00000000-0000-0000-0000-000000000000",
  "senders" : [ "string" ],
  "spread" : {
    "durationMinutes" : 0,
    "timeFrames" : [ {
      "days" : [ "string" ],
      "startTime" : "string",
      "endTime" : "string"
    } ],
    "until" : "string"
  },
  "status" : "string",
  "options": {
    "urlShortenerDomainId": "00000000-0000-0000-0000-000000000000"
  },
  "createdAtUtc" : "string",
  "createdBy" : "00000000-0000-0000-0000-000000000000",
  "updatedAtUtc" : "string"
}