API DocsRESTCampaign service

UpdateCampaign

Updates an existing campaign using the list of fields specified in `update_mask`.

PATCH
/api/v1/campaigns

Request Body

application/jsonRequired

The request for a call to CampaignService_UpdateCampaign to update a campaign. When updating tags or rules, the update will perform a full replace. Additionally, when updating rules, only the rule ID or the rule client key is required, but it is okay to provide both. If some rules contain only client keys and others only rule IDs, they will be consolidated.

campaign
Required
object

updateMask
Required
string

The list of fields to be updated. The fields available to be updated are name, archived_date, description, tags, and reports.

curl -X PATCH "<API_URL>/api/v1/campaigns" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign": {
      "campaignId": "string",
      "organizationId": "string",
      "clientKey": "string",
      "name": "string",
      "description": "string",
      "archivedDate": "2019-08-24T14:15:22Z",
      "tags": [
        {
          "tagId": "string",
          "name": "string"
        }
      ],
      "reports": [
        {
          "reportId": "string"
        }
      ]
    },
    "updateMask": "string"
  }'

A successful response.

{
  "campaign": {
    "campaignId": "string",
    "organizationId": "string",
    "clientKey": "string",
    "name": "string",
    "description": "string",
    "archivedDate": "2019-08-24T14:15:22Z",
    "tags": [
      {
        "tagId": "string",
        "name": "string"
      }
    ],
    "reports": [
      {
        "reportId": "string"
      }
    ]
  }
}