Skip to main content
PATCH
/
api
/
v1
/
campaigns
UpdateCampaign
curl --request PATCH \
  --url https://your-sift-api-url.com/api/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "campaign": {
    "campaignId": "<string>",
    "organizationId": "<string>",
    "clientKey": "<string>",
    "name": "<string>",
    "description": "<string>",
    "archivedDate": "2023-11-07T05:31:56Z",
    "tags": [
      {
        "tagId": "<string>",
        "name": "<string>"
      }
    ],
    "reports": [
      {
        "reportId": "<string>"
      }
    ],
    "metadata": [
      {
        "key": {
          "name": "<string>",
          "type": "METADATA_KEY_TYPE_UNSPECIFIED",
          "archivedDate": "2023-11-07T05:31:56Z"
        },
        "stringValue": "<string>",
        "numberValue": 123,
        "booleanValue": true,
        "archivedDate": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "updateMask": "<string>"
}'
{
  "campaign": {
    "campaignId": "<string>",
    "organizationId": "<string>",
    "clientKey": "<string>",
    "name": "<string>",
    "description": "<string>",
    "createdByUserId": "<string>",
    "modifiedByUserId": "<string>",
    "createdDate": "2023-11-07T05:31:56Z",
    "modifiedDate": "2023-11-07T05:31:56Z",
    "archivedDate": "2023-11-07T05:31:56Z",
    "tags": [
      {
        "tagId": "<string>",
        "name": "<string>"
      }
    ],
    "reports": [
      {
        "reportId": "<string>",
        "reportName": "<string>",
        "numAnnotations": 123,
        "numPassedRules": 123,
        "numAcceptedRules": 123,
        "numFailedRules": 123,
        "numOpenRules": 123
      }
    ],
    "createdFromCampaignId": "<string>",
    "metadata": [
      {
        "key": {
          "name": "<string>",
          "type": "METADATA_KEY_TYPE_UNSPECIFIED",
          "archivedDate": "2023-11-07T05:31:56Z"
        },
        "stringValue": "<string>",
        "numberValue": 123,
        "booleanValue": true,
        "archivedDate": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

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
object
required
updateMask
string
required

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

Response

A successful response.

The response of a call to CampaignService_UpdateCampaign.

campaign
object
required