Skip to main content
POST
/
app.rocksky.mirror.putMirrorSource
Upsert a mirror source for the authenticated user. Toggling `enabled` notifies the mirror process over NATS so it can start/stop the per-user task without a restart.
curl --request POST \
  --url https://api.rocksky.app/xrpc/app.rocksky.mirror.putMirrorSource \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "<string>",
  "enabled": true,
  "externalUsername": "<string>",
  "apiKey": "<string>"
}
'
{
  "provider": "<string>",
  "enabled": true,
  "hasCredentials": true,
  "externalUsername": "<string>",
  "lastPolledAt": "2023-11-07T05:31:56Z",
  "lastScrobbleSeenAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.rocksky.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
provider
string
required

One of: lastfm, listenbrainz, tealfm

enabled
boolean

Enable or disable mirroring for this provider.

externalUsername
string

External username (Last.fm / ListenBrainz). Required when enabling those providers. Ignored for Teal.fm.

apiKey
string

API key / token to be encrypted at rest. Omit to leave the existing key unchanged. Pass an empty string to clear it.

Response

OK

provider
string
required

One of: lastfm, listenbrainz, tealfm

enabled
boolean
required

Whether scrobbles from this source are being mirrored into Rocksky.

hasCredentials
boolean
required

True when an API key is stored. Last.fm/ListenBrainz only; always false for Teal.fm.

externalUsername
string

Username on the external service (Last.fm / ListenBrainz). Null for Teal.fm.

lastPolledAt
string<date-time>

The last time the mirror process successfully polled this source.

lastScrobbleSeenAt
string<date-time>

Watermark — scrobbles from the external service older than this are skipped.