API reference
Afterglow Platform API
Version 1 · A production-shaped contract for the mocked local data layer.
Introduction
The API uses predictable resource URLs, JSON request bodies, standard HTTP response codes, and cursor-based pagination. These contracts document intended behavior without sending network requests.
Base URL
https://api.afterglow.local/v1
https://api.afterglow.local/v1
Authentication
Pass a scoped bearer token with each request.
Authorization: Bearer ag_live_••••••••
Content-Type: application/jsonAudio endpoints
GET
/v1/tracksList visible audio releasesPOST
/v1/tracksCreate an audio recordPATCH
/v1/tracks/:idUpdate metadata or statusDELETE
/v1/tracks/:idRemove a catalog recordGET
/v1/analytics/listeningRetrieve listening totalsCreate a track
{
"title": "Satellites at 2AM",
"kind": "unreleased",
"status": "published"
}200 response
{
"id": "trk_01J9P",
"title": "Satellites at 2AM",
"visibility": "members",
"created_at": "2026-08-25T09:30:00Z"
}Errors
Errors use a stable shape with a machine-readable code, human-readable message, and request identifier for support.
{
"error": {
"code": "invalid_status_transition",
"message": "A published track cannot return to scheduled.",
"request_id": "req_8d12f"
}
}