Skip to main content
Using our API via a dedicated deployment? Just replace api.langdock.com with your deployment’s base URL: <deployment-url>/api/public
Creates a new trigger for an integration. Triggers allow integrations to start workflows or agent conversations based on external events, typically by polling an external system for changes.

Required Scopes

This endpoint requires the INTEGRATION_API scope.

Path Parameters

Request Body

Input Field Schema

Each input field has the following properties:

Field Types

Example

Response Format

Success Response (201 Created)

Error Handling

Polling Code Environment

Trigger polling code runs in a sandboxed JavaScript environment with access to:
  • inputs - Object containing the values of input fields configured by the user
  • secrets - Object containing configured secrets for the integration
  • lastPollTime - Timestamp of the last successful poll (for incremental fetching)
  • fetch - Standard fetch API for HTTP requests
  • Standard JavaScript built-ins
The polling code should return an array of events. Each returned event will trigger the associated workflow or agent conversation.
Polling code should handle errors gracefully. Unhandled errors will cause the trigger to fail and may result in missed events.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.