API v1 · operational

Marten Subscription Push API

This service connects an existing HTTPS subscription to Marten devices and lets its owner send a data-only silent push requesting a refresh.

It also provides scoped push relay channels for public Marten Server Simple deployments, keeping Firebase credentials exclusively on this central service. The push never contains a subscription URL, configuration, or credentials.

Quick start

Create a subscription channel. The response contains a public install URL and a one-time owner token. Store the token securely.

curl https://api.app.marten.pw/v1/subscriptions \
  -H 'Content-Type: application/json' \
  -d '{"name":"My subscription","url":"https://example.com/sub/token"}'

Request types

RequestAccessPurpose
POST /v1/subscriptionsPublicCreate a channel and receive its install URL and owner token.
GET /v1/subscriptions/{id}Bearer owner tokenRead channel metadata.
PATCH /v1/subscriptions/{id}Bearer owner tokenReplace the name or source URL.
DELETE /v1/subscriptions/{id}Bearer owner tokenDelete the channel and its registrations.
POST /v1/subscriptions/{id}/pushBearer owner tokenQueue a silent refresh push.
GET /v1/subscriptions/{id}/push-jobs/{jobID}Bearer owner tokenRead the aggregate push job result.
POST /v1/subscriptions/{id}/owner-token/rotateBearer owner tokenReplace the owner credential.
POST / DELETE /v1/subscriptions/{id}/devices/push-tokenDevice headersRegister or remove a device push token.
GET /install/{id}PublicOpen the Marten import link.
GET /healthzPublicCheck API availability.
POST /v1/relay/channelsPublicCreate a scoped channel for a Simple server.
PUT / DELETE /v1/relay/channels/{id}/devices/{registrationID}Bearer relay tokenUpsert or remove an opaque relayed device registration.
POST /v1/relay/channels/{id}/pushBearer relay tokenQueue a refresh for one relay channel.
GET /v1/relay/channels/{id}/push-jobs/{jobID}Bearer relay tokenRead aggregate status for a job in the same channel.
DELETE /v1/relay/channels/{id}Bearer relay tokenDelete the scoped relay channel.

Authentication and limits