Authentication
Private HTTP endpoints accept exactly one ofx-api-key: YOUR_API_KEY or Authorization: Bearer YOUR_PRIVY_ACCESS_TOKEN.
MCP uses the existing authenticated https://api.recoupable.dev/mcp connection.
The caller is derived from authentication. Do not send an account_id. An optional organizationId selects a workspace the caller can access. Omit it for the authenticated account’s workspace.
Endpoints and tools
Listing accepts optional
organizationId and artistId query parameters. All private reads and writes verify workspace access. Signup emails are never part of the public response.
Create and generate
Create a draft with a Spotify track, album, or playlist URL. Recoup retrieves its title and artwork. The brief is optional; without it, Recoup chooses a playable concept. Alternatively, supply both a name and a brief without a release URL.name (120 characters), brief (6,000), organizationId, artistId, and assets (up to eight workspace-owned assets returned by the upload endpoint). An artist must be accessible to the caller and belong to the selected organization when one is used.
Read the returned site.id and site.revision, then generate:
PATCH /api/sites/{id}. MCP’s generate_site accepts id, revision, and instruction without an action field. Generation uses GPT-6 Astra by default and may take several minutes; use a client timeout that permits up to 300 seconds.
Generation failures leave the saved draft unchanged. A 409 means another edit changed the revision; read the site again before retrying.
Publish
After reviewing the draft, send{"action":"publish","revision":CURRENT_REVISION} to the same PATCH endpoint, or call publish_site with id and revision.
The public page is https://chat.recoupable.dev/s/{id}.
Unpublish with action: "unpublish", or unpublish_site. Agents should publish only when explicitly instructed.
Uploads
HTTP uploads are multipart forms with afile field and optional organizationId query parameter. Supported formats: JPEG, PNG, WebP, MP3, and WAV, up to 4 MB per file. Images are re-encoded to WebP. Audio is checked for its file signature.
MCP’s upload_site_asset accepts name, contentType, base64 file bytes, and optional organizationId. It uses the same validation and storage path as HTTP.
Public endpoints
GET /api/sites/public/{id}returns{ snapshot: ... }for a published site only. Drafts, account identifiers, and signup data are excluded.POST /api/sites/public/{id}/signupaccepts{"email":"fan@example.com","consent":"yes"}. An optionalwebsitehoneypot must be empty. Duplicate submissions succeed without disclosing list membership. Unpublished sites reject signups.
Errors
400 invalid input; 401 missing/invalid authentication; 403 workspace or artist access denied; 404 missing/unpublished site; 409 stale revision; 422 Spotify metadata unavailable; 503 temporary operation failure.