# Manage webhooks using the API After you've [configured your webhook server](https://www.checkout.com/docs/developer-resources/event-notifications/receive-webhooks/configure-your-webhook-server.md) and added a webhook workflow using the API, you can use the [Workflows API](https://api-reference.checkout.com/#tag/Workflows) to manage a workflow, or a workflow's conditions and actions. --- ## Manage workflows Use the Workflows API to: - [Update a workflow](http://api-reference.checkout.com/#operation/patchWorkflow) you previously created. - [Get a workflow](https://api-reference.checkout.com/tag/Workflows/#operation/getWorkflow) to view its details. - [Get all workflows](https://api-reference.checkout.com/tag/Workflows/#operation/getAllWorkflows) you've created for your account. - [Remove a workflow](https://api-reference.checkout.com/tag/Workflows/#operation/removeWorkflow). - Test a workflow. > **Note** > > When you delete a workflow, the actions of already executed workflows are still processed. --- ## Manage workflow conditions and actions A workflow's `conditions` specify the criteria under which the workflow is triggered. For example, the events that trigger the workflow, and the entities and processing channels it applies to. To manage a workflow's conditions, use the following endpoints and provide the `workflowId` and `workflowConditionId` path parameters: - [Add a workflow condition](https://api-reference.checkout.com/tag/Workflows/#operation/addWorkflowCondition). - [Update a workflow condition](https://api-reference.checkout.com/tag/Workflows/#operation/updateWorkflowCondition). - [Remove a workflow condition](https://api-reference.checkout.com/tag/Workflows/#operation/removeWorkflowCondition). A workflow's `actions` specify the action to take if the `conditions` are met. For example, sending a webhook. To manage a workflow's `actions`, use the following endpoints and provide the `workflowId` and `workflowActionId` path parameters: - [Add a workflow action](https://api-reference.checkout.com/tag/Workflows/#operation/addWorkflowAction). - [Update a workflow action](https://api-reference.checkout.com/tag/Workflows/#operation/updateWorkflowAction). - [Remove a workflow action](https://api-reference.checkout.com/tag/Workflows/#operation/removeWorkflowAction). --- ## Retrieve event type details You can retrieve details about different [event types](https://www.checkout.com/docs/developer-resources/event-notifications/event-types.md) using the following endpoints: - [Get event types](https://api-reference.checkout.com/tag/Workflows/#operation/getEventTypes) to retrieve all types programmatically. - [Get subject events](https://api-reference.checkout.com/tag/Workflows/#operation/getSubjectEvents) to retrieve all events for a specific subject. For example, a payment. - [Get action invocations](https://api-reference.checkout.com/tag/Workflows/#operation/getWorkflowActionInvocations) to retrieve the details of an action applied for a specific event. - [Get an event](https://api-reference.checkout.com/tag/Workflows/#operation/getWorkflowEvent) to view its details. > **Information** > > To retry a failed webhook, see [Resend webhooks](https://www.checkout.com/docs/developer-resources/event-notifications/receive-webhooks/resend-webhooks.md). --- ## Test a workflow You can test a workflow by sending test events to your specified webhook URL. If the workflow is valid, Checkout.com sends the event types you selected with an `isTest` flag. > **Information** > > The test event contains example data where possible, but the values may not be specific to the event type. Call the [Test a workflow](https://api-reference.checkout.com/tag/Workflows/#operation/testWorkflow) endpoint, and provide the workflow ID as the `{workflowId}` path parameter. **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/workflows/{workflowId}/test` ### Request example ```json { "event_types": { "gateway": [ "payment_approved", "payment_captured" ], "authentication": [ "authentication_approved" ] } } ``` You receive a `202` response if the test workflow was initiated successfully.