CreateCampaign
curl --request POST \
--url https://api.siftstack.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"tags": {},
"organizationId": "<string>",
"clientKey": "<string>",
"createFrom": {
"reports": {},
"runs": {},
"otherCampaign": {
"id": "<string>",
"clientKey": "<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"
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/campaigns"
payload = {
"name": "<string>",
"description": "<string>",
"tags": {},
"organizationId": "<string>",
"clientKey": "<string>",
"createFrom": {
"reports": {},
"runs": {},
"otherCampaign": {
"id": "<string>",
"clientKey": "<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"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": {},\n \"organizationId\": \"<string>\",\n \"clientKey\": \"<string>\",\n \"createFrom\": {\n \"reports\": {},\n \"runs\": {},\n \"otherCampaign\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<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 },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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>",
"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"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}CampaignService
CreateCampaign
Create a campaign.
POST
/
api
/
v1
/
campaigns
CreateCampaign
curl --request POST \
--url https://api.siftstack.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"tags": {},
"organizationId": "<string>",
"clientKey": "<string>",
"createFrom": {
"reports": {},
"runs": {},
"otherCampaign": {
"id": "<string>",
"clientKey": "<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"
}
]
}
'import requests
url = "https://api.siftstack.com/api/v1/campaigns"
payload = {
"name": "<string>",
"description": "<string>",
"tags": {},
"organizationId": "<string>",
"clientKey": "<string>",
"createFrom": {
"reports": {},
"runs": {},
"otherCampaign": {
"id": "<string>",
"clientKey": "<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"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": {},\n \"organizationId\": \"<string>\",\n \"clientKey\": \"<string>\",\n \"createFrom\": {\n \"reports\": {},\n \"runs\": {},\n \"otherCampaign\": {\n \"id\": \"<string>\",\n \"clientKey\": \"<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 },\n \"stringValue\": \"<string>\",\n \"numberValue\": 123,\n \"booleanValue\": true,\n \"archivedDate\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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>",
"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"
},
"stringValue": "<string>",
"numberValue": 123,
"booleanValue": true,
"archivedDate": "2023-11-07T05:31:56Z"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The request of a call to CampaignService_CreateCampaign to create a campaign.
The request of a call to CampaignService_CreateCampaign to create a campaign.
Show child attributes
Show child attributes
User-specified unique identifier.
Campaigns can be created from a few different sources.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
A successful response.
The response of a call to CampaignService_CreateCampaign to create a campaign.
Show child attributes
Show child attributes
Was this page helpful?
⌘I