RouterOS TCP API

The RouterOS TCP API is the native binary protocol for RouterOS, running on TCP port 8728 (standard) and TCP port 8729 (SSL/TLS). It uses a sentence-based word protocol with variable-length encoding, supporting tagged concurrent commands, streaming changes via /listen, and cancellation. Used by most RouterOS client libraries (Python, PHP, Java, Go, etc.).

API entry from apis.yml

apis.yml Raw ↑
aid: routeros:routeros-tcp-api
name: RouterOS TCP API
description: The RouterOS TCP API is the native binary protocol for RouterOS, running on TCP port 8728
  (standard) and TCP port 8729 (SSL/TLS). It uses a sentence-based word protocol with variable-length
  encoding, supporting tagged concurrent commands, streaming changes via /listen, and cancellation. Used
  by most RouterOS client libraries (Python, PHP, Java, Go, etc.).
humanURL: https://help.mikrotik.com/docs/spaces/ROS/pages/47579160/API
baseURL: tcp://{router-ip}:8728
version: 6.43+
tags:
- Networking
- Router Management
- TCP API
- Binary Protocol
properties:
- url: https://help.mikrotik.com/docs/spaces/ROS/pages/47579160/API
  type: Documentation
- url: https://wiki.mikrotik.com/wiki/Manual:API
  type: Documentation