> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Used to update a campaign that has already been created. Parameters are the same as those available in the create method.

Review the [campaign model properties](https://docs.xtremepush.com/reference/campaign-model) page to see the available parameters.

## OpenAPI

````json POST /update/campaign
{
  "openapi": "3.1.0",
  "info": {
    "title": "external-api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.eu.xtremepush.com/api/external"
    }
  ],
  "paths": {
    "/update/campaign": {
      "post": {
        "summary": "Update",
        "description": "Used to update a campaign that has already been created. Parameters are the same as those available in the create method.\n\nReview the [campaign model properties](https://docs.xtremepush.com/reference/campaign-model) page to see the available parameters.",
        "operationId": "campaign-update",
        "deprecated": "false",
        "requestBody": {
          "required": "true",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apptoken",
                  "id"
                ],
                "properties": {
                  "apptoken": {
                    "type": "string",
                    "description": "Your App token"
                  },
                  "id": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The ID of the campaign you want to update"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": "true",
                      "default": "true"
                    },
                    "code": {
                      "type": "integer",
                      "example": "200",
                      "default": "0"
                    },
                    "message": {
                      "type": "string",
                      "example": "Campaign is successfully updated"
                    },
                    "model": {
                      "type": "object"
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "success": "true",
                      "code": "200",
                      "message": "Campaign is successfully updated",
                      "model": {
                        "id": "58943956",
                        "project_id": "PROJECT_ID",
                        "type": "1",
                        "trigger": "3",
                        "send_type": "2",
                        "active": "1",
                        "sending": "0",
                        "draft": "0",
                        "status": "0",
                        "is_open": "0",
                        "title": "Updated API example",
                        "ab": "0",
                        "languages_multi": "0",
                        "content_fetch": "0",
                        "encryption": "1",
                        "ios_push": "0",
                        "android_push": "1",
                        "web_push": "0",
                        "inbox": "0",
                        "email": "1",
                        "sms": "1",
                        "facebook": "0",
                        "whatsapp": "0",
                        "webhook": "0",
                        "broadcast": "0",
                        "conversions": "0",
                        "start_date": "2021-10-14",
                        "start_date_time": "00:00",
                        "start_time": "00:00",
                        "end_time": "23:59",
                        "send_days": [
                          "1",
                          "2",
                          "3",
                          "4",
                          "5",
                          "6",
                          "7"
                        ],
                        "retry_for": "4",
                        "retry_for_period": "weeks",
                        "activate_time": "1634201103",
                        "last_modified": "1634202413",
                        "messages": {
                          "2": {
                            "push_title": "Android push title",
                            "push_text": "Android push text"
                          },
                          "6": {
                            "push_title": "<p>Inbox title</p>",
                            "push_text": "<p>Inbox text</p>",
                            "push_icon": "https://example.com/image.png",
                            "inbox_type": "1"
                          },
                          "7": {
                            "email_type": "1",
                            "email_template": "{\"page\":{\"body\":{\"container\":{\"style\":{\"background-color\":\"#f2f2f2\"}},\"content\":{\"computedStyle\":{\"linkColor\":\"#0645AD\",\"messageBackgroundColor\":\"#ffffff\",\"messageWidth\":\"600px\"},\"style\":{\"color\":\"#000000\",\"font-family\":\"Arial, Helvetica Neue, Helvetica, sans-serif\"}},\"type\":\"mailup-bee-page-proprerties\",\"webFonts\":[]},\"description\":\"Base Template\",\"rows\":[{\"columns\":[{\"grid-columns\":12,\"modules\":[{\"descriptor\":{\"computedStyle\":{\"hideContentOnMobile\":false},\"style\":{\"padding-bottom\":\"10px\",\"padding-left\":\"10px\",\"padding-right\":\"10px\",\"padding-top\":\"10px\"},\"text\":{\"computedStyle\":{\"linkColor\":\"#0645AD\"},\"html\":\"<div class=\\\"txtTinyMce-wrapper\\\" style=\\\"font-size: 14px; line-height: 16px;\\\" data-mce-style=\\\"font-size: 14px; line-height: 16px;\\\"><p style=\\\"font-size: 14px; line-height: 16px; word-break: break-word;\\\" data-mce-style=\\\"font-size: 14px; line-height: 16px; word-break: break-word;\\\">Tests</p></div>\",\"style\":{\"color\":\"#555555\",\"font-family\":\"inherit\",\"line-height\":\"120%\"}}},\"type\":\"mailup-bee-newsletter-modules-text\",\"uuid\":\"290e8159-9b94-4700-9264-668646db1e2e\"},{\"type\":\"mailup-bee-newsletter-modules-image\",\"descriptor\":{\"image\":{\"alt\":\"\",\"src\":\"\",\"href\":\"\"},\"style\":{\"width\":\"100%\",\"padding-top\":\"0px\",\"padding-right\":\"0px\",\"padding-bottom\":\"0px\",\"padding-left\":\"0px\"},\"computedStyle\":{\"class\":\"center autowidth\",\"width\":\"100px\",\"hideContentOnMobile\":false}},\"uuid\":\"4dac545e-5d47-458c-ad6f-0f23a75303d2\"}],\"style\":{\"background-color\":\"transparent\",\"border-bottom\":\"0px solid transparent\",\"border-left\":\"0px solid transparent\",\"border-right\":\"0px solid transparent\",\"border-top\":\"0px solid transparent\",\"padding-bottom\":\"5px\",\"padding-left\":\"0px\",\"padding-right\":\"0px\",\"padding-top\":\"5px\"},\"uuid\":\"fbc25679-19ba-4c0a-9d9d-4c3aeb277cdb\"}],\"container\":{\"style\":{\"background-color\":\"transparent\",\"background-image\":\"none\",\"background-position\":\"top left\",\"background-repeat\":\"no-repeat\"}},\"content\":{\"style\":{\"background-color\":\"#ffffff\",\"background-image\":\"none\",\"background-position\":\"top left\",\"background-repeat\":\"no-repeat\",\"color\":\"#000000\",\"width\":\"600px\"}},\"type\":\"one-column-empty\",\"uuid\":\"fe1100e4-fe16-4413-b90b-c329a7e542ba\"}],\"template\":{\"name\":\"template-base\",\"type\":\"basic\",\"version\":\"0.0.1\"},\"title\":\"Template\"},\"comments\":{}}",
                            "email_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta name=\"viewport\" content=\"width=device-width\"><!--[if !mso]><!--><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><!--<![endif]--><title></title><!--[if !mso]><!--><!--<![endif]--><style type=\"text/css\">body {margin: 0;padding: 0;}table,td,tr {vertical-align: top;border-collapse: collapse;}* {line-height: inherit;}a[x-apple-data-detectors=true] {color: inherit !important;text-decoration: none !important;}</style><style type=\"text/css\" id=\"media-query\">@media (max-width: 620px) {.block-grid,.col {min-width: 320px !important;max-width: 100% !important;display: block !important;}.block-grid {width: 100% !important;}.col {width: 100% !important;}.col_cont {margin: 0 auto;}img.fullwidth,img.fullwidthOnMobile {max-width: 100% !important;}.no-stack .col {min-width: 0 !important;display: table-cell !important;}.no-stack.two-up .col {width: 50% !important;}.no-stack .col.num2 {width: 16.6% !important;}.no-stack .col.num3 {width: 25% !important;}.no-stack .col.num4 {width: 33% !important;}.no-stack .col.num5 {width: 41.6% !important;}.no-stack .col.num6 {width: 50% !important;}.no-stack .col.num7 {width: 58.3% !important;}.no-stack .col.num8 {width: 66.6% !important;}.no-stack .col.num9 {width: 75% !important;}.no-stack .col.num10 {width: 83.3% !important;}.video-block {max-width: none !important;}.mobile_hide {min-height: 0px;max-height: 0px;max-width: 0px;display: none;overflow: hidden;font-size: 0px;}.desktop_hide {display: block !important;max-height: none !important;}}</style></head><body class=\"clean-body\" style=\"margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #f2f2f2;\"><!--[if IE]><div class=\"ie-browser\"><![endif]--><table class=\"nl-container\" style=\"table-layout: fixed; vertical-align: top; min-width: 320px; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f2f2f2; width: 100%;\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\" bgcolor=\"#f2f2f2\" valign=\"top\"><tbody><tr style=\"vertical-align: top;\" valign=\"top\"><td style=\"word-break: break-word; vertical-align: top;\" valign=\"top\"><!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td align=\"center\" style=\"background-color:#f2f2f2\"><![endif]--><div style=\"background-color:transparent;\"><div class=\"block-grid \" style=\"min-width: 320px; max-width: 600px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; Margin: 0 auto; background-color: #ffffff;\"><div style=\"border-collapse: collapse;display: table;width: 100%;background-color:#ffffff;\"><!--[if (mso)|(IE)]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"background-color:transparent;\"><tr><td align=\"center\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:600px\"><tr class=\"layout-full-width\" style=\"background-color:#ffffff\"><![endif]--><!--[if (mso)|(IE)]><td align=\"center\" width=\"600\" style=\"background-color:#ffffff;width:600px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;\" valign=\"top\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px;\"><![endif]--><div class=\"col num12\" style=\"min-width: 320px; max-width: 600px; display: table-cell; vertical-align: top; width: 600px;\"><div class=\"col_cont\" style=\"width:100% !important;\"><!--[if (!mso)&(!IE)]><!--><div style=\"border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;\"><!--<![endif]--><!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-family: Arial, sans-serif\"><![endif]--><div style=\"color:#555555;font-family:Arial, Helvetica Neue, Helvetica, sans-serif;line-height:1.2;padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;\"><div class=\"txtTinyMce-wrapper\" style=\"font-size: 14px; line-height: 1.2; color: #555555; font-family: Arial, Helvetica Neue, Helvetica, sans-serif; mso-line-height-alt: 17px;\"><p style=\"margin: 0; font-size: 14px; line-height: 1.2; word-break: break-word; mso-line-height-alt: 17px; margin-top: 0; margin-bottom: 0;\">Tests</p></div></div><!--[if mso]></td></tr></table><![endif]--><div class=\"img-container center autowidth\" align=\"center\" style=\"padding-right: 0px;padding-left: 0px;\"><!--[if mso]><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr style=\"line-height:0px\"><td style=\"padding-right: 0px;padding-left: 0px;\" align=\"center\"><![endif]--><div></div><!--[if mso]></td></tr></table><![endif]--></div><!--[if (!mso)&(!IE)]><!--></div><!--<![endif]--></div></div><!--[if (mso)|(IE)]></td></tr></table><![endif]--><!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]--></div></div></div><!--[if (mso)|(IE)]></td></tr></table><![endif]--></td></tr></tbody></table><!--[if (IE)]></div><![endif]--></body></html>",
                            "email_subject": "Email subject",
                            "email_from_name": "Oxfordstones",
                            "email_from_address": "info@oxfordstones.co.uk",
                            "email_reply_to_name": "Oxfordstones",
                            "email_reply_to_address": "help@oxfordstones.co.uk",
                            "email_unsubscribe": "0"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": "false",
                      "default": "true"
                    },
                    "code": {
                      "type": "integer",
                      "example": "400",
                      "default": "0"
                    },
                    "message": {
                      "type": "string",
                      "example": "General error information"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": {
                      "success": "false",
                      "code": "400",
                      "message": "General error information",
                      "errors": [
                        {
                          "text": [
                            "Detailed information about the specific error"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Campaign Methods"
        ]
      }
    }
  }
}
````

