Skip to main content

PUT Audio

Overview


The following table contains information about the PUT method for managing the process of updating a specific audio.

PUT Audio
MethodPUT
URL or Endpoint/api/v1/projects/projectId/audios
HeadersAuthorization
ParametersprojectId
BodyCheck the request body below.

The description of the URL parameter is as follows:

projectId Parameter
URL Parameter NameprojectId
MandatoryYes
Typestring
DescriptionUnique Id of the project.

Request Body

{
"publicId": "string",
"title": "string",
"description": "string",
"source": "string",
"author": "string",
"publishStartDate": "2024-05-28T11:44:17.062Z",
"publishEndDate": "2024-05-28T11:44:17.063Z",
"link": "string",
"chapterState": true,
"customParameters": [
{
"key": "string",
"value": "string"
}
],
"chapters": [
{
"title": "string",
"time": 0
}
]
}

Information about the fields that appear on the request body are displayed in the table below.

Parameter NameMandatoryTypeDescription
publicIdYesstringUnique identifier of the audio
titleNostringTitle of the audio
descriptionNostringDescription of the audio
sourceNostringSource of the audio
authorNostringAuthor of the audio
publishStartDateNostringStart date of audio publishing
publishEndDateNostringEnd date of audio publishing
linkNostringLink associated with the audio
chapterStateNobooleanState of audio chapters
customParametersNoarray of objectsCustom parameters for the audio
keyNostringKey for custom parameter
valueNostringValue for custom parameter
chaptersNoarray of objectsChapters associated with the audio
titleNostringTitle of the chapter
timeNonumberTime in seconds when the chapter ends

Response

{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "{audioId}",
"title": "{title}",
"description": "{description}",
"source": "",
"author": "",
"publishStatusName": null,
"thumbnail": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/thumbnails/retina.jpg",
"canEmbed": true,
"link": "",
"chapterState": true,
"duration": null,
"publishStartDate": null,
"publishEndDate": null,
"insertDate": "2024-05-28T11:05:43.4117897",
"customParameters": [],
"chapters": [
{
"title": "Chapter 1",
"time": 50
},
{
"title": "Chapter 2",
"time": 93
}
]
},
"resultInfo": null,
"statusCode": 200
}

Information about the fields that appear when you receive the response are displayed in the table below.

Field NameTypeDescription
successboolIf the response is successful it will return true. Otherwise will return false
errorsarray[string]Indicates if there was an error
messagesarray[string]Returns the response message from back-end
resultarray[Object]Returns the response object
publicIdstringThe unique Id of the audio
titlestringTitle of the audio
descriptionstringDescription of the audio
sourcestringThe source of the audio.
authorstringThe author of the audio.
publishStatusNamestringName of the publish status.
thumbnailstringURL of the audio's thumbnail image
canEmbedboolIndicates whether the audio can be embedded.
linkstringUrl of the embed.
chapterStateboolIndicates whether chapters are enabled
durationstringDuration of the audio in seconds
publishStartDateDateDate and time when the audio was published
publishEndDateDateDate and time when audio will not be available.
insertDateDateDate and time when the audio was inserted
customParametersarray[Object]An array of custom parameters.
chaptersarray[Object]Returns an array of chapters.
titlestringThe title of the chapter.
timeinteger($int32)The end time for the specific chapter.
resultInfostringReturns extra information about the result
statusCodeinteger($int32)Returns the HTTP Status Code

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed