flespi Modems API

API to manage modems. [Modem](https://flespi.com/kb/modem-instance-to-send-sms) can be used to send commands as SMS messages to devices. Depending on the modem type some modems require ICCID to be specified in device configuration in phone_number field and some require phone number in international format (starts with '+'). If you have multiple modems created in your account SMS delivery will be performed through modem with the highest priority first. If it fail, than modem with lower priority will be attempted for the delivery and so on. A special modem with the configuration.type = "flespi" is provided by default but allows sending a limited quantity of SMS messages (10 SMSes in Free plan). You can create only one modem of such type and you can delete and create it anytime without any additional configuration. Check the details about the number of SMS messages available in the Free and Commerical plans on the [platform pricing](https://flespi.com/pricing) page. All actions with modems are reported to the common [logs subsystem](https://flespi.io/docs/#/platform/logs) with the following possible event codes: Event code | Description -----|------ 200|SMS (delivery receipt) was received via modem 201|SMS was sent via modem 202|modem has successfully connected to SMS gateway 203|modem has lost connection to SMS gateway 204|failed to connect to SMS gateway 205|failed to send SMS via modem If SMS was received via modem (event_code=200), you can expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- address | SMS source address that sent this message timestamp | timestamp type | hex or text text | textual SMS content (for text messages only) hex | hex representation of binary SMS content (for binary messages only) If SMS was sent via modem (event_code=201), you can expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- address | SMS destination address that should receive this message type | hex or text text | textual SMS content (for text messages only) hex | hex representation of binary SMS content (for binary messages only) send_code | resulting code for send operation, zero if no errors sender_cid | subaccount ID from which send request originated (typically it is ID of subaccount where the device to which SMS was sent is located in) If failed to connect to SMS gateway (event_code=204), you can expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- error_text | error description If failed to send SMS via modem (event_code=205), you can expect the following additional parameters in the log record: Field name | Meaning ----------------------|-------- address | SMS destination address that should receive this message type | hex or text text | textual SMS content (for text messages only) hex | hex representation of binary SMS content (for binary messages only) send_code | resulting code for send operation sender_cid | subaccount ID from which send request originated (typically it is ID of subaccount where the device to which SMS was sent is located in) error_text | error description You can expect the following additional values for send_code parameter: Send code | Description -----|------ -5|Address type is not supported by the current modem -4|Internal error -3|No modem available -2|Error from SMS gateway, see special 'error_text' field for error description -1|No more SMS available for current period 0|SMS accepted for delivery by SMS gateway

GitHub OpenAPI

Operations 8

POST /modems Create modem #
DELETE /modems/{modem-selector} Delete modem #
GET /modems/{modem-selector} Retrieve modems #
PATCH /modems/{modem-selector} Patch item properties #
PUT /modems/{modem-selector} Update modem configuration #
GET /modems/{modem-selector}/logs Retrieve modem logs #
GET /modems/{modem-selector}/logs/calculate Calculate intervals from modem logs #
POST /modems/{modem-selector}/logs/calculate Calculate intervals from modem logs #

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-modems-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-modems-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 Modems API
  version: '1.0'
servers:
- url: https://flespi.io/gw
- url: http://flespi.io/gw
tags:


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