Workflows

Run workflow

Triggers a workflow.

triggerUserEmail should be provided for the following workflow triggers: "User meets criteria", "User joins", "User left", "Closed app in use", "License not in use" and "App event".

triggerAppId should be provided for the following workflow triggers: "Application meets criteria", "Closed app in use" and "New app discovered".

triggerContractId should be provided for the following workflow triggers: "Contract meets criteria".

triggerLicenseName and triggerLicenseAppId should be provided for the following workflow triggers: "License not in use".

triggerPayload is the JSON payload for the "Custom trigger (Webhook)" trigger; its fields are the ones in the workflow's sample payload. Other triggers ignore it.

  • Rate limit: 100 requests per minute
post/workflows/{idWorkflow}/trigger

Request

  • Base URL
    https://api.toriihq.com/v1.0
  • Auth
    API key in header Authorization

Path parameters

idWorkflowinteger required

Unique identifier of the workflow

Request body

triggerAppIdnumber

Unique identifier of the triggered application

triggerUserEmailstring

The email of the triggered user

triggerContractIdnumber

Unique identifier of the triggered contract

triggerLicenseNamestring

The name of the triggered license

triggerLicenseAppIdnumber

Unique identifier of the app in the triggered license

triggerPayloadTriggerPayload

The payload for a "Custom trigger (Webhook)" workflow

Example request

{
  "triggerAppId": 1000,
  "triggerUserEmail": "tony@stark.com",
  "triggerContractId": 1000,
  "triggerLicenseName": "Pro",
  "triggerLicenseAppId": 1000,
  "triggerPayload": {
    "days": 30
  }
}

Response

Standard Response

successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.