Huebsch Docs
API Reference

Track API

Fetch metadata for a published audio track.

Endpoint

POST /api/track

Quick Test

curl -X POST https://huebsch.schoenreden.com/api/track \
  -H "Content-Type: application/json" \
  -d '{"slug":"/2024/01/my-article"}'

Request Body

{
  "slug": "/2024/01/my-article"
}
FieldTypeRequiredDescription
slugstringYesTrack slug (must start with /). Use the slug you submitted during intake — the system resolves it to your client automatically.

Response

Success

{
  "ok": true,
  "val": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "/client-slug/2024/01/my-article",
    "title": "Article Title",
    "asset": "https://cdn.example.com/audio.mp3",
    "duration": 245.5,
    "cover": "https://example.com/cover.jpg",
    "chapters": [
      { "name": "Introduction", "at": 0 },
      { "name": "Main Content", "at": 45.2 }
    ],
    "clients": {
      "id": "client-uuid",
      "slug": "client-slug",
      "name": "Client Name",
      "cover": "https://example.com/client-cover.jpg"
    }
  }
}
FieldTypeDescription
iduuidTrack identifier
slugstringFull track slug with client slug prepended (e.g., /my-client/2024/article)
titlestringTrack title
asseturlAudio file URL (MP3)
durationnumberDuration in seconds
coverurl | nullCover image URL
chaptersarray | nullChapter markers (see below)
clientsobject | nullClient information (see below)

Chapters

Chapter markers for navigation within the audio. Created from marker nodes in the production content.

{
  "chapters": [
    { "name": "Introduction", "at": 0 },
    { "name": "The Main Story", "at": 45.2 },
    { "name": "Conclusion", "at": 180.5 }
  ]
}
FieldTypeDescription
namestringChapter title
atnumberStart time in seconds from beginning

Chapters are displayed in the web player and can be used by podcast apps that support chapter markers.

Clients

Information about the client (publisher) that owns this track.

{
  "clients": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "my-publication",
    "name": "My Publication",
    "cover": "https://example.com/publication-logo.jpg"
  }
}
FieldTypeDescription
iduuidClient identifier
slugstringClient URL slug
namestringClient display name
coverurl | nullClient logo/cover image

Returns null if the track has no associated client.

Error

{
  "ok": false,
  "val": {
    "error": "Unable to find track",
    "code": "404.1"
  }
}

404.1 means no track exists under the slug. 503.8 means the lookup failed; retry later.

For error codes, see Error Codes.

Usage

  • Retrieve track metadata after receiving a webhook notification
  • Power custom players or integrations with track data
  • The chapters array enables navigation UI in audio players

On this page