Mobility Data Specification: Agency

July 7, 2026 ยท View on GitHub

MDS Agency Icon

The Agency API endpoints are intended to be implemented by regulatory agencies and consumed by mobility providers. Data is pushed to agencies by providers. Agencies use the Agency API to see when events (such as a trip start or vehicle status change) occur in provider systems in real-time.

This specification contains a collection of RESTful APIs used to specify the digital relationship between mobility as a service providers and the agencies that regulate them.

Table of Contents

General information

This specification uses data types including timestamps, UUIDs, and vehicle state definitions as described in the MDS General Information document.

Top

Authorization

MDS Agency endpoint producers SHALL provide authorization for API endpoints via a bearer token based auth system. When making requests, the endpoints expect provider_id to be part of the claims in a JSON Web Token (JWT) access_token in the Authorization header, in the form Authorization: Bearer <access_token>. The token issuance, expiration and revocation policies are at the discretion of the agency. JSON Web Token is the recommended format.

General authorization details are specified in the Authorization section in MDS General Information.

Top

Versioning

Agency APIs must handle requests for specific versions of the specification from clients.

Versioning must be implemented as specified in the Versioning section.

Top

Modes

MDS is intended to be used for multiple transportation modes, including its original micromobility (e-scooters, bikes, etc.) mode, as well as additional modes such as taxis, car share, and delivery bots. A given provider_id shall be associated with a single mobility mode, so that the mode does not have to be specified in each data structure and API call. A provider implementing more than one mode shall register a unique provider_id for each mode.

Top

Responses and Error Messages

The response to a client request must include a valid HTTP status code defined in the IANA HTTP Status Code Registry.

The response must set the Content-Type header as specified in the Versioning section.

Response bodies must be a UTF-8 encoded JSON object

See the Responses, Error Messages, and Bulk Responses sections, and the schema for more details.

Top

GBFS

See the GBFS Requirement language for more details.

Top

Data Schema

See the general REST Endpoints documentation and specific endpoints below for information on their data structure and schema, and the mds-openapi repository for full details and interactive documentation.

Top

Vehicles

The /vehicles endpoints allow providers to register and update the properties of their fleet vehicles, and query current vehicle properties and status.

Vehicle - Register

The /vehicles registration endpoint is used to register vehicles for use in the Agency's jurisdiction.

Endpoint: /vehicles
Method: POST
Payload: An array of Vehicles

Responses

Possible HTTP Status Codes: 201, 400, 401, 406, 409, 500

See Responses, Bulk Responses, and schema for details.

Top

Error Codes:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
already_registeredA vehicle with device_id is already registered

Vehicle - Update

The /vehicles update endpoint is used to change vehicle information, should some aspect of the vehicle change, such as the vehicle_id. Each vehicle must already be registered.

Endpoint: /vehicles
Method: PUT
Payload: An array of Vehicles

Responses

Possible HTTP Status Codes: 200, 400, 401, 406, 409, 500

See Responses, Bulk Responses, and schema for details.

Error Codes:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
unregisteredThis device_id is unregistered

Top

Vehicle - List

The /vehicles endpoint returns the specified vehicle (if a device_id is provided) or a list of known vehicles. Providers can only retrieve data for vehicles in their registered fleet. Contains vehicle properties that do not change often.

Endpoint: /vehicles/{device_id}
Method: GET
Payload: An array of Vehicles

Path Parameters:

Path ParametersTypeRequired/OptionalDescription
device_idUUIDOptionalIf provided, retrieve the specified vehicle

If device_id is specified, GET will return an array with a single vehicle record, otherwise it will be a list of vehicle records with pagination details (see Pagination):

{
    "version": "2.0.0",
    "vehicles": [ ... ]
    "links": {
        "first": "https://...",
        "last": "https://...",
        "prev": "https://...",
        "next": "https://..."
    }
}

Responses

Possible HTTP Status Codes: 200, 400 (with parameter), 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Top

Vehicle - Status

The /vehicles/status endpoint returns information about the specified vehicle (if a device_id is provided) or a list of known vehicles current state. Providers can only retrieve data for vehicles in their registered fleet. Contains specific vehicle properties that are updated frequently.

Endpoint: /vehicles/status/{device_id}
Method: GET
Payload: An array of Vehicles objects

Path Parameters:

Path ParametersTypeRequired/OptionalDescription
device_idUUIDOptionalIf provided, retrieve the specified vehicle

If device_id is specified, GET will return an array with a vehicle status record, otherwise it will be a list of vehicle records with pagination details (see Pagination):

{
    "version": "2.0.0",
    "vehicles_status": [ ... ]
    "links": {
        "first": "https://...",
        "last": "https://...",
        "prev": "https://...",
        "next": "https://..."
    }
}

Responses

Possible HTTP Status Codes: 200, 400 (with parameter), 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Top

Trips

The Trips endpoint serves two purposes:

  • Definitively indicating that a Trip (a sequence of events linked by a trip_id) has been completed. For example, from analyzing only the raw Vehicle Events feed, if a trip crosses an Agency's jurisdictional boundaries but does not end within the jurisdiction (last event_type seen is a leave_jurisdiction), this can result in a 'dangling trip'. The Trips endpoint satisfies this concern, by acting as a final indication that a trip has been finished, even if it ends outside of jurisdictional boundaries; if a trip has intersected an Agency's jurisdictional boundaries at all during a trip, it is expected that a Provider will send a Trip payload to the Agency following the trip's completion.
  • Providing information to an Agency regarding an entire trip, without extending any of the Vehicle Event payloads, or changing any requirements on when Vehicle Events should be sent.

Endpoint: /trips
Method: POST
Payload: Array of Trips

Responses

Possible HTTP Status Codes: 201, 400, 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Trip Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
unregisteredThis device_id is unregistered

Top

Telemetry

The vehicle /telemetry endpoint allows a Provider to send vehicle telemetry data in a batch for any number of vehicles in the fleet.

Endpoint: /telemetry
Method: POST
Payload: An array of vehicle Telemetry

Responses

Possible HTTP Status Codes: 201, 400, 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Telemetry Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
unregisteredThis device_id is unregistered

Top

Events

The vehicle /events endpoint allows the Provider to submit events describing the state changes of multiple vehicles.

Endpoint: /events
Method: POST
Payload: An array of vehicle Events

Responses

Possible HTTP Status Codes: 201, 400, 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Event Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
unregisteredThis device_id is unregistered

Top

Stops

Stops - Register

The /stops endpoint allows an agency to register city-managed Stops, or a provider to register self-managed Stops.

Endpoint: /stops
Method: POST
Payload: An array of Stops

Responses

Possible HTTP Status Codes: 201, 400, 401, 406, 409, 500

See Responses, Bulk Responses, and schema for details.

Stops Register Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
already_registeredA stop with stop_id is already registered

403 Unauthorized Response:

None

Top

Stops - Update

Endpoint: /stops
Method: PUT
Payload: An array of of Stop information, where the permitted changeable fields are defined as:

FieldRequired/OptionalDescription
stop_idRequiredSee Stops
last_updatedOptionalSee Stops
statusOptionalSee Stops
rental_methodsOptionalSee Stops
num_vehicles_availableOptionalSee Stops
num_vehicles_disabledOptionalSee Stops
num_places_availableOptionalSee Stops
num_places_disabledOptionalSee Stops
devicesOptionalSee Stops

Responses

Possible HTTP Status Codes: 200, 400, 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Stops update Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
unregisteredNo stop with stop_id is already registered

Top

Stops - Readback

Endpoint: /stops/{stop_id}
Method: GET
Payload: An array of Stops

Path Parameters:

Path ParametersTypeRequired/OptionalDescription
stop_idUUIDOptionalIf provided, retrieve the specified stop

If stop_id is specified, GET will return an array with a single stop record, otherwise it will be a list of all stop records.

Responses

Possible HTTP Status Codes: 200, 401, 404, 406, 500

See Responses, Bulk Responses, and schema for details.

Top

Incidents

The /incidents endpoints allow providers to create and update the details of incidents.

Incident - Create

The /incidents create endpoint is used to create incident reports that occur with provider devices.

Endpoint: /incidents
Method: POST
Payload: An array of Incidents

Responses

Possible HTTP Status Codes: 201, 400, 401, 406, 409, 500

See Responses, Bulk Responses, and schema for details.

Top

Error Codes:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
missing_paramA required parameter is missingArray of missing parameters
already_createdAn incident with incident_id is already careated

Incident - Update

The /incidents update endpoint is used to change incident information, should some aspect of the incident change. Each incident must already be created.

Endpoint: /incidents
Method: PUT
Payload: An array of Incidents

Responses

Possible HTTP Status Codes: 200, 400, 401, 406, 409, 500

See Responses, Bulk Responses, and schema for details.

Error Codes:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors
unregisteredThis incident_id is unregistered

Top

Reports

Reports are information that providers can send back to agencies containing aggregated data that is not contained within other MDS endpoints, like counts of special groups of riders. These supplemental reports are not a substitute for other MDS Provider endpoints.

The authenticated reports are monthly, historic flat files that may be pre-generated by the provider.

Top

Reports - Register

The /reports endpoint allows an agency to register aggregated report counts in CSV structure.

Endpoint: /reports
Method: POST
Payload: A CSV of Reports

Responses

Possible HTTP Status Codes: 201, 400, 401, 406, 500

See Responses, Bulk Responses, and schema for details.

Reports Register Errors:

errorerror_descriptionerror_details[]
bad_paramA validation error occurredArray of parameters with errors

400 Unauthorized Response:

None

Top