Get Started

The AT&T M2X service provides you with all the essential tools you’ll need to develop your connected product.
We’ve made it easy for your business to connect millions of M2M devices to the Internet of Things.
Use this guide to get started with the M2X Developer Portal and M2X API.

What is M2X?

AT&T’s M2X is a cloud-based data storage service and device management toolset customized for the Internet of Things. Organize millions of connected devices, gather data in real-time, and translate that data into meaningful information for quick decisions, automated actions, and strategic analysis.

The Internet of Things encompasses a broad range of internet connected devices and services that are powering a new ecosystem. From wearables and smart thermostats to cars and planes, this new generation of smart connected ‘things’ are capable of data gathering, predictive analytics, and process automation. Such capabilities require powerful new infrastructure to support them, and AT&T’s M2X is there to assist.

The AT&T M2X Service

Quickly build innovative network enabled products for the Internet of Things

Connected Devices Time Series Data Storage Device Analytics Device Management M2X captures datapoints in
real-time from connected Devices
Visualize device data streams
via graphs and charts
Manage device permissions via Device API keys and system level permissions via API Master Keys Datapoint dependent triggers can be set to enable action on real-world events (i.e. an oil leak can be detected by the rapid drop in oil volume, which is being monitored by a sensor connected to M2X).

Creating and Distributing Devices

Development in M2X is broken into three stages to facilitate easy onboarding of new
devices and transition into the production phase your Internet of Things project.

  • Device Onboarding

    Newly added Devices begin in the prototyping stage of development. Here you can test, tune, and iterate before distributing.

    Check out the Device Onboarding tutorial to get started.

    Device's are the primary entity in M2X and can be configured with the following:
    • Streams: numeric or non-numeric time-series data, ideal for historical analytics & the basis for real-time event Triggers
    • Meta­data: definition of the device, e.g. serial, name, description, custom metadata
    • Triggers: event based notifications triggered by pre-defined conditions, for example: "when temperature is greater than 50°C & fan status is set to off, fire a command"
    • Location: latitude, longitude and elevation(optional) of the device, stored in a time-series
    • API Keys:­ allowing for granular access, e.g. providing read-only access to device data
  • Device Distributions

    Distributions give you the power to easily scale from a single Device prototype to millions and makes managing large numbers of Devices easy. Each device in a distribution retains the characteristics of the original Device used to create the Distribution.

    Check out the tutorial on Launching a Distribution for more details on getting started with Distributions.

    From the Distribution stage you can:
    • Create new Distributions based off a prototype Device
    • Search Devices contained within a specific Distribution
    • Send commands to all or a subset of Devices contained within a Distribution based on a Device Search query
  • Organize, Command, Act

    Organize devices into Collections and classify using tags, send Commands to devices, automatically act on data conditions with Triggers which monitor data Streams in real-time.

    Configure granular access permissions at all levels:

    • Master Keys provide API access at
      the account level.
    • Device API Keys provide API access
      at the Device level.
    • Distribution API Keys provide API access
      at the Distribution level.
    • Collection API Keys provide API access at the Collection level.

Test out the AT&T M2X API

Download the following script and place it in a folder you like. This script will run in a 1-second loop and will send your computer's average load to a Stream within your M2X Device.

#! /usr/bin/env bash

m2x_create_stream() {
    curl -s -H "X-M2X-KEY: ${M2X_API_KEY}" \
        -XPUT -d "" \${DEVICE}/streams/$1

m2x_write() {
    local body=$(curl -s -H "X-M2X-KEY: ${M2X_API_KEY}" \
        -H "Content-Type: application/json" \
        -XPOST -d "$1" \${DEVICE}/updates)

    [[ -z $body ]] || echo $body

# Create streams if they don't exist
m2x_create_stream "load_1m"
m2x_create_stream "load_5m"
m2x_create_stream "load_15m"

while :
    load=$(uptime | awk '{ print $(NF-2), $(NF-1), $NF }' | tr -d ,)

    load_1m=$(echo $load | cut -f 1 -d\ )
    load_5m=$(echo $load | cut -f 2 -d\ )
    load_15m=$(echo $load | cut -f 3 -d\ )

    timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")

    payload="{ \"values\": { \
        \"load_1m\"  : [{ \"timestamp\": \"$timestamp\", \"value\": $load_1m }], \
        \"load_5m\"  : [{ \"timestamp\": \"$timestamp\", \"value\": $load_5m }], \
        \"load_15m\" : [{ \"timestamp\": \"$timestamp\", \"value\": $load_15m }] \
    } }"

    m2x_write "$payload"

    sleep 1

Create a test Device and copy its Device ID and API KEY. Then, execute the script and watch your Streams start receiving values!

> M2X_API_KEY="<Your-API-key>" DEVICE="<Your-Device-ID>" bash

You can also get up to speed quickly on the M2X API using the Command-Line Cheatsheet.

Developer Tools

With the tools provided in the M2X Developer Portal you can enable your Internet connected device to
begin two-­way communication with the M2X service via our RESTful API within minutes. For access to other AT&T APIs, please visit the AT&T Developer Program. To help you get started with M2X, you might find these developer resources helpful:

Use Cases for App Concepting

Soil Temperature Sensor

1 of 3
“I need to know when to harvest my grapes” Hanzell — Vineyard Owner, Male, 46
Key Characteristics
  • Academic background with a focus on agriculture.
  • Owns 36 acres of vines — wine is produced and bottled on the property.
  • Needs reliable, real-time data, over long periods of time.
  • Needs to know soil temperature and moisture levels throughout his vineyards.
  • Needs easy tools to analyze data without being a “techy.”
Pain Points
  • Loss of grapes from avoidable causes.
  • Inconsistent wine quality due to environmental changes.
  • Complicated technology that isn’t easy to use.
  • Increasing the efficiency of his vineyard.
  • Knowing definitively when to plant / harvest.
  • Understanding the technology that he relies on.
Product Concept: Soil Temperature Sensor
  • Monitors soil temperature and moisture level.
  • Sends notifications to Hanzell via email or text when specific event occurs (i.e.temperature drops to 0c or moisture levels drops).
  • Gives Hanzell the tools to make immediate actions based on real­time information.
“A healthy pet is a happy pet” Sarah — Veterinarian, Female, 37
Key Characteristics
  • Creative thinker — she’s good at managing unexpected situations.
  • Has a lot of patience and expert knowledge of the animals she treats.
  • Needs tools that enable her clients (pet owners) to better take care of their pets.
  • Needs new technologies that can help pet owners be more aware of their pet’s day‐to‐day health.
Pain Points
  • Pets that have been neglected or improperly cared for.
  • Easily avoidable problems (e.g. malnutrition and dehydration) that evolved into more severe issues.
  • Treating well cared for happy pets.
  • Doing her job well.
  • Being able to provide tools that help pet owners be successful in her care.
Product Concept: Smart Dish
  • Monitors water and food using a volume/weight sensor.
  • Sends notifications to pet owners via email or text when specific event occurs (i.e. food or water level is low).
Product Concept: Smart Collar
  • Tracks perspiration, heart rate and location information for your pet.
  • Now owners will know if their pets are getting enough exercise or where they are.
“Give me real-time status of my trucks” Ron — Truck Fleet Manager, Male, 53
Key Characteristics
  • Manages a fleet of trucks comprised of many different brands/models.
  • Tracks a lot of fleet data by hand.
  • Needs a service that will provide detailed information on each of his trucks regardless of model/brand.
  • Needs real-time information that can be turned into actionable items (i.e. oil leak = oil pan repair needed).
Pain Points
  • The applications he uses are provided by manufacturers and only work for their trucks. There is no integrated solution.
  • Costly, unnecessary repairs based on generic data (i.e. total engine run time).
  • Knowing the status of all of his operators and trucks out in the field.
  • Reducing expensive unnecessary maintenance costs.
  • Keeping his truck operators happy.
Product Concept: All-in-One Engine Monitor
  • Monitors temperature, oil pressure and water levels.
  • Sends notifications for each of Ron’s trucks to a centralized dashboard that gives him real-time information.
  • Alerts when a truck has failed.

App Ideas

Build solutions to complex real-world problems using AT&T M2X to manage millions of deployed devices:

Smart Home


PSoC 4 Board, Particle Core

Manage: Air, Motion, Temperature Sensing

Smart Soil Sensor


Nanode, Electric Imp

Manage: Temperature, Plant Diagnostics

Smart Fleet


Intel Galileo

Manage: Location, Consumption, Engine Stats

Smart Vending Machine


mbed LPC1768

Manage: Supply & Sales Record, Payments

Smart Trash


Arduino Uno

Manage: Toxicity, Capacity, Maintenance

Smart Dog Collar



Manage: Tracking, Geofencing, Health