Optional calls
Delete Audio by Protocol Slug
Delete Audio by Protocol Slug
Use the deleteAudioByProtocolSlug mutation to permanently delete the audio file associated with a protocol from S3 storage. The protocol and all its analysis results remain intact — only the audio file is removed.
Input Parameters
protocolSlug(String!) — the slug of the protocol whose audio file you want to delete.
GraphQL Mutation
mutation DeleteAudioByProtocolSlug($protocolSlug: String!) {
deleteAudioByProtocolSlug(protocolSlug: $protocolSlug) {
success
protocol {
slug
}
}
}
Mutation Variables
{
"protocolSlug": "PROTOCOL_SLUG"
}
Example JavaScript Implementation
import axios from "axios";
async function deleteAudioByProtocolSlug(protocolSlug) {
const res = await axios({
method: "POST",
url: "https://api-v2.speechmind.com/external/v2/graphql",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.SPEECHMIND_API_KEY,
},
data: JSON.stringify({
query: DELETE_AUDIO_BY_PROTOCOL_SLUG,
variables: { protocolSlug },
}),
});
const { success, protocol } = res.data.data.deleteAudioByProtocolSlug;
console.log(success ? "Audio deleted for protocol:" : "Failed to delete audio for protocol:", protocol.slug);
return success;
}
Notes
- This operation permanently deletes the audio file from S3 and cannot be undone.
- The protocol metadata, agenda items, transcriptions, and AI-generated results are not affected.
- Use this mutation for privacy compliance, data retention policies, or storage cost reduction.
Have questions?
Still have questions? Talk to support.