Back to Reseller Program
API Documentation

Reseller API Reference

Full reference for the spotify.pw reseller API. Build your own frontend, bot, or automation on top of our infrastructure.

Base URL

reseller-api.spotify.pw

Authentication

X-API-Key header

Rate Limit

Plan-based (60–∞ req/min)

Authentication

Every request must include your API key in the X-API-Key header. Keys are issued when you sign up as a reseller.

http
GET /api/stock HTTP/1.1
Host: reseller-api.spotify.pw
X-API-Key: SPW-RESELLER-YOUR_KEY_HERE

Keep your API key secret. Never expose it in client-side JavaScript that is publicly accessible. Use a backend proxy or environment variable.

Endpoints

Click any endpoint to expand its full request/response details. All responses are JSON. All POST bodies must be Content-Type: application/json.

Error Responses

All errors follow a consistent format. HTTP status codes indicate the error class.

StatusMeaningExample
400Bad Request – missing or invalid body fieldskey, login, password are all required
401Unauthorized – missing or invalid API keyInvalid API key
403Forbidden – IP not in whitelist, or key disabledIP 1.2.3.4 is not whitelisted
429Too Many Requests – rate limit or monthly cap hitRate limit exceeded
500Upstream error – upgrader.cc returned an errorFailed to upgrade account
json – error response format
{
  "status": "error",
  "message": "Human-readable error description."
}

Code Examples

JavaScript (fetch)

javascript
const API_URL = 'https://reseller-api.spotify.pw';
const API_KEY = process.env.RESELLER_API_KEY; // never expose in browser!

// Get available stock
const stock = await fetch(`${API_URL}/api/stock`, {
  headers: { 'X-API-Key': API_KEY }
}).then(r => r.json());

// Upgrade an account
const result = await fetch(`${API_URL}/api/upgrade`, {
  method: 'POST',
  headers: {
    'X-API-Key': API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    key:      'XXXX-XXXX-XXXX-XXXX',
    login:    '[email protected]',
    password: 'password123',
    country:  'ANY',
  }),
}).then(r => r.json());

if (result.status === 'success') {
  console.log('Upgrade successful:', result.message);
} else {
  console.error('Upgrade failed:', result.message);
}

Python (requests)

python
import requests
import os

API_URL = 'https://reseller-api.spotify.pw'
API_KEY = os.environ['RESELLER_API_KEY']
HEADERS = {'X-API-Key': API_KEY}

# Get stock
stock = requests.get(f'{API_URL}/api/stock', headers=HEADERS).json()
print(stock)

# Upgrade
result = requests.post(
    f'{API_URL}/api/upgrade',
    json={
        'key':      'XXXX-XXXX-XXXX-XXXX',
        'login':    '[email protected]',
        'password': 'password123',
        'country':  'ANY',
    },
    headers=HEADERS,
).json()
print(result['status'], result['message'])

PHP (cURL)

php
<?php
$apiUrl = 'https://reseller-api.spotify.pw';
$apiKey = $_ENV['RESELLER_API_KEY'];

function apiRequest(string $method, string $path, array $body = [], string $apiKey = '', string $base = ''): array {
    $ch = curl_init($base . $path);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER     => ["X-API-Key: $apiKey", 'Content-Type: application/json'],
        CURLOPT_CUSTOMREQUEST  => $method,
        CURLOPT_POSTFIELDS     => $body ? json_encode($body) : null,
    ]);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}

$stock  = apiRequest('GET',  '/api/stock',   [], $apiKey, $apiUrl);
$result = apiRequest('POST', '/api/upgrade', [
    'key'      => 'XXXX-XXXX-XXXX-XXXX',
    'login'    => '[email protected]',
    'password' => 'password123',
    'country'  => 'ANY',
], $apiKey, $apiUrl);

echo $result['status'] . ': ' . $result['message'];

Need Help?

Questions about integration, your API key, or custom rate limits? Reach out and we'll get back to you quickly.