API DocsRESTCampaign service

CreateCampaign

Create a campaign.

POST
/api/v1/campaigns

Request Body

application/jsonRequired

The request of a call to CampaignService_CreateCampaign to create a campaign.

name
Required
The descriptive display name of the created campaign

descriptionA custom description for the campaign

tagsobject

organizationId`organization_id` is only required if your user belongs to multiple organizations

clientKeystring

User-specified unique identifier.

createFromobject

Campaigns can be created from a few different sources.

curl -X POST "<API_URL>/api/v1/campaigns" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "tags": {
      "ids": {
        "ids": [
          "string"
        ]
      },
      "names": {
        "names": [
          "string"
        ]
      }
    },
    "organizationId": "string",
    "clientKey": "string",
    "createFrom": {
      "reports": {
        "ids": {
          "ids": [
            "string"
          ]
        },
        "clientKeys": {
          "clientKeys": [
            "string"
          ]
        }
      },
      "runs": {
        "ids": {
          "ids": [
            "string"
          ]
        },
        "clientKeys": {
          "clientKeys": [
            "string"
          ]
        }
      },
      "otherCampaign": {
        "id": "string",
        "clientKey": "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"
      }
    ]
  }
}