Skip to main content
Webhooks are highly versatile tools that enable automation and provide status updates, making them particularly useful for polling processes. They are fully compatible with platforms like Zapier, Make, and n8n.

Adding a Webhook

Currently, webhooks cannot be added via the API. To add one manually through the Captain Data app:
  1. Open one of your Runs and navigate to the Webhooks tab.

Navigate to Webhooks

  1. Click Add Webhook to access a modal with available options.

Add Webhook Modal

  1. Choose one of three event types:
    • Created: Triggered when a job starts and the first task launches.
    • Succeeded: Triggered when a job completes successfully.
    • Failed: Triggered when a job encounters an error.
  2. Once created, your webhook will be ready to use.

Webhook Created

Headers Configuration

In the webhook modal, you can configure custom headers for secure and formatted integrations:
  • Header Name: Specify the key (e.g., Authorization, Content-Type).
  • Header Value: Provide the value (e.g., Bearer token, application/json).
These headers ensure proper authentication and data formatting for external tools.

Webhook Payload

When triggered, a webhook sends a POST request with the following JSON payload:

Handling Job Results: Success vs. Failed Inputs

  • Failed Status: Triggered if all inputs fail.
  • Succeeded Status: Triggered if at least one input succeeds, even if others fail.
To investigate discrepancies between inputs and outputs, use the Get a Run’s Inputs API endpoint:

Common Reasons for Failed Inputs

  • 404 Errors: The profile or resource is inaccessible.
  • Incorrect Inputs: Invalid or improperly formatted inputs.
  • Authentication Issues: For example, an invalid LinkedIn session cookie.
Example payload for authentication errors:

Retrying Failed Inputs

Retries depend on the failure reason:
  • Do Not Retry: Issues like 404 errors or incorrect inputs.
  • Retry Possible: Temporary issues such as API timeouts or invalid session cookies.
To retry jobs:
  1. Refresh and resume paused jobs.
  2. Update your cookie or resolve the issue and retry. Retry a Run Guide

Retrying a Webhook

You can retry webhooks for:
  • Testing: Re-trigger to validate the integration.
  • Missed Webhooks: Reattempt delivery if the webhook wasn’t triggered.

Using the API

To retry a webhook, use the Retry Webhook endpoint:
Replace {job_uid} with the relevant job UID. For detailed instructions, refer to the Retry Webhook Documentation.

Retrying in the UI

To retry through the Captain Data app:
  1. Open the specific job by its UID.
  2. Navigate to the Webhooks tab.
  3. Click Retry and paste the job UID to reattempt delivery.

Retry Webhook

By effectively utilizing webhooks, you can streamline workflows and receive real-time notifications for critical events.