Controlling a workflow

Last update: 2021-09-13
  • Topics:
  • API
    View more on this topic
  • Created for:
  • Experienced
    Developer

You can control a workflow directly from the REST API, through a POST request containing the workflow ID and the required execution command:

POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands

CAUTION

If the worfklow ID is changed in Adobe Campaign, the API request will not work anymore.

Four execution commands are available to control a workflow:

  • Start
  • Pause
  • Resume
  • Stop

For more information on the execution commands, refer to the Campaign documentation.


Sample requests

  • Start a workflow.

    
    -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <ACCESS_TOKEN>' \
    -H 'Cache-Control: no-cache' \
    -H 'X-Api-Key: <API_KEY>' \
    -i
    -d '{"method":"start"}'
    
    
  • Stop a workflow.

    
    -X POST https://mc.adobe.io/<ORGANIZATION>/campaign/workflow/execution/<workflowID>/commands \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <ACCESS_TOKEN>' \
    -H 'Cache-Control: no-cache' \
    -H 'X-Api-Key: <API_KEY>' \
    -i
    -d '{"method":"stop"}'
    
    

On this page