A string representing the audio URL, a file upload ID, or an options object.
The URL for the audio.
The ID of the file upload.
The caption as a string, an array of strings, or an array of rich text objects.
An audio block object compatible with Notion's API, or null if the URL/ID is invalid.
// Use with an external URL
const externalAudio = block.audio.createBlock("https://thomasjfrank.com/wp-content/uploads/2025/05/output3.mp3");
// Use with a file upload ID
const fileUploadAudio = block.audio.createBlock("123e4567-e89b-12d3-a456-426614174000");
// Use with options object for external audio
const externalAudio = block.audio.createBlock({
url: "https://thomasjfrank.com/wp-content/uploads/2025/05/output3.mp3",
caption: "Check out my mixtape, man."
});
// Use with options object for file upload
const fileUploadAudio = block.audio.createBlock({
id: "123e4567-e89b-12d3-a456-426614174000",
caption: "Check out my mixtape, man."
});
Creates an audio block.