Renta Docs

Reviews API

Manage customer reviews with moderation and admin responses.

The Reviews API manages customer reviews for completed bookings. Reviews support moderation workflows with publishable/secret key scoping.

Publishable keys only see approved reviews and do not receive status or admin_response fields. Secret keys can see all reviews and filter by status.

List Reviews

GET /v1/reviews

Query Parameters:

ParameterTypeDescription
statusstringFilter by status: pending, approved, hidden (secret keys only)
cursorstringPagination cursor
limitintegerResults per page (1–100, default 20)
// Public: list approved reviews (publishable key)
const reviews = await renta.reviews.list();

// Admin: filter by status (secret key)
const pending = await renta.reviews.list({ status: 'pending' });
curl "https://api.getrenta.io/v1/reviews?status=pending" \
  -H "Authorization: Bearer renta_sk_live_..."

Response (secret key):

{
  "data": [
    {
      "id": "rev_abc123",
      "booking_id": "bk_def456",
      "customer_id": "cust_abc",
      "rating": 5,
      "text": "Amazing experience! The e-bike was in perfect condition.",
      "status": "approved",
      "admin_response": "Thank you for the kind words!",
      "created_at": "2026-03-31T14:00:00Z",
      "updated_at": "2026-04-01T09:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Response (publishable key):

{
  "data": [
    {
      "id": "rev_abc123",
      "booking_id": "bk_def456",
      "customer_id": "cust_abc",
      "rating": 5,
      "text": "Amazing experience! The e-bike was in perfect condition.",
      "created_at": "2026-03-31T14:00:00Z",
      "updated_at": "2026-04-01T09:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Get Review

GET /v1/reviews/:id
const review = await renta.reviews.get('rev_abc123');
curl https://api.getrenta.io/v1/reviews/rev_abc123 \
  -H "Authorization: Bearer renta_sk_live_..."

Create Review

POST /v1/reviews

Submit a review for a completed booking. Works with both publishable and secret keys.

Body Parameters:

ParameterTypeRequiredDescription
booking_idstringBooking UUID
ratingintegerRating from 1 to 5
textstringReview text (max 5000 chars)

Only one review per booking is allowed. Attempting to create a duplicate returns 409 Conflict.

const review = await renta.reviews.create({
  booking_id: 'bk_def456',
  rating: 5,
  text: 'Amazing experience! The e-bike was in perfect condition.',
});
curl -X POST https://api.getrenta.io/v1/reviews \
  -H "Authorization: Bearer renta_pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "booking_id": "bk_def456",
    "rating": 5,
    "text": "Amazing experience!"
  }'

New reviews are created with status: "pending" and must be approved by an admin.

Update Review

PATCH /v1/reviews/:id

Moderate reviews and add admin responses. Secret keys only.

Body Parameters:

ParameterTypeDescription
statusstringSet status: pending, approved, or hidden
admin_responsestringPublic admin reply (max 5000 chars, or null to remove)
await renta.reviews.update('rev_abc123', {
  status: 'approved',
  admin_response: 'Thank you for the kind words!',
});
curl -X PATCH https://api.getrenta.io/v1/reviews/rev_abc123 \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "status": "approved",
    "admin_response": "Thank you for the kind words!"
  }'

Delete Review

DELETE /v1/reviews/:id

Permanently deletes a review. Secret keys only.

await renta.reviews.del('rev_abc123');
curl -X DELETE https://api.getrenta.io/v1/reviews/rev_abc123 \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "deleted": true,
  "id": "rev_abc123"
}