protocol
The agreed rules for an exchange between two parties: what to send, in what order, and what each message means.
A protocol defines the messages two parties exchange, their formats and order, and how each side must respond, including to errors and silence.
Examples
The MQTT standard defines the MQTT protocol: which messages a client and broker exchange, in what order, and what to do on a timeout.
The Bluetooth Core Specification is one standard that defines several protocols, such as advertising and GATT.