Trigger a campaign

Send campaigns to users using the Nexthink public API.

Trigger a campaign

post

Trigger the sending of a campaign to specific users.

Authorizations
Body
campaignNqlIdstring · min: 1Required

The ID of the campaign to send.

Example: #general_survey
userSidstring[] · min: 1 · max: 10000Required

SIDs of users that the campaign should be sent to.

Example: S-456-456-456
expiresInMinutesinteger · int32 · min: 1 · max: 525600Required

The number of minutes before the campaign response expires and will stop being shown to the users, starting from the current time. The expiration date and time is set at the time of the API call and is not influenced by the time at which the campaign is displayed to the user or by the user postponing the campaign.

Example: 1440
Responses
200

OK - Successful triggering.

application/json
post
POST /api/v1/euf/campaign/trigger HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 157

{
  "campaignNqlId": "#general_survey",
  "userSid": [
    "S-456-456-456"
  ],
  "expiresInMinutes": 1440,
  "parameters": {
    "param_id_1": "Some value",
    "param_id_2": "Another value"
  }
}
{
  "requests": [
    {
      "requestId": "text",
      "userSid": "text",
      "message": "text"
    }
  ]
}

Was this helpful?