Trigger a workflow via API calls

Knowledge Center > Workflow > Using Workflow > Trigger a workflow via API calls

Trigger a workflow via API calls

You can trigger a workflow via API calls. Depending on the authentication method you use, the API endpoints and supported modes are different.

Before invoking API calls to trigger a workflow, ensure that the Callout trigger is enabled for the workflow that you want to run.

workflow_callout_info.png

API-token and basic authentication

If you want to use API-token or basic authentication, send GET or POST request to the following endpoints. The API endpoint can be the standard API endpoint displayed in the settings of the workflow, or the responsive API endpoint. Use the responsive API endpoint only when you are familiar with the responsive mode of Workflow. 

Standard API endpoint:
https://workflow.apps.zuora.com/api/v1/workflows/{workflow_id}/run
Responsive API endpoint:
https://workflow.apps.zuora.com/api/v1/workflows/{workflow_id}/sync
Where {workflow_id} is different for each workflow.

For API-token authentication, you need to place the key pair in the header. The key must be "API-Token". The actual token is displayed on the settings page of the workflow.

For basic authentication, the username and password are also displayed on the settings page of the workflow.

OAuth

You can also call a standard Zuora API to trigger a workflow. You need to generate a bearer token first, and use the token to call this endpoint:

https://<base_url>/workflows/<workflow_id>/run 

Based on the environment you are using, <base_url> is different. 

  • US API Sandbox: https//rest.apisandbox.zuora.com
  • US Production: https//rest.zuora.com
  • EU Sandbox: https//rest.sandbox.eu.zuora.com
  • EU Production: https//rest.eu.zuora.com

If you do not know the workflow ID, you can use the Get all workflows operation to retrieve information about all workflows on your tenant. 

To learn about all available Workflow APIs, see Workflow APIs in the API Reference.

To learn more about authentication for Zuora standard APIs, see Authentication in the API Reference.

Last modified

Tags

Classifications

(not set)