Skip to content

Trigger Workflow

Request

Triggers enrichment and routing workflows from external systems.

Overview

The Workflow Trigger API provides a generic interface for initiating enrichment and routing workflows from various external systems like Eloqua, Customer Data Platforms (CDP), Data Lakes, and other marketing automation platforms.

Authentication

Requires either an API key or OAuth2 bearer token in the Authorization header.

Rate Limits

Designed to support bursty event traffic, capable of handling hundreds of requests per minute.

Request Body

  • record_data: Generic record payload containing fields for Lead, Contact, Opportunity, or other custom objects
  • source_system: Optional source system identifier (e.g., 'eloqua', 'cdp', 'data_lake')
  • enrichment_preferences: Optional enrichment preferences and configuration

Response Fields

  • success: Boolean indicating request success
  • status: Workflow status (triggered, queued, failed)
  • request_id: Unique request ID for tracking
  • workflow_id: ID of the triggered workflow
  • processing_time_ms: Processing time in milliseconds
  • enrichment_job_id: ID of enrichment job created (if applicable)
  • credits_consumed: Number of credits used
  • credits_remaining (approximate balance; use GET /v1/credits/remaining for precise value)
  • cached: Whether result was from cache

Features

  • Generic Payload: Accepts any record type (Lead, Contact, Opportunity, custom objects)
  • Audit Logging: All requests and responses are logged for compliance
  • Retry Logic: Automatic retries on failure with exponential backoff
  • High Throughput: Optimized for bursty event traffic
  • Credit Tracking: Transparent credit consumption tracking

Credit Usage

Workflow triggers consume credits based on complexity:

  • Basic Trigger: 1 credit per record
  • With Enrichment: +2 credits for enrichment processing
  • With Routing: +1 credit for routing logic
Security
BearerAuth
Path
workflow_idstring(Workflow Id)required
Bodyapplication/jsonrequired
record_dataobject(Record Data)required

Generic record payload containing fields for Lead, Contact, Opportunity, or other custom objects

source_systemstring or null(Source System)
Any of:

Source system identifier (e.g., 'eloqua', 'cdp', 'data_lake')

string
enrichment_preferencesobject or null(Enrichment Preferences)
Any of:

Optional enrichment preferences and configuration

curl -i -X POST \
  'https://api-gateway.agenthq.withlantern.com/v1/workflows/{workflow_id}/trigger' \
  -H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "record_data": {},
    "source_system": "string",
    "enrichment_preferences": {}
  }'

Responses

Success Response

Bodyapplication/json
successboolean(Success)required

Boolean indicating request success

statusstring(Status)required

Status of the workflow trigger

Enum:"triggered""queued""failed"
request_idstring(Request Id)required

Unique request ID for tracking

workflow_idstring(Workflow Id)required

ID of the triggered workflow

processing_time_msinteger(Processing Time Ms)required

Time taken to process the request in milliseconds

enrichment_job_idstring or null(Enrichment Job Id)
Any of:

ID of the enrichment job created (if applicable)

string
credits_consumedinteger(Credits Consumed)required

Number of credits used for this request

credits_remaininginteger or null(Credits Remaining)
Any of:

Approximate remaining credit balance. Use GET /v1/credits/remaining for precise balance.

integer
cachedboolean(Cached)

Boolean indicating if this result was returned from cache

Default:false
Response
{ "success": true, "status": "triggered", "request_id": "req_1234567890abcdef", "workflow_id": "wf_workflow_123", "processing_time_ms": 150, "enrichment_job_id": "job_9876543210fedcba", "credits_consumed": 3, "credits_remaining": 950, "cached": false }