Update campaign
Update an existing Reach campaign (announcement, poll, data push or native push).
Method | Request URI | HTTP version |
|---|---|---|
PUT | https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{resource-group-name}/providers/Microsoft.MobileEngagement/appcollections/{app-collection}/apps/{app-resource-name}/campaigns/{kind}/{id}?api-version=2014-12-01 | HTTP/1.1 |
Parameter | Description |
|---|---|
kind | Kind of campaign. Valid values are: announcements, polls, dataPushes, and nativePushes. |
id | Campaign identifier as returned by a call to Create campaign. You can get a list of campaigns by calling List campaigns. |
Parameter | Description |
|---|---|
api-version | API version, the only supported value is 2014-12-01. |
The following table describes required and optional request headers.
Request Header | Description |
|---|---|
Authorization | See Authentication. |
Content-Type | application/json |
Accept (optional) | Its recommended to pass */* or application/json to have JSON error responses. |
JSON representation of the campaign. See Campaign format for further details.
A 200 status code is returned when the campaign is updated.
Code | Description |
|---|---|
200 | Updated successfully. |
400 | Can be caused by one of the following conditions:
Check response body for details. |
401 | Authentication error. |
409 | Another campaign with the same name already exists. |
For information about status codes, see Status and Error Codes.
Content-Type | application/json |
A JSON object containing the following properties if the request was successful.
Property | Description |
|---|---|
id | New campaign identifier. |
state | Campaign state after update. This will remain draft. |
PUT /subscriptions/84211edf-7c40-4c47-b152-a6a7233843b7/resourcegroups/MobileEngagement/providers/Microsoft.MobileEngagement/appcollections/myAppCollection/apps/myApp-android/campaigns/announcements/1?api-version=2014-12-01 HTTP/1.1
Host: management.azure.com
Accept: */*
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iL
{
"name": "MyCampaign",
"type": "only_notif",
"deliveryTime": "any",
"notificationType": "system",
"notificationTitle": "Welcome!",
"notificationMessage": "To this great app!"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1,
"state": "draft"
}