Integration

The 'latest' Keyword for the Salesforce REST API: Stop Hardcoding Version Numbers

By Rishabh Panwar · Published 20 September 2026 · 4 min read · Beginner

Every Salesforce integration carries a version number baked into its URIs — /services/data/v66.0/... — and every release, someone has to decide whether to bump it. Winter ‘27 adds a small convenience for the cases where you’d rather not track that at all: you can write latest in place of the version number.

https://<MyDomainName>.my.salesforce.com/services/data/latest/sobjects/Account

Instead of the pinned form:

https://<MyDomainName>.my.salesforce.com/services/data/v66.0/sobjects/Account

Requests to the latest path route to the most recent REST API version your org supports. That’s the whole feature — and its usefulness depends entirely on the context you use it in.

Where it helps

For internal scripts, prototypes, local tooling, and one-off exploratory calls, latest removes a genuine chore. You always hit the newest version, and if something shifts, the cost is low because the caller isn’t a production dependency. This is the intended sweet spot: convenience for work where being current matters more than being stable.

Where to keep pinning

For a production integration, “automatically moves to a new API version every release” is a behaviour to think twice about. A version bump can bring schema changes, altered defaults, or subtly different responses — and with latest, that arrives without a deploy, a review, or a changelog entry on your side. The safer pattern for anything a business depends on is to pin an explicit version and upgrade deliberately, testing against the new version before you move.

That’s the same discipline that shows up whenever you choose a Salesforce integration pattern: the convenient default and the resilient default aren’t always the same one. latest is a good tool for the low-stakes majority of calls and a poor default for the calls that page someone at 2am.

What it doesn’t touch

latest only changes which version the URI resolves to. Authentication, headers, and request and response formats behave exactly as they would for that resolved version — the same care around error handling and retries covered in building resilient Salesforce integrations still applies. It removes a maintenance chore, nothing more, which is precisely why it’s worth using in the right place and avoiding in the wrong one.

Frequently asked questions

What is the 'latest' keyword in the Salesforce REST API?

Winter '27 lets you write 'latest' instead of a version number in the REST API URI, for example /services/data/latest/sobjects/Account. Requests then route to the most recent REST API version your org supports.

How do I use the 'latest' keyword?

Replace the version segment in the URI. Change /services/data/v66.0/sobjects/Account to /services/data/latest/sobjects/Account. No other change is required.

Should I use 'latest' in production integrations?

Be cautious. 'latest' means your requests move to a new API version automatically each release, which can surface behaviour or schema changes without a deploy. For production integrations, pinning an explicit version and upgrading deliberately is usually safer.

When is 'latest' actually useful?

For internal tooling, scripts, prototypes, and exploratory calls where always being on the newest version is convenient and an unexpected change is low cost. It removes the chore of tracking version numbers for throwaway or low-risk work.

Does 'latest' change how authentication or the response format works?

No. It only changes which API version the URI targets. Authentication, headers, and the request and response formats behave as they do for the resolved version.

Which editions support the 'latest' keyword?

It applies to API-enabled editions, including Enterprise, Performance, Unlimited, Developer, Professional (with API access), Group, and Database.com, in both Lightning Experience and Salesforce Classic.