Skip to content

🎤 Track Artists

Artist credits and collaborations for individual tracks

Resource Overview

Track Artists represent the many-to-many relationships between tracks and artists, including specific roles such as main artist, featured artist, producer, or composer. This pivot resource manages all contributor credits for individual tracks with their respective roles and display order.

Base Endpoint
/track-artists
Resource Type
track-artists
User Scope
Track owner-restricted

Schema

Required Relationships

Relationship Type Related Resource Description
track BelongsTo tracks Track to associate artist with
artist BelongsTo artists Artist to associate with track
artist-role BelongsTo artist-roles Role of artist in track (Main Artist, Producer, etc.)

Required Attributes

Field Type Validation Description
order integer required, min:1 Artist display order within track credits

Read-only Attributes

Field Type Description
id string Unique identifier

Business Validations

  • Unique combination: Same artist cannot have same role twice in same track
  • Track ownership: Can only associate artists with tracks you own
  • Order requirement: Order position is required for proper credits display
  • Authentication required: Must be logged in to create/modify associations

List Track Artists

GET /track-artists
GET /track-artists
Authorization: Bearer {token}
Accept: application/vnd.api+json

Query Parameters

Filtering

  • filter[track] - Filter by track ID
  • filter[artist] - Filter by artist ID
  • filter[artist-role] - Filter by artist role ID
  • filter[order] - Filter by order position

Other Parameters

  • include - Include relationships
  • sort - Sort by field
  • page[number] - Page number
  • page[size] - Results per page

Example Request

GET /track-artists?include=track,artist,artist-role&filter[track]=5&sort=order

Success Response

200 OK
{
  "data": [
    {
      "type": "track-artists",
      "id": "1",
      "attributes": {
        "order": 1
      },
      "relationships": {
        "track": {
          "data": { "type": "tracks", "id": "5" }
        },
        "artist": {
          "data": { "type": "artists", "id": "12" }
        },
        "artist-role": {
          "data": { "type": "artist-roles", "id": "1" }
        }
      }
    },
    {
      "type": "track-artists",
      "id": "2",
      "attributes": {
        "order": 2
      },
      "relationships": {
        "track": {
          "data": { "type": "tracks", "id": "5" }
        },
        "artist": {
          "data": { "type": "artists", "id": "8" }
        },
        "artist-role": {
          "data": { "type": "artist-roles", "id": "2" }
        }
      }
    }
  ],
  "included": [
    {
      "type": "tracks",
      "id": "5",
      "attributes": {
        "title": "Electric Harmony",
        "length": "00:04:12",
        "is-explicit": false
      }
    },
    {
      "type": "artists",
      "id": "12",
      "attributes": {
        "name": "DJ Maxwell",
        "bio": "Electronic music producer and composer"
      }
    },
    {
      "type": "artists",
      "id": "8",
      "attributes": {
        "name": "Luna Voice",
        "bio": "Professional vocalist and songwriter"
      }
    },
    {
      "type": "artist-roles",
      "id": "1",
      "attributes": {
        "name": "Main Artist",
        "key": "main_artist"
      }
    },
    {
      "type": "artist-roles",
      "id": "2",
      "attributes": {
        "name": "Featured Artist",
        "key": "featured"
      }
    }
  ],
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 20,
      "to": 2,
      "total": 2
    }
  }
}

Create Track Artist

POST /track-artists
POST /track-artists
Authorization: Bearer {token}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json

Request Body

{
  "data": {
    "type": "track-artists",
    "attributes": {
      "order": 1
    },
    "relationships": {
      "track": {
        "data": { "type": "tracks", "id": "5" }
      },
      "artist": {
        "data": { "type": "artists", "id": "12" }
      },
      "artist-role": {
        "data": { "type": "artist-roles", "id": "1" }
      }
    }
  }
}

Success Response

201 Created
{
  "data": {
    "type": "track-artists",
    "id": "3",
    "attributes": {
      "order": 1
    },
    "relationships": {
      "track": {
        "data": { "type": "tracks", "id": "5" }
      },
      "artist": {
        "data": { "type": "artists", "id": "12" }
      },
      "artist-role": {
        "data": { "type": "artist-roles", "id": "1" }
      }
    }
  }
}

Update Track Artist

PATCH /track-artists/{id}
PATCH /track-artists/3
Authorization: Bearer {token}
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json

Request Body

{
  "data": {
    "type": "track-artists",
    "id": "3",
    "attributes": {
      "order": 2
    },
    "relationships": {
      "artist-role": {
        "data": { "type": "artist-roles", "id": "2" }
      }
    }
  }
}

Success Response

200 OK
{
  "data": {
    "type": "track-artists",
    "id": "3",
    "attributes": {
      "order": 2
    },
    "relationships": {
      "track": {
        "data": { "type": "tracks", "id": "5" }
      },
      "artist": {
        "data": { "type": "artists", "id": "12" }
      },
      "artist-role": {
        "data": { "type": "artist-roles", "id": "2" }
      }
    }
  }
}

Delete Track Artist

DELETE /track-artists/{id}
DELETE /track-artists/3
Authorization: Bearer {token}
Accept: application/vnd.api+json

Success Response

204 No Content

No response body. The track artist association has been successfully deleted.

Key Features

🎯 Credit Management

  • • Manage artist credits
  • • Assign specific roles
  • • Define display order
  • • Track collaborations

🔧 Full CRUD

  • • Create associations
  • • Update roles/order
  • • Delete credits
  • • User-scoped access

🔗 Relationships

  • • Links tracks to artists
  • • Includes role context
  • • Maintains order
  • • Supports filtering