curl --request PATCH \
--url https://api.siftstack.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": true,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
},
"updateMask": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/campaigns"
payload = {
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": True,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
},
"updateMask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/campaigns"
payload := strings.NewReader("{\n \"campaign\": {\n \"campaignId\": \"<string>\",\n \"name\": \"<string>\",\n \"isArchived\": true,\n \"organizationId\": \"<string>\",\n \"clientKey\": \"<string>\",\n \"description\": \"<string>\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"tagId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"reports\": [\n {\n \"reportId\": \"<string>\"\n }\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n },\n \"updateMask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": true,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"relationValue": {
"resourceType": "<string>",
"resourceId": "<string>"
},
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
],
"reportsIncludeSummaries": true
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}UpdateCampaign
Updates an existing campaign using the list of fields specified in update_mask.
curl --request PATCH \
--url https://api.siftstack.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": true,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
]
},
"updateMask": "<string>"
}
'import requests
url = "https://api.siftstack.com/api/v1/campaigns"
payload = {
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": True,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": True
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": True,
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": True
}
]
},
"updateMask": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siftstack.com/api/v1/campaigns"
payload := strings.NewReader("{\n \"campaign\": {\n \"campaignId\": \"<string>\",\n \"name\": \"<string>\",\n \"isArchived\": true,\n \"organizationId\": \"<string>\",\n \"clientKey\": \"<string>\",\n \"description\": \"<string>\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"tagId\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"reports\": [\n {\n \"reportId\": \"<string>\"\n }\n ],\n \"metadata\": [\n {\n \"key\": {\n \"name\": \"<string>\",\n \"type\": \"METADATA_KEY_TYPE_UNSPECIFIED\",\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\",\n \"isArchived\": true\n }\n ]\n },\n \"updateMask\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"campaign": {
"campaignId": "<string>",
"name": "<string>",
"isArchived": true,
"organizationId": "<string>",
"clientKey": "<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",
"isArchived": true
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"relationValue": {
"resourceType": "<string>",
"resourceId": "<string>"
},
"archivedDate": "2023-11-07T05:31:56Z",
"isArchived": true
}
],
"reportsIncludeSummaries": true
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Body
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.
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.
Was this page helpful?