Docs

Opportunities API

Manage retention opportunities — customers who accepted offers.

List Opportunities

GET /api/v1/public/opportunities?status=pending&limit=20
Authorization: Bearer rq_live_xxx

# Query Parameters
# status  — filter: pending, confirmed, rejected
# limit   — max results (default 20, max 50)

# Response
{
  "opportunities": [
    {
      "id": "uuid",
      "customer_email": "alice@example.com",
      "offer_type": "discount_percentage",
      "offer_value": "20%",
      "offer_duration": "3 months",
      "reason": "too expensive",
      "status": "pending",
      "estimated_mrr": 49,
      "created_at": "2026-08-19T14:30:00Z"
    }
  ]
}

Confirm Opportunity

Mark an opportunity as fulfilled (you applied the offer in your billing system).

POST /api/v1/public/opportunities/:id/confirm
Authorization: Bearer rq_live_xxx
Content-Type: application/json

{ "notes": "Applied 20% discount in Stripe" }

# Response
{ "confirmed": true, "id": "uuid" }

Reject Opportunity

Decline to fulfill an opportunity.

POST /api/v1/public/opportunities/:id/reject
Authorization: Bearer rq_live_xxx
Content-Type: application/json

{ "notes": "Customer already used a discount last month" }

# Response
{ "rejected": true, "id": "uuid" }

Workflow

  1. Customer accepts an offer → opportunity created with status pending
  2. You receive a notification (email/webhook/in-app)
  3. You apply the offer in your billing system (Stripe, Paddle, etc.)
  4. Confirm via dashboard or API → status becomes confirmed