Custom Webhook API

Integrate any tool, any workflow.

1. Create a Webhook from Your Dashboard

You can easily create a new webhook directly from the Trailpad user interface:

  1. Navigate to the Workspace Settings in your Trailpad dashboard.
  2. Select the Integrations tab.
  3. In the "Custom Webhooks" section, click "Create New Webhook".
  4. Assign it to a project, give it a name (e.g., "My Custom CRM"), and save.

Important Security Note

The generated webhook URL contains a secret token and acts as your authentication key. Treat it like a password and do not expose it in public code repositories or client-side applications.

2. Send Activity Data

Configure your application to send a `POST` request to the generated webhook URL. The request body must be a JSON object representing an `Activity`.

The Activity Object

The following table describes the fields you can send in the JSON payload.

Field Type Required Description
title string Yes A short, clear title for the activity.
description string No A more detailed summary of the activity.
startTime ISO 8601 string Yes The timestamp when the activity started.
endTime ISO 8601 string No The timestamp when the activity ended.
trigger string No What caused the activity (e.g., 'API Call', 'User Action').
event string No The specific event name, if different from the trigger.
memberEmail string No Email of the workspace member to assign the activity to. Defaults to the webhook creator.
externalId string No An ID from your external system to link back to the source.
metadata object No A flexible object for any extra data or processing instructions.

Example with cURL

Here is a complete example of how to send an activity to your webhook URL using cURL.

curl -X POST \
  https://api.trailpad.ai/webhooks/ingress/YOUR_SECURE_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Customer Inquiry Handled",
    "description": "Handled customer inquiry from Jane Doe regarding billing.",
    "startTime": "2024-08-03T11:30:00Z",
    "trigger": "Manual Log",
    "event": "Call Center Log",
    "externalId": "call-log-9876"
  }'