This endpoint is suplemental to the Spinitron v2 API and provides an alternative to the POST /spins
enpoint for compatibility with applications that need to present spin metadata as query parameters in the request URL.
https://spinitron.com/api
/spin/create-v1
Spinitron allows both GET and POST requests.
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
.
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. |
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
Eample 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'