Skip to main content

Send Action

POST
string
required
/v1/actions
Send an action event.

Body

agent_key
string
required
Agent instance key
action_type
string
required
Action type (llm_call, tool_call, etc.)
metadata
object
Action metadata (key-value pairs)
timestamp
string
Event timestamp (ISO 8601, defaults to now)
curl -X POST https://api.valmi.io/v1/actions \
  -H "Authorization: Bearer sk_api_abc123xyz" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_key": "agent_abc123xyz",
    "action_type": "llm_call",
    "metadata": {
      "model": "gpt-4",
      "input_tokens": 1000,
      "output_tokens": 500
    }
  }'
{
  "id": "action_xyz789",
  "status": "processed",
  "created_at": "2024-01-15T10:30:00Z"
}

Send Outcome

POST
string
required
/v1/outcomes
Send an outcome event.

Body

agent_key
string
required
Agent instance key
outcome_type
string
required
Outcome type (successful_hire, converted_lead, etc.)
value
number
required
Outcome value (count or amount)
metadata
object
Outcome metadata
curl -X POST https://api.valmi.io/v1/outcomes \
  -H "Authorization: Bearer sk_api_abc123xyz" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_key": "agent_abc123xyz",
    "outcome_type": "successful_hire",
    "value": 1,
    "metadata": {
      "candidate_id": "cand_123"
    }
  }'