API REFERENCE
Create a release player
On this page
/api/playersRegister one reusable listening page plus provider embeds. Returns player, listenUrl, spotifyEmbedUrl, appleEmbedUrl. MCP: create_release_player. No site generation is required. This feature requires its API/app/database releases.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/players' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"spotifyUrl": "string"
}'Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://recoup-api.vercel.app/api/players' \
--header 'Content-Type: application/json' \
--data '{
"spotifyUrl": "string"
}'Request body required
application/json
organizationIdstring | nullAuthorized workspace; omit for the authenticated account. Never send account_id.
format: uuid
artistIdstringrequiredArtist account belonging to this workspace.
format: uuid
namestringrequiredminLength: 1 · maxLength: 120
spotifyUrlstring | nullSpotify track, album, or playlist URL. Share parameters are removed.
format: uri
appleUrlstring | nullApple Music song or album URL, optionally an album ?i= song selection.
format: uri
artworkstring | nullOptional public HTTPS artwork.
format: uri
allowedOriginsarray<string>Exact HTTPS origins authorized to embed this player; no path, query, credentials, or fragment.
maxItems: 10
Item properties for allowedOrigins
string
enabledbooleanPublishing requires an active paid workspace. Disabled players are unavailable publicly.
Default: false
freePlaybackstring · enumRelease-owner choice for verified Spotify Free accounts. spotify opens the configured Spotify release; audio plays a workspace-owned uploaded file. Premium continues using Spotify streaming.
Values: "spotify", "audio"
Default: "spotify"
audioUrlstring | nullMP3 or WAV URL returned by POST /api/sites/assets for the same workspace. Requires an existing audio object; arbitrary or other-workspace URLs are rejected. Required when freePlayback is audio. Uploads currently have a 4 MB limit.
format: uri
anyOf · object 1
spotifyUrlstringrequiredformat: uri
anyOf · object 2
appleUrlstringrequiredformat: uri
Responses
201PlayerResource fields returned by the release player service.+
application/json
playerobjectrequiredProperties for player
idstringrequiredformat: uuid
owner_idstringrequiredformat: uuid
artist_idstringrequiredformat: uuid
created_bystringformat: uuid
namestringrequiredspotify_urlstring | nullrequiredformat: uri
apple_urlstring | nullrequiredformat: uri
artworkstring | nullformat: uri
allowed_originsarray<string>requiredItem properties for allowed_origins
string
enabledbooleanrequiredrevisionintegerrequiredminimum: 1
created_atstringformat: date-time
updated_atstringformat: date-time
free_playbackstring · enumrequiredRelease-owner choice for verified Spotify Free accounts. spotify opens the configured Spotify release; audio plays a workspace-owned uploaded file. Premium continues using Spotify streaming.
Values: "spotify", "audio"
Default: "spotify"
audio_urlstring | nullrequiredMP3 or WAV URL returned by POST /api/sites/assets for the same workspace. Requires an existing audio object; arbitrary or other-workspace URLs are rejected. Required when freePlayback is audio. Uploads currently have a 4 MB limit.
format: uri
listenUrlstringrequiredformat: uri
spotifyEmbedUrlstringrequiredStable provider route. This URL is returned even when that provider is unconfigured; inspect the corresponding destination in player before displaying it.
format: uri
appleEmbedUrlstringrequiredStable provider route. This URL is returned even when that provider is unconfigured; inspect the corresponding destination in player before displaying it.
format: uri
400Invalid input+
application/json
errorstringrequiredstatusstring401Missing/invalid authentication or failed provider authorization+
application/json
errorstringrequiredstatusstring402Publishing requires an active paid workspace+
application/json
errorstringrequiredstatusstring403Workspace, origin, or session access denied+
application/json
errorstringrequiredstatusstring404Player not available+
application/json
errorstringrequiredstatusstring429Request rate limit exceeded+
application/json
errorstringrequiredstatusstring503Feature/configuration temporarily unavailable+
application/json
errorstringrequiredstatusstringFull specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download players.jsonView operation source
{
"summary": "Create a release player",
"description": "Register one reusable listening page plus provider embeds. Returns player, listenUrl, spotifyEmbedUrl, appleEmbedUrl. MCP: create_release_player. No site generation is required. This feature requires its API/app/database releases.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [],
"responses": {
"201": {
"description": "PlayerResource fields returned by the release player service.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerResource"
}
}
}
},
"400": {
"description": "Invalid input",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"401": {
"description": "Missing/invalid authentication or failed provider authorization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"402": {
"description": "Publishing requires an active paid workspace",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"403": {
"description": "Workspace, origin, or session access denied",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"404": {
"description": "Player not available",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"429": {
"description": "Request rate limit exceeded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
},
"503": {
"description": "Feature/configuration temporarily unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlayerError"
}
}
}
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"artistId",
"name"
],
"properties": {
"organizationId": {
"type": [
"string",
"null"
],
"format": "uuid",
"description": "Authorized workspace; omit for the authenticated account. Never send account_id."
},
"artistId": {
"type": "string",
"format": "uuid",
"description": "Artist account belonging to this workspace."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"spotifyUrl": {
"type": [
"string",
"null"
],
"format": "uri",
"description": "Spotify track, album, or playlist URL. Share parameters are removed."
},
"appleUrl": {
"type": [
"string",
"null"
],
"format": "uri",
"description": "Apple Music song or album URL, optionally an album ?i= song selection."
},
"artwork": {
"type": [
"string",
"null"
],
"format": "uri",
"description": "Optional public HTTPS artwork."
},
"allowedOrigins": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"format": "uri"
},
"description": "Exact HTTPS origins authorized to embed this player; no path, query, credentials, or fragment."
},
"enabled": {
"type": "boolean",
"default": false,
"description": "Publishing requires an active paid workspace. Disabled players are unavailable publicly."
},
"freePlayback": {
"type": "string",
"enum": [
"spotify",
"audio"
],
"default": "spotify",
"description": "Release-owner choice for verified Spotify Free accounts. spotify opens the configured Spotify release; audio plays a workspace-owned uploaded file. Premium continues using Spotify streaming."
},
"audioUrl": {
"type": [
"string",
"null"
],
"format": "uri",
"description": "MP3 or WAV URL returned by POST /api/sites/assets for the same workspace. Requires an existing audio object; arbitrary or other-workspace URLs are rejected. Required when freePlayback is audio. Uploads currently have a 4 MB limit."
}
},
"description": "At least one of spotifyUrl or appleUrl is required. Disabled by default.",
"anyOf": [
{
"required": [
"spotifyUrl"
],
"properties": {
"spotifyUrl": {
"type": "string",
"format": "uri"
}
}
},
{
"required": [
"appleUrl"
],
"properties": {
"appleUrl": {
"type": "string",
"format": "uri"
}
}
}
]
}
}
}
}
}