Easymailing
S M S campaigns

Update an SMS campaign

PUT /sms_campaigns/{uuid}

PUT/sms_campaigns/{uuid}

Changes an SMS campaign that has not started sending: title, message, SMS sender, recipients or tracking. Nothing is sent. Send the complete campaign (title, audience, send_to and sms_config), not only the fields that change. If send_to stays send_to_segment or send_to_custom_segment and you send none of contact_segment, filter or list_segment, the current contact segment or filter is kept; choosing other recipients removes it.

When to use: To correct or complete an SMS campaign before it goes out, for example to fix the message or change the recipients.

When not to use: To change when it goes out, use schedule_sms_campaign. To start a new campaign from this one, use duplicate_sms_campaign. For an email campaign, use update_campaign.

Side effects: Nothing is sent to anyone. A scheduled campaign stays scheduled, with the new message.

Permissions: Requires the author role or higher, or the marketing.campaigns.write capability. Choosing contact_segment or filter also requires the contacts.read capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the SMS campaign (the uuid field returned by list_sms_campaigns).

Request Body

The updated SmsCampaign resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://api.easymailing.com/sms_campaigns/b6c9e1f3-2a74-4d58-8e0b-3f7a5d1c9e42" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "send_to": "send_to_all",    "list_segment": "/entity/1",    "sms_config": {      "message": "string",      "sms_sender": "/entity/1"    },    "sms_campaign_config": {      "track_clicks": true,      "track_ecommerce": true,      "track_google_analytics": true,      "google_analytics_tag": "string"    },    "contact_segment": "/entity/1",    "filter": {      "match": "all",      "conditions": [        {          "field": "string",          "operator": "string",          "value": null,          "audience": "0ff0092a-9631-4ad5-a4dd-fe4329a52f3b",          "match": "all",          "conditions": [            {}          ]        }      ]    },    "title": "string",    "audience": "/entity/1",    "groups": [      "/entity/1"    ]  }'
{  "sms_config": {    "message": "string",    "sms_sender": "/entity/1"  },  "sms_campaign_config": {    "track_clicks": true,    "track_ecommerce": true,    "track_google_analytics": true,    "google_analytics_tag": "string"  },  "sms_campaign_stats": {    "sent": 0,    "delivered": 0,    "failed": 0,    "failed_rate": 0.1,    "unsubscribed": 0,    "replies": 0,    "credits_consumed": 0,    "credits_reserved": 0,    "delivery_rate": 0.1,    "clicked": 0,    "click_rate": 0.1,    "to_send": 0  },  "id": 0,  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "title": "string",  "status": "campaign.status.draft",  "type": "campaign.regular",  "channel": "sms",  "send_to": "string",  "audience": "string",  "list_segment": "/entity/1",  "groups": [    "string"  ],  "hash": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "finished_at": "2019-08-24T14:15:22Z",  "contact_targeting": {    "kind": "segment",    "contact_segment": "/entity/1",    "contact_segment_name": "string",    "contact_segment_deleted": true,    "revision_status": "following_latest",    "pinned_at": "2019-08-24T14:15:22Z",    "error_code": "string",    "filter": {      "match": "all",      "conditions": [        {          "field": "string",          "operator": "string",          "value": null,          "audience": "0ff0092a-9631-4ad5-a4dd-fe4329a52f3b",          "match": "all",          "conditions": [            {}          ]        }      ]    }  }}