flespi Channels API

[Channel](https://flespi.com/kb/channel-entry-point-to-gateway) is a protocol-specific entry point for tracking devices to the [flespi telematics hub](https://flespi.com). Configured channel starts to listen to new TCP/UDP connections from tracking devices on a **dedicated domain name:port**. In some cases, channel provides a secondary URI to connect auxiliary devices such as tachographs and cameras. One channel parses messages from devices communicating over one protocol selected during channel creation. Channel provides only data ingestion functionality. In most cases you need to register [virtual device](https://flespi.com/kb/device-virtual-instance-of-real-tracker) with device type that corresponds to channel protocol. With registered virtual device you have [remote control](https://flespi.com/kb/commands-and-settings) capabilities, long term telematics data storage, rich [reporting engine](https://flespi.com/kb/analytics-flespi-reports-engine), can perfom [data correction](https://flespi.com/kb/plugins-functionality-extensions-for-flespi-devices) and much more. Also the actual parameters in parsed messages can be different across [device types](https://flespi.com/devices) which is also defined by the registered virtual device. All channel modification operations are reported to common [logs subsystem](https://flespi.io/docs/#/platform/logs) with the following possible event codes: Event code | Description -----|------ 1|channel was created via REST API 2|channel was updated via REST API 3|channel was deleted via REST API 20|channel was blocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information 21|channel was unblocked, see [customer](https://flespi.io/docs/#/platform/customer) for more information 100|channel accepted connection 101|channel connection was identified 102|channel connection was closed 103|channel data processing error 104|channel data processing warning 114|channel configuration is invalid 115|the command has been sent into the transport connection 116|channel protocol was modified Log records produced by the channel protocol parser (connection, data processing and command events) contain the "protocol_modified" parameter - modification timestamp of the channel protocol whose parser produced the record. Connection keeps the parser it was established with until it is closed, even if the protocol is modified in the meantime. If channel protocol is modified (event_code=116), you may expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- protocol_name |name of the modified channel protocol protocol_modified |new modification timestamp of the channel protocol previous_protocol_modified |previous modification timestamp of the channel protocol If you do not see anything in channel logs it means that device never attempted to establish connection to the channel and there is nothing to debug on flespi, you should check device configuration first. Whenever you need to troubleshoot device operation you can investigate raw traffic between flespi channel and hardware device. You can fetch traffic packets via API or just use flespi.io panel for this. On 'Logs & Messages' tab there is TRAFFIC button and also from each log record or message you can navigate to associated raw traffic exchange via context menu command. For traffic from unidentified connections or connectionless protocols please check the traffic under 'unidentified' ident value. ###### Channel messages Parsed data from tracking devices is stored in the message buffer associated with the given channel. Message fields depend on the channel [protocol](https://flespi.com/protocols) and type of [registered device](https://flespi.com/kb/device-virtual-instance-of-real-tracker). [Messages](https://flespi.com/kb/messages-basic-information-units) can be pulled out from the buffer via a **channels/messages** request in a **single reader** mode, meaning that stable reading process can be performed by only one worker. It is also possible to receive channel messages in realtime using MQTT API by subscribing to 'flespi/message/gw/channels/#' topic. To stay current with channel protocol updates, subscribe to 'flespi/message/gw/channel-protocols/{protocol-id}/changelog' MQTT topic delivering any changes published in the channel protocol [changelog](https://forum.flespi.com/t/changelog). And [streams](https://flespi.com/kb/stream-forward-data-from-gateway) can be used to push messages to your application in variety of protocols. Every message in the buffer is represented by a JSON object with the following fields: Field | Description --------|---------- timestamp | Actual message time provided by tracking device ident | Tracking device identification string** * ** [param name] | Any additional parameters passed by tracking device ** * ** *Unique tracking device identifier. It can be IMEI, international phone number or device serial number. Symbols '#','+','/',':' are not allowed. The way flespi gateway identifies a certain device is defined by the protocol.* ###### Channel connections Information on every active TCP connection from a tracking device to the specified channel: * connection opening time * listening channel ID * connected device IP address and identification string Connections opening, closing, and identification operations report to the common [logs subsystem](https://flespi.io/docs/#/platform/logs) with the following possible event codes: Event code | Description -----|------ 100|channel has accepted connection 101|channel connection was identified 102|channel connection was closed, see below values of "close_code" parameter If connection is accepted or identified (event_code=100 or event_code=101), you may expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- source |connected device's address transport |connected device's transport: tcp, udp, http etc. ident |connected device's identification string (optional, last value only) protocol_modified |modification timestamp of the channel protocol serving the connection If connection is closed (event_code=102), you may expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- close_code |the reason of connection close operation error_text |optional, additional error information source |connected device's address transport |connected device's transport: tcp, udp, http etc. ident |connected device's identification string (optional, last value only) protocol_modified |modification timestamp of the channel protocol serving the connection duration |connection duration in seconds msgs |quantity of messages received recv |quantity of bytes received send |quantity of bytes sent Possible "close_code" values: Code | Event -----|------ 2|connection closed by tracking device 3|connection successfully processed and closed 4|received data violates channel's protocol 5|internal error 6|data parsing error (see log details) 7|connection closed due to server restart 8|protocol implementation updated 9|channel's parameters changed 10|connection closed upon user's request 11|outgoing connection failed 12|Current connection closed because of ident collision: device has opened another connection to the channel without closing the first one. It may happen because of device firmware bug or by an unstable connectivity provider. In general, this happens to plenty of devices and usually can be ignored. 13|device is blocked 14|authentication failed 15|device associated with the connection was created, changed or deleted 16|channel rejected connection due to IP addresses match blacklist or mismatch whitelist 17|connection is closed by inactivity timeout 18|unsupported protocol part 19|protocol mismatch 20|processing was cancelled 21|channel is blocked 22|device media is blocked 23|device is disabled Here is an example of a log record reporting that **TCP** connection from **127.0.0.1** to **channel 1374** was successfully processed and closed after **11 seconds** and identified by device with ident **123456789**, **32** bytes received and **64** bytes transmitted, **10** messages total: ```json { "close_code": 3, "duration": 11, "event_code": 102, "event_origin": "gw/channels/1374", "event_text": "connections/127.0.0.1/closed", "ident": "123456789", "msgs": 10, "recv": 32, "send": 64, "source": "127.0.0.1", "timestamp": 1490347944.893743, "transport": "tcp" } ``` ###### Channel blocking When channel usage exceeds account limits the platform puts the [block reason](https://flespi.io/docs/#/platform/customer) code into the channel 'blocked' field. Codes 1, 2 and 3 pause the channel: it stops accepting new connections while established ones keep operating on TCP, MQTT and FTP transports. On traffic and messages overflow the most consuming devices are blocked before the channel itself. Other codes stop the channel and close all its connections.

GitHub OpenAPI

Operations 20

GET /channel-protocols/{channel-protocols.selector} Fetch available channel protocols #
GET /channel-protocols/{channel-protocols.selector}/changelog-posts Fetch changelog posts of channel protocols #
POST /channels Create new channel #
DELETE /channels/{ch-selector} Delete channels #
GET /channels/{ch-selector} List available channels #
PATCH /channels/{ch-selector} Patch item properties #
PUT /channels/{ch-selector} Modify channels properties #
PUT /channels/{ch-selector}/cid Move channel between subaccounts #
DELETE /channels/{ch-selector}/connections/{conn-selector} Close TCP connections #
GET /channels/{ch-selector}/connections/{conn-selector} List active channel TCP connections #
GET /channels/{ch-selector}/idents/{ch-ident-selector}/packets Retrieve raw traffic for ident #
GET /channels/{ch-selector}/idents/{channel.ident.selector} List idents reported to the channel #
GET /channels/{ch-selector}/logs Retrieve channel logs #
GET /channels/{ch-selector}/logs/calculate Calculate intervals from channel logs #
POST /channels/{ch-selector}/logs/calculate Calculate intervals from channel logs #
DELETE /channels/{ch-selector}/messages Delete messages from channel buffer #
GET /channels/{ch-selector}/messages Read messages from channel buffer #
DELETE /streams/{stream.selector}/channels/{stream.channels.selector} Unsubscribe stream from channels #
GET /streams/{stream.selector}/channels/{stream.channels.selector} List channels to which stream is subscribed #
POST /streams/{stream.selector}/channels/{stream.channels.selector} Subscribe stream to channel messages #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/flespi:flespi-channels-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

flespi-channels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'This API (full-stack API for telematics devices) provides methods to create and manage the following instances of the flespi telematics hub that jointly provide the end-to-end communication between the GPS trackers and your target application:

    * **channels** - inbound protocol-specific pipes where the raw data from the trackers get parsed and saved in the unified JSON format in the buffer for further consumption.

    * **devices** - virtual representations of the physical trackers on the flespi platform. Allow organizing messages storage by device (ident), remote device configuration, dedicated long-term storage, video telematics functionality, access to telemetry and much more.

    * **streams** - outbound data flows preformatted to forward the telematics data to specific target platforms (e.g. Google Pub/Sub, Amazon AWS IoT, Microsoft Azure IoT, and more).

    * **calculators** - sets of rules for detecting intervals and computing the associated values for them; integral prt of the flespi analytics engine.

    * **plugins** - allow extending the standard set of device parameters with additional ones required by specific platforms or applications, including copy of message into other devices, cancelling message registration and even enriching message parameters from your system via webhook.

    * **modems** - instance connecting the flespi platform with an SMS service provider for sending configurational text messages to change device settings.

    * **protocols** - access to the list of protocols, device types, available message parameters and commands.


    To identify each REST request flespi token has to be passed in the HTTP call via the header: **Authorization: FlespiToken XXXXXXXXXX**.

    The limit of URI component is 64 KiB.

    A request fails with 503 Service Unavailable when the server sends no response data for 300 seconds.


    All changes to the gateway items are recorded in the common logs subsystem.'
  title: flespi Telematics Hub REST Channels API
  version: '1.0'
servers:
- url: https://flespi.io/gw
- url: http://flespi.io/gw
tags:


# --- truncated at 32 KB (159 KB total) ---
# Full source: https://artifacts.apis.io/flespi/openapi/flespi-channels-api-openapi.yml