Pebble + API code