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/reviewsQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: pending, approved, hidden (secret keys only) |
cursor | string | Pagination cursor |
limit | integer | Results 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/:idconst 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/reviewsSubmit a review for a completed booking. Works with both publishable and secret keys.
Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
booking_id | string | ✅ | Booking UUID |
rating | integer | ✅ | Rating from 1 to 5 |
text | string | — | Review 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/:idModerate reviews and add admin responses. Secret keys only.
Body Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Set status: pending, approved, or hidden |
admin_response | string | Public 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/:idPermanently 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"
}