canonical: https://jentic.com/apis/lyft.com/lyft

# Lyft

The Lyft API exposes Lyft's ridesharing primitives - cost estimates, ETAs, available drivers nearby, ride request and lifecycle, ride types, profile, and a sandbox for simulating ride status transitions and primetime. The 16 endpoints cover the journey from quoting a ride through requesting, updating destination, rating, and pulling a receipt. Authentication uses OAuth 2.0 with two flows: client credentials for public endpoints (cost, ETA) and authorization code for user-scoped operations (rides, profile).

## For AI agents

Quote Lyft ride costs and ETAs, request and cancel rides, update destinations, list ride types, and retrieve receipts via the Lyft platform.

## Scope

Does not handle food delivery, scooter rentals, or driver-side dispatch - use for Lyft passenger ride quoting, requesting, updating, and receipt retrieval only.

## Capabilities

- Generate cost estimates between two coordinates with /cost
- Return available drivers nearby and pickup ETAs for a coordinate
- Request a ride with POST /rides and cancel an active request with POST `/rides/{id}/cancel`
- Update the destination of an in-progress ride with PUT `/rides/{id}/destination`
- Rate the driver and add a tip after the ride with PUT `/rides/{id}/rating`
- Fetch the receipt for a completed ride and list past rides on the user profile
- Use the sandbox endpoints to simulate ride status transitions, ride types, and primetime

## Use cases

### In-app ride booking inside another product

Travel apps and concierge services embed Lyft ride booking by chaining /cost and /eta to quote the trip, POST /rides to request it, and PUT `/rides/{id}/destination` if the user changes their mind mid-trip. The user authentication OAuth flow grants the rides.request scope, and POST `/rides/{id}/cancel` covers cancellation. This avoids deep linking out to the Lyft consumer app for partner experiences.

Example prompt: Call GET /cost and GET /eta for the pickup and dropoff coordinates, then POST /rides to request the ride if the quote is accepted.

### Sandbox-based simulation for QA

Engineering teams use the /sandbox endpoints to drive a fake Lyft trip through state transitions before integrating against the live API. PUT `/sandbox/rides/{id}` propagates a ride through statuses, `/sandbox/primetime` sets a preset surge percentage, and `/sandbox/ridetypes` preset the available types. This lets QA cover the full lifecycle without spending money on real rides.

Example prompt: PUT `/sandbox/rides/{id}` to advance a sandbox ride from 'pending' to 'arrived' so the integration UI can be tested end to end.

### Receipt and history retrieval for expense tools

Expense tools and travel managers pull a user's past Lyft rides via GET /rides and the receipt for a specific ride via GET `/rides/{id}/receipt` to attach to expense reports. With the rides.read scope, this avoids manual screenshotting from the Lyft app and enables automated reconciliation.

Example prompt: List the last 10 rides via GET /rides and pull the receipt for each via GET `/rides/{id}/receipt` for the expense report.

### Agent-driven ride orchestration via Jentic

An AI travel concierge needs to book and adjust Lyft rides without juggling two OAuth flows or memorising the sandbox vs production split. Jentic stores both the client-credentials and authorization-code tokens in your Jentic One instance, exposes each Lyft operation by intent, and lets the agent chain cost, ETA, request, and cancel calls.

Example prompt: Search Jentic for 'lyft cost estimate', execute it for the trip, then chain POST /rides to request the ride.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/cost` | Cost estimates for a trip |
| GET | `/eta` | Pickup ETAs |
| GET | `/drivers` | Available drivers nearby |
| POST | `/rides` | Request a Lyft |
| POST | `/rides/{id}/cancel` | Cancel an ongoing ride request |
| PUT | `/rides/{id}/destination` | Update the destination of a ride |
| GET | `/rides/{id}/receipt` | Get the receipt for a completed ride |

## Key resources

- **Cost** — Cost estimates between two coordinates
- **ETA** — Pickup ETAs for a coordinate
- **Drivers** — Available drivers near a coordinate
- **Rides** — Request, list, get, cancel, update destination, rate, and receipt
- **Ride Types** — List of ride product types available
- **Profile** — User general profile information
- **Sandbox** — Simulate ride state, primetime, and ride types

## Why Jentic

- **Setup:** Wiring the Lyft API by hand means running its OAuth flow, keeping a bearer token fresh for public estimate calls versus user-scoped ride calls, and handling the two credential types across cost, ETA, and ride paths. Through Jentic you install once, import Lyft from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** You choose which Lyft operations the agent may call, so you can limit it to the ones it needs, such as cost estimates and pickup ETAs, and leave out actions like requesting or cancelling a ride unless you add them. The agent only reaches the operations in the set you allow.
- **Credential handling:** Your Lyft credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'Lyft cost estimate', 'request a Lyft', or 'cancel a ride', and Jentic returns the matching Lyft operation with its parameter schema so the agent calls the right endpoint directly.

## Related APIs

- **Lyft** — Companion Jentic-curated import of the same Lyft ridesharing API
- **Google Calendar** — Calendar API for scheduling around booked rides

## FAQ

### What authentication does the Lyft API use?

The Lyft API uses OAuth 2.0 with two flows: client credentials at https://api.lyft.com/oauth/token for public endpoints (cost, ETA) under the 'public' scope, and authorization code for user operations under 'profile', 'rides.read', and 'rides.request'. Through Jentic, the Lyft client secret is stored in your Jentic One instance and tokens are exchanged automatically per call.

### Can I request a ride and update its destination mid-trip?

Yes. POST /rides creates the ride request and returns a ride ID. While the ride is active you can PUT `/rides/{id}/destination` to change the destination, POST `/rides/{id}/cancel` to cancel it, or wait for completion and call GET `/rides/{id}/receipt` for the final receipt.

### What are the rate limits for the Lyft API?

Specific rate limits are not declared in this OpenAPI spec. Plan for per-application limits set in the Lyft developer portal - design clients to back off on 429 responses and avoid polling /eta or /drivers more aggressively than once per few seconds per coordinate.

### How do I get a cost estimate through Jentic?

Search Jentic for 'lyft cost estimate', load GET /cost, and execute it with the start and end latitude/longitude. Jentic exchanges the client-credentials token automatically and returns the estimated price range.

### Is the Lyft sandbox useful before going live?

Yes. The /sandbox endpoints (PUT `/sandbox/rides/{id}`, `/sandbox/primetime`, `/sandbox/ridetypes`) let you advance a fake ride through statuses, set a preset primetime percentage, and preset ride types, so you can test the full integration without spending money.

### Can I limit what my agent is allowed to do with the Lyft API?

Yes. Jentic One is self-hosted by you, so your own rules decide which Lyft operations and credentials the agent may use. You can allow read-only calls like GET /cost and GET /eta while withholding actions such as POST /rides, POST `/rides/{id}/cancel`, and PUT `/rides/{id}/destination` unless you explicitly add them. The agent only ever reaches the operations in the set you permit.
