API REFERENCE
Acquire or resume a registered player session
On this page
/api/players/public/{id}/sessionInternal transport for the trusted Recoup browser player. Without provider, returns only public release settings. With provider, validates parent and creates or resumes a signed, provider-bound listening session. No owner, fan profile or email is exposed. The embedding website should use returned embed URLs rather than calling this API or handling credentials.
Authentication
This endpoint does not require authentication.
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/players/public/YOUR_ID/session' \
--header 'Content-Type: application/json' \
--data '{
"provider": "spotify",
"parent": "string"
}'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
curl --request POST \
--url 'https://recoup-api.vercel.app/api/players/public/{id}/session' \
--header 'Content-Type: application/json' \
--data '{
"provider": "spotify",
"parent": "string"
}'Parameters
Path parameters
idstringrequiredRequest body required
application/json
providerstring · enumrequiredValues: "spotify", "apple_music"
parentstringrequiredminLength: 1
flowstringsourcestringmaxLength: 100
mediumstringmaxLength: 100
campaignstringmaxLength: 100
contentstringmaxLength: 100
Responses
200PublicPlayerConfig fields returned by the release player service.+
application/json
playerIdstringrequiredformat: uuid
namestringrequiredartworkstring | nullformat: uri
spotifyUrlstring | nullrequiredformat: uri
appleUrlstring | nullrequiredformat: uri
revisionintegerrequiredminimum: 1
providerstring · enumValues: "spotify", "apple_music"
releasestringformat: uri
sessionIdstringformat: uuid
flowstringShort-lived signed player capability; only the trusted Recoup player should handle this.
spotifyobjectProperties for spotify
configuredbooleanrequiredclientIdstring | nullrequiredredirectUristringrequiredformat: uri
scopesarray<string>requiredItem properties for scopes
string
freePlaybackstring · 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"
audioUrlstring | nullIncluded only in provider-session responses. Configured uploaded audio is provided for Spotify sessions in audio mode; otherwise null. Not included in chooser metadata.
format: uri
400Invalid input+
application/json
errorstringrequiredstatusstring401Missing/invalid authentication or failed provider authorization+
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": "Acquire or resume a registered player session",
"description": "Internal transport for the trusted Recoup browser player. Without provider, returns only public release settings. With provider, validates parent and creates or resumes a signed, provider-bound listening session. No owner, fan profile or email is exposed. The embedding website should use returned embed URLs rather than calling this API or handling credentials.",
"security": [],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "PublicPlayerConfig fields returned by the release player service.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PublicPlayerConfig"
}
}
}
},
"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"
}
}
}
},
"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"
}
}
}
}
},
"operationId": "acquirePlayerSession",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"spotify",
"apple_music"
]
},
"parent": {
"type": "string",
"minLength": 1
},
"flow": {
"type": "string"
},
"source": {
"type": "string",
"maxLength": 100
},
"medium": {
"type": "string",
"maxLength": 100
},
"campaign": {
"type": "string",
"maxLength": 100
},
"content": {
"type": "string",
"maxLength": 100
}
},
"required": [
"provider",
"parent"
],
"additionalProperties": false
}
}
}
}
}