Skip to content

POST API v1 Resources

POST like

Enables you to submit a 'like' action to the Radio Hub databases.

Resource URL

https://api.theradiohub.com/1/POST/like.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit a like to.
user_idRequiredThe ID of the user to submit a like for.
track_idRequiredThe ID of the track to submit a like for.

Example Request

POST https://api.theradiohub.com/1/POST/like.json?api_key=[YOUR_API_KEY]&station_id=1&user_id=1&track_id=1

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24,
	"new_like_amount": 5,
	"performed_action": "liked"
}]

Callback parameters

ParameterDescription
new_like_amountReturns the updated number of likes for the selected track.
performed_actionReturns the performed action. This can either be liked or unliked, depending on if the user liked this song before.

POST checkin

Enables you to submit a 'checkin' action to the Radio Hub databases.

Resource URL

https://api.theradiohub.com/1/POST/checkin.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
user_idRequiredThe ID of the user to submit a checkin for.
location_idRequiredThe ID of the location to submit a checkin for.

Example Request

POST https://api.theradiohub.com/1/POST/checkin.json?api_key=[YOUR_API_KEY]&user_id=1&location_id=1

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"developer_id": 24
}]

POST commercials

Enables you to mark a commercial block as 'received'.

Resource URL

https://api.theradiohub.com/1/POST/commercials.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
commercial_block_idRequiredThe ID of the commercial block to mark as received.

Example Request

POST https://api.theradiohub.com/1/POST/commercials.json?api_key=[YOUR_API_KEY]&commercial_block_id=1

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"developer_id": 24
}]

POST location

Enables you to submit a location to the Radio Hub databases.

Resource URL

https://api.theradiohub.com/1/POST/location.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
user_idRequiredThe ID of the user linked to the new location.
nameRequiredThe name of the location to add.
addressRequiredThe address of the location to add.

Example Request

POST https://api.theradiohub.com/1/POST/location.json?api_key=[YOUR_API_KEY]&user_id=1&address=Streetname%20123,City&name=Location%20Name

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"developer_id": 24
}]

POST listener

Enables you to submit a 'listen' action to the Radio Hub databases.

Resource URL

https://api.theradiohub.com/1/POST/listener.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit a like to.
stream_typeOptionalStream type the listener is using.
start_timeOptionalListening start time stamp.
stop_timeOptionalListening stop time stamp.

Example Request

POST https://api.theradiohub.com/1/POST/listener.json?api_key=[YOUR_API_KEY]&station_id=1&stream_type=aac

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST nowplaying

Enables you to submit tracks from your playout software to our web databases.

Resource URL

https://api.theradiohub.com/1/POST/nowplaying.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit to.
json (via POST)RequiredJSON-string containing playout information in the following format:
json
[{
	"last-artist": "Flo Rida",
	"last-title": "Whistle",
	"last-time": "1373380571",
	"last-album-cover": "http://coverwebsite.com/cover/52352432.jpg",
	"current-artist": "One Direction",
	"current-title": "Heart attack",
	"current-time": "1373380579",
	"current-album-cover": "http://coverwebsite.com/cover/434352435.jpg",
	"next-artist": "Haddaway",
	"next-title": "What is love (Orginal version)",
	"next-time": "1373380751",
	"next-album-cover": "http://coverwebsite.com/cover/543674754.jpg"
}]

When instead of a time stamp the word 'now' is received, the current time stamp will be used.

Example Request

POST https://api.theradiohub.com/1/POST/nowplaying.json?api_key=[YOUR_API_KEY]&station_id=1<br />*JSON is sent via POST.*

Example Callback

json
{
	"status": "success",
	"generated_at": 1631781862,
	"last_tracks_listener_change": [
		{
			"change_in_listeners": 1,
			"playedtime": "1631780817",
			"title": "The Remedy",
			"artist": "Jason Mraz",
			"isrc": "NONO22104010"
		},
		{
			"change_in_listeners": -4,
			"playedtime": "1631781060",
			"title": "Station",
			"artist": "Commercial break",
			"isrc": ""
		},
		{
			"change_in_listeners": 0,
			"playedtime": "1631781093",
			"title": "Station",
			"artist": "News",
			"isrc": ""
		},
		{
			"change_in_listeners": -1,
			"playedtime": "1631781313",
			"title": "Hello Sunshine",
			"artist": "Bruce Springsteen",
			"isrc": "QMRSZ1900001"
		},
		{
			"change_in_listeners": 0,
			"playedtime": "1631781542",
			"title": "Try My Love Again",
			"artist": "The northern soul orchestra",
			"isrc": "NOUM72100004"
		}
	],
	"station_id": "24",
	"station_name": "Hits Radio FM",
	"developer_id": null
}

POST news

Enables you to submit news to our web databases.

Resource URL

https://api.theradiohub.com/1/POST/news.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit news to.
json (via POST)RequiredJSON-string containing information in the following format:
json
[{
	"generated_at": 1371490821,
	"headline": "This is a headline",
	"text": "this is a short text to image",
	"image": "image data in base64 format",
	"post-to": "Facebook, Twitter, Web, DAB"
}]

Example Request

POST https://api.theradiohub.com/1/POST/news.json?api_key=[YOUR_API_KEY]&station_id=1<br />*JSON is sent via POST.*

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST audio

Enables you to submit audio to our web databases.

Resource URL

https://api.theradiohub.com/1/POST/audio.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit audio to.
json (via POST)RequiredJSON-string containing information in the following format:
json
[{
	"generated_at": 1371490821,
	"title": "This is a headline",
	"text": "this is a short text to the audio file",
	"file": "audio data in base64 format"
}]

Example Request

POST https://api.theradiohub.com/1/POST/audio.json?api_key=[YOUR_API_KEY]&station_id=1<br />*JSON is sent via POST.*

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST message

Enables you to submit a message to our web databases.

Resource URL

https://api.theradiohub.com/1/POST/message.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit the message to.
json (via POST)RequiredJSON-string containing information in the following format:
json
[{
	"generated_at": 1371490821,
	"text": "This is the message"
}]

Example Request

POST https://api.theradiohub.com/1/POST/message.json?api_key=[YOUR_API_KEY]&station_id=1<br />*JSON is sent via POST.*

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST customdabimage

Enables you to submit a custom DAB image that will be transmitted via the DAB output channels.

Resource URL

https://api.theradiohub.com/1/POST/customdabimage.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit news to.
show_timeRequiredTime on which the image should appear (UNIX timestamp).
hide_timeRequiredTime on which the image should stop showing (UNIX timestamp).
json (via POST)RequiredJSON-string containing information in the following format:
json
[{
	"image1": {
		"image" : "http://cdn.theradiohub.com/placeholders/53.jpg", // url or base64-data
		"size-x" : 200, // in pixels
		"size-y" : 200, // in pixels
		"position-x" : 200, // in pixels
		"position-y" : 100 // in pixels
	},
	"box1": {
		"size-x" : 200, // in pixels
		"size-y" : 200, // in pixels
		"position-x" : 200, // in pixels
		"position-y" : 100, // in pixels
		"color-r" : 20, // RGB-value, 0 to 255
		"color-g" : 20, // RGB-value, 0 to 255
		"color-b" : 20, // RGB-value, 0 to 255
		"color-opacity" : 80 // Percentage, 0 to 100
	},
	"text1": {
		"text" : "This is a textline",
		"position-x" : 200, // in pixels
		"position-y" : 100, // in pixels
		"font-size" : 15, // in pixels
		"font" : "OpenSans", // no spaces
		"color-r" : 200, // RGB-value, 0 to 255
		"color-g" : 200, // RGB-value, 0 to 255
		"color-b" : 200 // RGB-value, 0 to 255
	}
}]

Additional information

InformationDescription
PlottingElements are plotted onto the card in submitted order. For example, to have an image as background, put the image first.
FontsFor a list of possible font choices, see our Font List.

Example Request

POST https://api.theradiohub.com/1/POST/customdabimage.json?api_key=[YOUR_API_KEY]&station_id=1&show_time=1401288137&hide_time=1401289888<br />*JSON is sent via POST.*

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"preview_url": "http://api.theradiohub.com/preview.php?type=custom&id=0",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST customhdradioimage

Enables you to submit a custom HD Radio image that will be transmitted via the HD Radio output channels.

Resource URL

https://api.theradiohub.com/1/POST/customhdradioimage.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to submit news to.
show_timeRequiredTime on which the image should appear (UNIX timestamp).
hide_timeRequiredTime on which the image should stop showing (UNIX timestamp).
json (via POST)RequiredJSON-string containing information in the following format:
json
[{
	"image1": {
		"image" : "http://cdn.theradiohub.com/placeholders/53.jpg", // url or base64-data
		"size-x" : 200, // in pixels
		"size-y" : 200, // in pixels
		"position-x" : 200, // in pixels
		"position-y" : 100 // in pixels
	},
	"box1": {
		"size-x" : 200, // in pixels
		"size-y" : 200, // in pixels
		"position-x" : 200, // in pixels
		"position-y" : 100, // in pixels
		"color-r" : 20, // RGB-value, 0 to 255
		"color-g" : 20, // RGB-value, 0 to 255
		"color-b" : 20, // RGB-value, 0 to 255
		"color-opacity" : 80 // Percentage, 0 to 100
	},
	"text1": {
		"text" : "This is a textline",
		"position-x" : 200, // in pixels
		"position-y" : 100, // in pixels
		"font-size" : 15, // in pixels
		"font" : "OpenSans", // no spaces
		"color-r" : 200, // RGB-value, 0 to 255
		"color-g" : 200, // RGB-value, 0 to 255
		"color-b" : 200 // RGB-value, 0 to 255
	}
}]

Additional information

InformationDescription
PlottingElements are plotted onto the card in submitted order. For example, to have an image as background, put the image first.
FontsFor a list of possible font choices, see our Font List.

Example Request

POST https://api.theradiohub.com/1/POST/customhdradioimage.json?api_key=[YOUR_API_KEY]&station_id=1&show_time=1401288137&hide_time=1401289888<br />*JSON is sent via POST.*

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"preview_url": "http://api.theradiohub.com/preview.php?type=custom&id=0",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

POST forgotpassword

Enables you to request a new password for an e-mail address.

Resource URL

https://api.theradiohub.com/1/POST/forgotpassword.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
emailRequiredThe email of the user to submit a registration for.

Example Request

POST https://api.theradiohub.com/1/POST/forgotpassword.json?api_key=[YOUR_API_KEY]&email=john@example.com

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

Will return an error when the e-mail address is unknown.

POST register

Enables you to submit a new user registration to the Radio Hub databases.

Resource URL

https://api.theradiohub.com/1/POST/register.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idOptionalThe ID of the radiostation to submit a register to.
birthdayOptionalThe birthday of the user to submit a registration for.
genderOptionalThe gender of the user to submit a registration for.
emailRequiredThe email of the user to submit a registration for.
passwordRequiredThe password of the user to submit a registration for.

Example Request

POST https://api.theradiohub.com/1/POST/register.json?api_key=[YOUR_API_KEY]&station_id=1&email=john@example.com&password=fr2njl2342

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]

Will return an error when the e-mail address is already in use.

POST payment

Enables you to request a payment.

Resource URL

https://api.theradiohub.com/1/POST/payment.json

Parameters

ParameterRequiredDescription
currencyRequiredThe currency of the payment. One of the ISO codes allowed by Mollie is required.
amountRequiredPayment amount, with a point (.) as decimal token
descriptionRequiredPayment description.
return_urlRequiredURL you want the customer returned to after succesful or unsuccesful payment. The api will append the payment status to this url: ?status=paid or ?status=pending.

Example Request

POST https://api.theradiohub.com/1/POST/payment.json
currency: EUR
amount: 10
description: Test payment
return_url: https://google.com/

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"payment_url": [url]
}]

POST sms

Enables you to send sms through the API when the SMS notification configuration is completed via https://manage.theradiohub.com/settings-inputs.

Resource URL

https://api.theradiohub.com/1/POST/register.json

Parameters

ParameterRequiredDescription
api_keyRequiredThe API key provided to the developer or created in the Radio Hub Admin-Dashboard
station_idRequiredThe ID of the radiostation to send sms from.
phone_numberRequiredThe phone number to send the message to, in international format starting with 00 (double zero). Comma-separated numbers are allowed for multiple messages.
messageRequiredMessage to send in plain text.

Example Request

POST https://api.theradiohub.com/1/POST/sms.json?api_key=[YOUR_API_KEY]&station_id=1&phone_number=004791177777&message=Hi,%20this%20is%20a%20test

Example Callback

json
[{
	"generated_at": 1371490821,
	"status": "success",
	"station_id": 1,
	"station_name": "Hits Radio FM",
	"developer_id": 24
}]