---
title: "Calculate Campaign Cost"
description: "Gets cost estimation for specified message"
canonical: "https://docs.cm.com/mobile-marketing-cloud/mmc-campaigns/campaigns/calculate-campaign-cost"
---

# Calculate Campaign Cost

> Gets cost estimation for specified message

Source: https://docs.cm.com/mobile-marketing-cloud/mmc-campaigns/campaigns/calculate-campaign-cost

### Gets cost estimation for specified message

```http
POST https://api.cm.com/messages/v1/accounts/{accountId}/messages/cost
```

#### Parameters

| Type | Name | Description | Schema |
| - | - | - | - |
| **Path** | **accountId**  <br />_required_ | The accountId. | string (uuid) |

#### Body parameter

The campaign object

_Name_ : campaign\
_Flags_ : required\
_Type_ : [CM.Platform.Campaigns.Models.ApiCampaignRequest](https://docs.cm.com/mobile-marketing-cloud/mmc-campaigns/object-definitions#cm-platform-messages-models-apimessagerequest)

#### Responses

| HTTP Code | Description | Schema |
| - | - | - |
| **200** | OK | [CM.Platform.Campaigns.Models.ApiCampaignCost](https://docs.cm.com/mobile-marketing-cloud/mmc-campaigns/object-definitions#cm-platform-messages-models-apimessagecost) |

#### Example HTTP request

##### Request path

```
https://api.cm.com/messages/v1/accounts/00000000-0000-0000-0000-000000000000/messages/cost
```

##### Request body

```json
{
  "isArchived" : true,
  "body" : "string",
  "channels" : [ "string" ],
  "countrySpecificSenders" : {
    "string" : "string"
  },
  "grouping" : "string",
  "ignoreUnsubscribes" : false,
  "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"
}
```

#### Example HTTP response

##### Response 200

```json
{
  "charsLeft" : 0,
  "charsToRemove" : 0,
  "countryCosts" : [ {
    "cost" : 0.0,
    "countryCode" : "string",
    "isMultipart" : true,
    "messageCount" : 0,
    "recipientCount" : 0
  } ],
  "currency" : "string",
  "isMultipart" : true,
  "messageCount" : 0,
  "minDeliveryTime" : 0,
  "recipientCount" : 0,
  "totalCost" : 0.0
}
```
