Skip to content
Web APIReferences / Tracks / Save Tracks for Current User

Save Tracks for Current User

Save one or more tracks to the current user's 'Your Music' library.

Authorization scopes

Request

  • ids
    string
    Required

    A comma-separated list of the Spotify IDs. For example: ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M. Maximum: 50 IDs.

    Example: ids=7ouMYWpwJ422jRcDASZB7P,4VqPOruhp5EdPBeR92t6lQ,2takcwOaAZWiXQijPHIx7B
supports free form additional properties
  • ids
    array of strings

    A JSON array of the Spotify IDs. For example: ["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]
    A maximum of 50 items can be specified in one request. Note: if the ids parameter is present in the query string, any IDs listed here in the body will be ignored.

  • A JSON array of objects containing track IDs with their corresponding timestamps. Each object must include a track ID and an added_at timestamp. This allows you to specify when tracks were added to maintain a specific chronological order in the user's library.
    A maximum of 50 items can be specified in one request. Note: if the timestamped_ids is present in the body, any IDs listed in the query parameters or the ids field in the body will be ignored.

    • id
      string
      Required

      The Spotify ID for the track.

    • added_at
      string [date-time]
      Required

      The timestamp when the track was added to the library. Use ISO 8601 format with UTC timezone (e.g., 2023-01-15T14:30:00Z). You can specify past timestamps to insert tracks at specific positions in the library's chronological order. The API uses minute-level granularity for ordering, though the timestamp supports millisecond precision.

Response

Track saved

endpointhttps://api.spotify.com/v1/me/tracksids

Request body


Response sample

empty response