Developer Docs

Table of contents

Method: PUT 

Endpoint: /api/campaigns/{id}/stop 

Description: Method for canceling a campaign that is in Moderation/Paused/Sending/Planned status. You cannot cancel a campaign that is in any other status. When a campaign is canceled, the sending of messages stops without the possibility of resuming it and the campaign status changes to “Stopped”.

Query string parameters

Parameter Mandatory Type Description. 
id Yes integer campaign id received in response to the request: 
POST /api/campaigns/rcs/send
POST /api/messages/rcs/send
POST /api/campaigns/rcs/send-groups 

Answer elements

Parameter Type Description. 
id integer campaign id. 
name string The name of the campaign. Example: “RCS api campaign / {yyyyy-mm-dd hh:mm:ss}”, where yyyy-mm-dd hh:mm:ss is the date and time of the campaign creation. 
sender string Name of the agent. 
status string The current status of the campaign. Possible values:  creation – the campaign has been created; spam – the campaign has not been moderated; scheduled – the campaign is scheduled; sending – the campaign has started sending messages; paused – the campaign is paused (no messages are sent); stopped – the campaign is stopped (final status); done – the campaign is complete (final status). 
message_type string Type of messages in the campaign. Possible values: sms, rcs 
start_at string Campaign start date and time in the format: yyyy-mm-dd hh:mm:ss 
real_start_at string Actual date and time of the campaign start in the format: yyyy- mm- dd hh:mm:ss 
finished_at null|strin g Campaign end date in the format: yyyy-mm-dd hh:mm:ss 
created_at string Date and time of campaign creation in the format: yyyy-mm-dd hh:mm:ss. 
statistics array Array of Campaign Statistics Objects. 
statistics[]delivered integer The total number of messages delivered to end users as part of a status campaign: 
DELIVERED 
READ 
statistics[]sent integer Total number of messages sent as part of the campaign in statuses: 
DELIVERED 
SENT
ACCEPTED
SENDING
UNDELIVERED
FAILED
EXPIRED
UNKNOWN 
calculated_price float Preliminary cost of the campaign. 
alternative_channels object An object containing information about campaign messages that were sent via an alternative channel. 
alternative_channels[]sms object The object specifies the channel for alternative message sending within the campaign. 
alternative_channels[]sms[]stat istics object An object of statistics of messages sent via an alternative channel. 
alternative_channels[]sms[]stat istics[]sent integer Total number of messages sent as part of the campaign in statuses: 
DELIVERED
SENT
ACCEPTED
SENDING
UNDELIVERED
FAILED
EXPIRED
UNKNOWN 
alternative_channels[]sms[]stat istics[]delivered integer Total number of messages delivered as part of the campaign in statuses:
DELIVERED 
READ 

An example of an answer 

If the request is successfully executed:

{
   "data":{
      "id":1,
      "name":"string",
      "sender":"string",
      "status":"creation",
      "message_type":"rcs",
      "start_at":"2021-04-27 19:44:06",
      "real_start_at":"2021-04-27 19:44:06",
      "finished_at":"2021-04-27 19:44:06",
      "created_at":"2021-04-27 19:44:06",
      "statistics":{
         "delivered":0,
         "sent":0
      },
      "calculated_price":123.4,
      "alternative_channels":{
         "sms":{
            "statistic":{
               "delivered":0,
               "sent":0
            }
         }
      }
   }
}