-
Notifications
You must be signed in to change notification settings - Fork 5
PostSong
Walter Lara edited this page Mar 24, 2023
·
19 revisions
Allows to add a new Song.
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 |
genres | string array | Song genres. | Required |
moods | string array | Song moods. | Optional |
coverArtUrl | string | Valid URL of cover art picture file. | Optional |
description | string | Song description. | Optional |
credits | string | Song production credits. | Optional |
duration | integer | Song duration in milliseconds. This field is automatically updated after the song audio file is uploaded. | Optional |
streamUrl | string | Song streaming URL. This field is automatically updated after the song audio file is uploaded. | Optional |
nftPolicyId | string | Song NFT Policy ID. | Optional |
nftName | string | Song NFT Name. | Optional |
mintingStatus | string | Song minting status. This field is automatically updated. Valid values are: Undistributed, StreamTokenAgreementApproved, MintingPaymentRequested, MintingPaymentReceived, ReadyToDistribute, SubmittedForDistribution, Distributed, Declined, Pending & Minted | Optional |
marketplaceStatus | string | Song marketplace status. This field is automatically updated. Valid valid values are: NotSelling & Selling. | Optional |
Content example:
{
"title": "Blinding Lights",
"genres": ["Synthwave", "Synthpop"],
"moods": ["Cool", "Upbeat"],
"coverArtUrl": "https://somewebsite/weeknd-cover.png",
"description": "Song by The Weeknd",
"credits": "Produced by Max Martin and Oscar Holter",
"streamUrl": "https://www.example.com/blinding_lights.m4a",
"nftPolicyId": "11123344555",
"nftPolicyName": "Blinding Lights NFT"
}
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"
}
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"
}
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.