Skip to content

PostSong

Walter Lara edited this page Nov 29, 2023 · 19 revisions

Post Song

Allows to add a new Song.

Request

URL: /v1/songs

Method: POST

Path Parameters: None

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

Content-Type: application/json

Content:

Field Type Description Requirement Type
title string Song title. Required
archived boolean Song archive indicator. Defaults to `false. Optional
genres string array Song genres. Required
moods string array Song moods. Optional
coverArtUrl string Valid URL of cover art picture file. Optional
lyricsUrl string Valid URL of song lyrics file. Optional
description string Song description. Optional
album string Song album. Optional
track integer Song track. Optional
language string Song language. Optional
coverRemixSample boolean Indicates if the Song is a Cover, Remix or Sample. Optional
compositionCopyrightOwner string Song composition copyright owner. Optional
compositionCopyrightYear integer Song composition copyright year. Optional
phonographicCopyrightOwner string Song phonographic copyright owner. Optional
phonographicCopyrightYear integer Song phonographic copyright year. Optional
parentalAdvisory string Song parental advisory. Optional
barcodeType string Song barcode type. Valid values are: Upc and Ean. Optional
barcodeNumber string Song barcode number. Optional
isrc string International Standard Recording Code (ISRC). Optional
iswc string International Standard Musical Work Code (ISWC). Optional
ipis string array Interested Party Information (IPIS) Numbers. Optional
releaseDate string Song release date (ISO-8601 format) Optional

Content example:

{
    "title": "Blinding Lights",
    "genres": ["Synthwave", "Synthpop"],
    "moods": ["Cool", "Upbeat"],
    "coverArtUrl": "https://www.example.com/bindinglights/cover.png",
    "lyricsUrl": "https://www.example.com/bindinglights/lyrics.txt",
    "description": "Song by The Weeknd",
    "compositionCopyrightOwner": "© The Weeknd",
    "compositionCopyrightYear": 2023
}

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
songId string UUID of the added Song. Always

Content example:

{
    "songId": "7bd2862f-8deb-4814-8943-156d9dab80dd"
}

❌ Error Responses

1. Bad Request

Code: 400 BAD REQUEST

Condition: If a mandatory content field is missing.

Headers:

Content-Type: application/json

Content example:

{
    "code": 400,
    "description": "Bad Request",
    "cause": "missing title"
}

2. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

See Also

Patch Song (Update Song)

Get Song

Get Songs

Get Song Count

Delete Song

Upload Song Audio

Process Song Stream Token Agreement

Get Song Genres

Get Song Genre Count

Clone this wiki locally