curl --request POST \
--url https://api.royalti.io/product/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'mediaType=<string>'{
"message": "Media uploaded successfully",
"mediaUrl": "https://storage.example.com/media/product-123/artwork.jpg"
}/product//media
curl --request POST \
--url https://api.royalti.io/product/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'mediaType=<string>'{
"message": "Media uploaded successfully",
"mediaUrl": "https://storage.example.com/media/product-123/artwork.jpg"
}/product/{id}/media endpoint allows uploading media files associated with a specific product.
Method:POST
Path Parameter:
| Parameter | Type | Description |
|---|---|---|
| id | string | The unique identifier of the product. |
| Parameter | Type | Description |
|---|---|---|
| file | file | The media file to upload. |
| mediaType | string | The type of media (e.g., artwork, video, audio). |
const response = await fetch('https://api.royalti.io/product/example-id/media', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Product ID