Recommendations

CRUD, status management, batch operations, and AI generation for product recommendations.

Overview

Recommendations are actionable product features generated from synthesized insights. Each recommendation includes an impact score, effort estimate, success metrics, and a status that follows a defined state machine:

suggested -> accepted -> in_progress -> implemented
suggested -> rejected
rejected -> suggested (re-open)

Create Recommendation

POST /api/recommendations

Create a recommendation manually.

Request Body

NameTypeRequiredDescription
workspace_idUUIDYesTarget workspace
titlestringYesRecommendation title
descriptionstringYesDetailed description
addresses_insight_idsUUID[]NoInsight IDs this recommendation addresses
rationalestringNoWhy this recommendation matters
effort_estimatestringNoEffort level: trivial, small, medium, large, xlarge
effort_weeksfloatNoEstimated weeks to implement
impact_scorefloatNoImpact score (0.0 to 1.0)
success_metricsstring[]NoHow to measure success
target_repostringNoGitHub repo hint (org/repo, max 255 chars). Used by the agent harness and push-to-GitHub flow to route this recommendation to the right repo without asking the user. Persisted on the recommendation and echoed back on read.

Response (201 Created)

{
  "id": "d4e5f6a7-b8c9-0123-defa-456789012345",
  "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Redesign onboarding wizard",
  "description": "Replace the current 5-step wizard with a guided interactive tour...",
  "status": "suggested",
  "impact_score": 0.85,
  "effort_estimate": "medium",
  "effort_weeks": 3.0,
  "created_at": "2026-03-27T12:00:00Z"
}

List Recommendations

GET /api/recommendations

List recommendations for a workspace with optional filters.

Query Parameters

NameTypeRequiredDescription
workspace_idUUIDYesWorkspace ID
statusstringNoFilter by status
min_impactfloatNoMinimum impact score (0.0 to 1.0)
effort_estimatestringNoFilter by effort level
limitintegerNoMax results (default: 200, max: 500)
offsetintegerNoPagination offset (default: 0)

Response (200 OK)

{
  "recommendations": [ ... ],
  "total": 7
}

Get Recommendation

GET /api/recommendations/{recommendation_id}

Path Parameters

NameTypeRequiredDescription
recommendation_idUUIDYesRecommendation ID

Update Recommendation

PATCH /api/recommendations/{recommendation_id}

Update a recommendation's fields. Only provided fields are updated.


Delete Recommendation

DELETE /api/recommendations/{recommendation_id}

Response (204 No Content)


Update Status

PATCH /api/recommendations/{recommendation_id}/status

Update a recommendation's status with transition validation.

Request Body

NameTypeRequiredDescription
statusstringYesTarget status
user_notesstringNoOptional notes about the status change

Valid Transitions

Current StatusValid Next Statuses
suggestedaccepted, rejected
acceptedin_progress, rejected, suggested
rejectedsuggested
in_progressimplemented, accepted, suggested
implementedsuggested (re-open)

Example Request

curl -X PATCH https://api.praxiomai.xyz/api/recommendations/d4e5f6a7-.../status \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "accepted", "user_notes": "Approved for Q2 sprint"}'

Batch Update Status

PATCH /api/recommendations/batch/status

Batch update recommendation statuses. Invalid transitions are reported per-recommendation but do not block others.

Request Body

NameTypeRequiredDescription
workspace_idUUIDYesWorkspace ID
recommendation_idsUUID[]YesList of recommendation IDs
statusstringYesTarget status for all
user_notesstringNoOptional notes

Response (200 OK)

{
  "updated_count": 3,
  "failed_count": 1,
  "errors": [
    {
      "recommendation_id": "...",
      "error": "invalid_transition: suggested -> implemented",
      "valid_transitions": ["accepted", "rejected"]
    }
  ]
}

Generate Recommendations (AI)

POST /api/recommendations/generate

Generate feature recommendations from insights using the AI agent. The agent analyses patterns across insights and generates 3-7 buildable recommendations with impact/effort scores. Typically takes 20-60 seconds.

Requires: Active subscription.

Request Body

NameTypeRequiredDescription
workspace_idUUIDYesTarget workspace
insight_idsUUID[]YesInsight IDs to generate from
focus_areasstring[]NoOptional focus areas to guide generation

Example Request

curl -X POST https://api.praxiomai.xyz/api/recommendations/generate \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
    "insight_ids": ["c3d4e5f6-...", "d4e5f6a7-..."],
    "focus_areas": ["onboarding", "activation"]
  }'

Response (200 OK)

{
  "recommendations": [ ... ],
  "count": 5,
  "prioritization_summary": "Generated 5 recommendations. Top priority: Redesign onboarding wizard (impact: 0.85, effort: medium)..."
}

Was this helpful?