Automation compatibility API

Automation backwards compatibility API

This endpoint is supplemental to the Spinitron v2 API and provides an alternative to the POST /spins endpoint for compatibility with applications that need to present spin metadata as query parameters in the request URL.

Base URL

https://spinitron.com/api

Endpoint

/spin/create-v1

HTTP methods

Spinitron allows both GET and POST requests.

Authentication

As other v2 endpoints, you may authenticate by presenting the API key either using HTTP Bearer Authorization (preferred) or in the query parameter access-token .

Parameters

Param Description
access-token Station API key. String. Not required if you use HTTP bearer auth.
aw Artist name. String. Required.
sn Song title. String. Required.
sc Song composer. String. Optional.
sp Spin start time, i.e. timestamp. String. Optional. Current server time is used if parameter absent. Today is assumed if no date is not explicit in the value. Station time zone is assumed if zone is not explicit in the value.
sd Spin duration. Optional. Integer seconds.
dn Album title. String. Optional.
dl Genre. String. Optional.
dr Release year. Integer. Year, e.g. 1999.
ln Record label name. String. Optional.

Examples

You may copy-paste the following URL into a web browser and substitute the station API key

https://spinitron.com/api/spin/create-v1?access-token=STATION_API_KEY&aw=ARTIST_NAME&sn=SONG_TITLE&sc=SONG_COMPOSER&sp=2:34:56&sd=120&dn=ALBUM_TITLE&dl=GENRE&dr=2011&ln=LABEL_NAME

Minimal example

https://spinitron.com/api/spin/create-v1?access-token=STATION_API_KEY&aw=X&sn=Y

Example using HTTP Bearer Authorization

curl -i -H 'Authorization: Bearer STATION_API_KEY' \ 'https://spinitron.com/api/spin/create-v1?aw=ARTIST_NAME&sn=SONG_TITLE&sc=SONG_COMPOSER&sp=2:34:56&sd=120&dn=ALBUM_TITLE&dl=GENRE&dr=2011&ln=LABEL_NAME'

Minimal example

curl -i -H 'Authorization: Bearer STATION_API_KEY' 'https://spinitron.com/api/spin/create-v1?aw=X&sn=Y'