Passa al contenuto principale

Aggiorna una campagna

PUT 

/api/partner-gateway/v1/campaigns/:id

Updates the details of an existing campaign. Only campaigns that are still in draft status (status=0) or scheduled status (status=1) can be modified. Campaigns that are currently being sent (status=2), completed (status=3), or failed (status=4) cannot be updated. You can use this endpoint to change the campaign name, description, message body, sender, recipient contact lists, sending mode, scheduled date, or the readyToSend flag. A common workflow is to create a campaign as a draft (readyToSend=false), iterate on its configuration using this endpoint, then set readyToSend=true when the campaign is finalized, and finally call PUT /campaigns/{id}/confirm to dispatch it. After updating recipient lists or message content, call POST /campaigns/{id}/calculateGoal to refresh the recipient count and cost estimate. Returns 400 if the request body is invalid or if the campaign is in a non-editable state. Returns 404 if no campaign exists with the given ID under your account. Returns 401 if the API key is missing or invalid.

Richiesta

Risposte

Campagna aggiornata con successo