Triggers & Webhooks
HTTP endpoints for automating workflows, agents, skills, and functions. Use these from any HTTP client.
Trigger Workflow
Start a new workflow run by workflow ID. The request body is passed as input data to the workflow.
POST
https://octra.ai/v1/triggers/workflows/:idRequest Body
{
"input_data": {
"key": "value"
}
}Response
{
"workflow_id": "...",
"run_id": "...",
"status": "running"
}Trigger Agent
Send a chat message to an AI agent by agent ID. The agent generates a response using its configured model and prompt.
POST
https://octra.ai/v1/triggers/agents/:idRequest Body
{
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}Response
{
"id": "trg_agent_...",
"object": "trigger.agent.response",
"agent_id": "...",
"output_text": "..."
}Trigger Skill
Execute a skill by skill ID. The request body is passed as input to the skill.
POST
https://octra.ai/v1/triggers/skills/:idRequest Body
{
"input": {
"param1": "value"
}
}Response
{
"id": "trg_skill_...",
"object": "trigger.skill.response",
"status": "ok"
}Trigger Function
Call a registered function by function ID. The input is passed directly to the function handler.
POST
https://octra.ai/v1/triggers/functions/:idRequest Body
{
"input": {
"arg1": "value"
}
}Response
{
"id": "trg_fn_...",
"object": "trigger.function.response",
"output": {
"result": "..."
}
}Using Triggers
All trigger endpoints require authentication via the octra-api-token header. Replace :id with the actual workflow, agent, skill, or function ID.
Example using curl:
curl -X POST https://octra.ai/v1/triggers/workflows/YOUR_WORKFLOW_ID \
-H "octra-api-token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_data": {"message": "hello"}}'