Recalculate campaign cost
POST/api/partner-gateway/v1/campaigns/:id/calculateGoal
Recalculates the estimated recipient count and total cost for the campaign based on its current configuration and the associated contact lists. You should call this endpoint every time you modify the campaign recipients (contactListIds or destinations) or change the sendingMode, because different channels have different per-message pricing and the recipient count may change if lists are added or removed. The response includes the updated campaign object with recalculated totalDestinations and cost fields. This is a prerequisite step before confirming a campaign: if you skip it, the confirm endpoint may reject the campaign because the cost has not been computed. After calling this, use GET /campaigns/{id}/price to retrieve just the price breakdown. Returns 404 if no campaign exists with the given ID under your account. Returns 401 if the API key is missing or invalid.
Request
Responses
- 200
- 401
- 404
Goal recalculated successfully
Unauthorized
Campaign not found