More from Developers
Select from the list below to learn more about the information and tools available for developers interested in MBTA data.
As we are introducing further improvements and fixes to the API, we try our best to make sure that our changes are backward-compatible. However, that’s not always possible; when we introduce a non backward-compatible change, we label it with a new version. The previous versions of the API still remain available and can be invoked using their own labels. In order to keep things simple, the version labels are formatted as a date, e.g. “2018-05-07”.
All API keys have a specific API version associated with them. This version controls the behavior of the API. Unless you change the version, the API behavior is going to remain the same, and any non-backward-compatible changes we make will not impact your application.
For users who want to upgrade, there are two ways:
- The default version can be changed via the portal
- The “MBTA-Version” header can be specified with each request
- For example,
- For example,
Newly created API keys will default to the current version at the time they were created. You can always check what version your key is using via the portal.
Anonymous access without an API key will always default to the latest version. It can also be overridden with the “MBTA-Version” header.
The following are changes that do not result in a new release:
- New resources
- New attributes on existing resources
- New relationships for existing resources
- New filters for existing resources
- Re-ordering of fields or values
- Changing the format or value of IDs
- In particular, trip IDs can be changed at any time
- However, IDs will always be strings
Upgrading to a new version
To upgrade to a new version, we suggest:
- Update your code to work with both the old and new versions, then
- Upgrade your default API version via the portal.
New releases will be posted to the developer group. We recommend subscribing to be notified about updates.
The documentation always reflects the latest version.
For non-backwards-compatible changes, see the changelog.