Skip to main content
POST
/
v1
/
control
/
execute
Execute a control action (retry, fallback model, or prompt modification)
curl --request POST \
  --url https://api.trulayer.ai/v1/control/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "action_type": "retry",
  "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "payload": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "action_type": "retry",
  "status": "pending",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "rule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "payload": {},
  "result": {},
  "executed_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Body

application/json
project_id
string<uuid>
required
action_type
enum<string>
required
Available options:
retry,
fallback_model,
prompt_modification,
agent_action
trace_id
string<uuid> | null
rule_id
string<uuid> | null
payload
object

Response

Control action created and executed

id
string<uuid>
required
tenant_id
string<uuid>
required
project_id
string<uuid>
required
action_type
enum<string>
required
Available options:
retry,
fallback_model,
prompt_modification,
agent_action,
escalate
status
enum<string>
required
Available options:
pending,
pending_approval,
executed,
failed
created_at
string<date-time>
required
updated_at
string<date-time>
required
trace_id
string<uuid> | null
rule_id
string<uuid> | null
payload
object
result
object
executed_at
string<date-time> | null