openapi: 3.0.3
info:
title: Audiomack Data Artist Stats API
version: '1.0'
description: The Audiomack Data API provides programmatic access to Audiomack's music streaming catalog, artists, playlists, charts, search, and authenticated user resources. All requests use HTTPS against https://api.audiomack.com/v1 and authenticated requests are signed with OAuth 1.0a. Response payloads are JSON and most list endpoints support page-based pagination, the `fields` parameter for sparse fieldsets, and a `limit` parameter.
contact:
name: Audiomack Business
url: https://creators.audiomack.com/contact-us
license:
name: Audiomack Terms of Service
url: https://audiomack.com/about/terms-of-service
servers:
- url: https://api.audiomack.com/v1
description: Production
security:
- oauth1: []
tags:
- name: Stats
description: Tokenised view and play event reporting.
paths:
/music/stats/token:
get:
tags:
- Stats
summary: Get Stats Token
description: Request a one-shot token used to authorise a subsequent stats event.
operationId: getStatsToken
parameters:
- in: query
name: device
schema:
type: string
- in: query
name: music_id
schema:
type: string
responses:
'200':
description: Stats token issued.
/music/stats/{music_id}:
post:
tags:
- Stats
summary: Record Stats Event
description: Record a view or play event using a previously issued stats token.
operationId: postStatsEvent
parameters:
- in: path
name: music_id
required: true
schema:
type: string
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- token
- type
properties:
token:
type: string
type:
type: string
enum:
- view
- play
responses:
'200':
description: Event recorded.
components:
securitySchemes:
oauth1:
type: http
scheme: OAuth
description: OAuth 1.0a signed request. Obtain a request token via `POST /v1/request_token`, redirect the user to `https://audiomack.com/oauth/authenticate?oauth_token=...`, then exchange for an access token via `POST /v1/access_token`. Access tokens are valid for one year.