Skip to main content

The two endpoints

Your app uses two Codika public API endpoints: Both require authentication — an X-API-Key header, webhook signature headers, or a query parameter.

Step 1: Trigger a workflow

The payload fields must match the workflow’s input schema (defined in config.ts).

Query parameter variant

For platforms that can’t set custom headers (e.g., GCP Pub/Sub push subscriptions):
See URL query parameter authentication for details.
If your platform signs outbound webhooks (like Resend, Stripe, or any Standard Webhooks-compatible system), you can use HMAC signature verification instead of API keys. See Webhook Signature Verification.

Response

Save the executionId — you’ll need it for polling.

The workflowId

This is the workflowTemplateId from the use case’s config.ts. It’s a stable identifier that doesn’t change across versions. Examples: main-workflow, http-direct-messaging, scheduled-report. If the use case has agent skills, each skill’s workflowTemplateId field tells you the ID to use.

Step 2: Poll for results

Response

Status values

Complete trigger + poll implementation

Here’s a reusable implementation in TypeScript:

Usage

Payload format

The trigger endpoint wraps your input in a payload field:
The keys inside payload must match the workflow’s inputSchema field names.
The payload wrapper is recommended but not required. If no payload key is present, the entire request body is passed through as-is. However, using the wrapper is safer and consistent with how the Codika dashboard sends data.

Workflows without input

Some workflows (like scheduled reports with manual triggers) don’t require input. Send an empty body or empty payload: