{"openapi":"3.1.0","info":{"title":"Black Thread Union Public API","version":"1.1.0","description":"Public-facing API discovery document for health checks and concrete read-only tRPC procedures.","contact":{"url":"https://www.blackthreadunion.com/ai"}},"servers":[{"url":"https://www.blackthreadunion.com"}],"externalDocs":{"description":"AI + agent docs","url":"https://www.blackthreadunion.com/ai"},"paths":{"/api/health":{"get":{"summary":"Health check","operationId":"getHealth","tags":["System"],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}}},"/api/trpc/ping":{"get":{"summary":"Ping endpoint for client connectivity tests.","operationId":"trpcPing","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.list":{"get":{"summary":"List all releases in display order.","operationId":"trpcReleaseList","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.getBySlug":{"get":{"summary":"Get a single release by slug.","operationId":"trpcReleaseGetBySlug","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"slug\":\"your-release-slug\",\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.listTracks":{"get":{"summary":"List tracks for a release ID.","operationId":"trpcReleaseListTracks","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"releaseId\":1,\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.listWithTracks":{"get":{"summary":"List all releases with embedded track lists.","operationId":"trpcReleaseListWithTracks","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.listAllTracks":{"get":{"summary":"List playable tracks sorted by trending or newest.","operationId":"trpcReleaseListAllTracks","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"sortBy\":\"trending\",\"limit\":8}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/release.getTrackPage":{"get":{"summary":"Get a track page payload including adjacent tracks.","operationId":"trpcReleaseGetTrackPage","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"releaseSlug\":\"your-release-slug\",\"trackSlug\":\"your-track-slug\",\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/blog.listPublished":{"get":{"summary":"List published blog posts with pagination and optional filters.","operationId":"trpcBlogListPublished","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"page\":1,\"perPage\":12,\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/blog.getBySlug":{"get":{"summary":"Get a published blog post by slug.","operationId":"trpcBlogGetBySlug","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"slug\":\"post-slug\",\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/blog.listCategories":{"get":{"summary":"List public blog categories.","operationId":"trpcBlogListCategories","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/blog.listTags":{"get":{"summary":"List public blog tags.","operationId":"trpcBlogListTags","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/merch.publicProducts":{"get":{"summary":"List active storefront merch products.","operationId":"trpcMerchPublicProducts","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/merch.publicProduct":{"get":{"summary":"Get one active merch product and its in-stock variants.","operationId":"trpcMerchPublicProduct","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"slug\":\"product-slug\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/playlist.list":{"get":{"summary":"List published playlists with track counts.","operationId":"trpcPlaylistList","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/playlist.getBySlug":{"get":{"summary":"Get a single playlist by slug with ordered tracks.","operationId":"trpcPlaylistGetBySlug","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"slug\":\"playlist-slug\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/spotlight.list":{"get":{"summary":"List spotlight tracks for the artist spotlight section.","operationId":"trpcSpotlightList","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below."}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/search.search":{"get":{"summary":"Full-text search across releases, tracks, merch, blog, and pages.","operationId":"trpcSearchSearch","tags":["tRPC Public"],"parameters":[{"name":"input","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-serialized input object for this tRPC procedure. Example shown below.","example":"{\"q\":\"thread\",\"resultType\":\"all\",\"page\":1,\"hitsPerPage\":10,\"locale\":\"en\"}"}],"responses":{"200":{"description":"tRPC response envelope","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}},"/api/trpc/{procedurePath}":{"get":{"summary":"Generic tRPC query endpoint","operationId":"trpcQuery","tags":["tRPC Transport"],"parameters":[{"name":"procedurePath","in":"path","required":true,"schema":{"type":"string"}},{"name":"input","in":"query","required":false,"schema":{"type":"string"},"description":"Serialized tRPC input payload"}],"responses":{"200":{"description":"tRPC response payload","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}},"post":{"summary":"Generic tRPC mutation endpoint","operationId":"trpcMutation","tags":["tRPC Transport"],"parameters":[{"name":"procedurePath","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"tRPC response payload","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{}},"additionalProperties":true},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"number"},"message":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}}}}}}}},"components":{}}