---
title: "Local Pins"
canonical_url: https://developer.repebble.com/guides/pebble-timeline/timeline-local-pins/
last_updated: 2026-10-11
sdk_version: 4.44
---
# Local Pins

Source: https://developer.repebble.com/guides/pebble-timeline/timeline-local-pins/

PebbleKit JS can insert pins into the timeline directly from the phone. Local pins are created by the Pebble mobile app and synced to the watch, which means:

- No timeline token, API key, or appstore listing is needed, so sideloaded apps can use them.
- Pins only exist on the phone that created them - they are not shared with the user's other phones, and cannot be created while your app's JS is not running.

> The Pebble mobile app does not support the timeline web API, so pins can no longer be pushed to users from a web server. Local pins are the only way to add pins to the timeline from an app.

## Inserting a Pin

Pass a pin object (or a JSON string) in the format described in [_Creating Pins_](https://developer.repebble.com/guides/pebble-timeline/pin-structure.md):

```
Pebble.insertTimelinePin({id: 'local-pin-1',time: new Date().toISOString(),layout: {type: 'genericPin',title: 'Local pin',tinyIcon: 'system://images/NOTIFICATION\_FLAG'}});
```

The `id` is chosen by you and only needs to be unique within your app. Inserting a pin with an `id` that already exists updates that pin, rather than creating a second one.

## Deleting a Pin

Pins are removed using the same `id` they were inserted with:

```
Pebble.deleteTimelinePin('local-pin-1');
```

## Existing Timeline Web API Code

Apps written against the timeline web API do not need to be rewritten to keep working. Requests made from PebbleKit JS to `timeline-api.rebble.io` or `timeline-api.getpebble.com` under `/v1/user/pins` are intercepted by the phone and turned into local pins instead of being sent to a server - a `PUT` or `POST` inserts the pin in the request body, and a `DELETE` removes the pin named in the URL. The request completes with a `200` response and an empty body.

Only requests made by your app's JS are intercepted. Pins your backend pushes to the timeline web API will never reach the watch.

> Interception can be turned off by the user with the 'Emulate Timeline Webservice' setting in the Pebble mobile app, so new apps should call `Pebble.insertTimelinePin()` directly.

## Unsupported Fields

Local pins use the pin format described in [_Creating Pins_](https://developer.repebble.com/guides/pebble-timeline/pin-structure.md), with the following exceptions:

| Field | Behavior |
| --- | --- |
| `createNotification` | Ignored - no notification is shown when the pin is created. |
| `updateNotification` | Ignored - no notification is shown when the pin is updated. |
| `actions` | Ignored. Every local pin gets a 'Remove' action. |
| `primaryColor`, `secondaryColor`, `backgroundColor` | Ignored. |

All other fields, including `duration` and `reminders`, are supported.
