# Moose / Apis / Trigger Api Documentation – TypeScript ## Included Files 1. moose/apis/trigger-api/trigger-api.mdx ## Trigger APIs Source: moose/apis/trigger-api/trigger-api.mdx Create APIs that trigger workflows and other processes # Trigger APIs ## Overview You can create APIs to initiate workflows, data processing jobs, or other automated processes. ## Basic Usage ```typescript filename="app/apis/trigger_workflow.ts" copy interface WorkflowParams { inputValue: string; priority?: string; } interface WorkflowResponse { workflowId: string; status: string; } const triggerApi = new Api( "trigger-workflow", async ({ inputValue, priority = "normal" }: WorkflowParams, { client }) => { // Trigger the workflow with input parameters const workflowExecution = await client.workflow.execute("data-processing", { inputValue, priority, triggeredAt: new Date().toISOString() } ); return { workflowId: workflowExecution.id, status: "started" }; } ); ``` ## Using the Trigger API Once deployed, you can trigger workflows via HTTP requests: ```bash filename="Terminal" copy curl "http://localhost:4000/api/trigger-workflow?inputValue=process-user-data&priority=high" ``` Response: ```json { "workflowId": "workflow-12345", "status": "started" } ```