Retivo

Interventions

View and manage AI-generated interventions. Interventions can originate from internal playbooks, manual creation, or external action recommendations. For actions dispatched to external platforms (loyalty, gamification, etc.), see the External Actions API.

List interventions

GET
/api/interventions

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Query Parameters

limit?string

Response Body

application/json

curl -X GET "https://retivo.ai/api/interventions"
{
  "interventions": [
    {
      "id": "string",
      "user_id": "string",
      "playbook_id": "string",
      "status": "string",
      "channel": "string",
      "message_body": "string",
      "reasoning": "string",
      "confidence": 0,
      "planned_at": "string",
      "approved_at": "string",
      "sent_at": "string",
      "delivered_at": "string",
      "flagged": true,
      "flag_reason": "string",
      "quality_checks": null
    }
  ]
}

Create manual intervention

POST
/api/interventions

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://retivo.ai/api/interventions" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string",    "playbook_id": "e39cab14-aab5-4314-9b89-b1a7cd7ab356",    "channel": "email"  }'
{
  "id": "string",
  "status": "string",
  "channel": "string",
  "planned_at": "string"
}

Approve intervention

PUT
/api/interventions/{id}/approve

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X PUT "https://retivo.ai/api/interventions/int_abc123/approve"
{
  "id": "string",
  "status": "string"
}
{
  "error": "string"
}

Pause intervention

PUT
/api/interventions/{id}/pause

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X PUT "https://retivo.ai/api/interventions/int_abc123/pause"
{
  "id": "string",
  "status": "string"
}
{
  "error": "string"
}

Reject intervention

PUT
/api/interventions/{id}/reject

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

reason*string

Response Body

application/json

application/json

curl -X PUT "https://retivo.ai/api/interventions/int_abc123/reject" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{
  "id": "string",
  "status": "string"
}
{
  "error": "string"
}

Roll back a delivered intervention

PUT
/api/interventions/{id}/rollback

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

reason?string

Reason for rollback

Response Body

application/json

application/json

curl -X PUT "https://retivo.ai/api/interventions/string/rollback" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "status": "string"
}
{
  "error": "string"
}

Flag intervention

PUT
/api/interventions/{id}/flag

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://retivo.ai/api/interventions/int_abc123/flag" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{
  "id": "string",
  "flagged": true
}
{
  "error": "string"
}

Dry-run intervention decision

POST
/api/interventions/dry-run

Authorization

bearerAuth
AuthorizationBearer <token>

API key (rt_live_... or rt_test_...)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://retivo.ai/api/interventions/dry-run" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string"  }'
{
  "dry_run": true,
  "decision": {
    "action": "string",
    "playbook_id": "string",
    "channel": "string",
    "confidence": 0,
    "reasoning": "string",
    "reason": "string"
  },
  "rules": {
    "property1": null,
    "property2": null
  },
  "context": {
    "lifecycle_stage": "string",
    "activation_score": 0,
    "risk_level": "string",
    "matched_playbooks": 0
  }
}
{
  "error": "string"
}