Developer reference

REST API endpoints

Developers: TuneSera REST API namespaces and routes.

On this page
  1. Standard WordPress routes
  2. Public TuneSera routes
  3. Admin routes
  4. TuneSera Pro routes
  5. Related articles

TuneSera adds REST API routes that power its admin screens and front-end features. Most are private and need an administrator to be logged in; a few public read-only routes power the directory for visitors.

Standard WordPress routes#

Stations and their taxonomies are available through the core WordPress REST API:

/wp-json/wp/v2/tunesera_station
/wp-json/wp/v2/tunesera_country
/wp-json/wp/v2/tunesera_city
/wp-json/wp/v2/tunesera_genre

Public TuneSera routes#

Namespace: tunesera-internet-radio-directory/v1. These are read-only and need no login.

RoutePurpose
GET /stationsDirectory listing. Accepts search, country, city, genre, language, sort, page and per_page.
GET /stations/now-playing-titlesCurrent song titles for stations on screen.
GET /stations/surpriseA random station for “surprise me” features.
GET /stations/{id}/neighborsPrevious and next stations, used by the player.
GET /home-countryRecent stations for a country, used by homepage sections.

Admin routes#

These need a logged-in user with the right capability (usually manage_options) and a valid REST nonce. They back the TuneSera admin screens and may change between versions, so avoid relying on them in your own code.

  • /settings, /settings/action, /settings/directory-preview, /settings/shortcode-preview, /settings/stations, /settings/location-parents
  • /overview, /setup/…
  • /locations/…
  • Import routes for jobs, uploads and history

TuneSera Pro routes#

RoutePurposeAccess
tunesera-pro/v1/analytics/session, /analytics/eventRecord listening sessions and events from visitors’ browsersPublic, signed and rate-limited
tunesera-pro/v1/analytics/report, /analytics/clearAnalytics reports and clearing dataAdministrators
tunesera-pro/v1/featured-stationsManage featured stationsAdministrators
Still stuck?Our team usually replies the same day. Open a private ticket and we'll help you sort it out. Open a ticket