Optional calls
Delete Agenda Item by Id
Delete Agenda Item by Id
The deleteAgendaItemById mutation permanently deletes an agenda item and all its associated text blocks and resolutions (cascade delete).
⚠️ This action is irreversible. All content linked to the agenda item will be lost.
GraphQL Mutation
mutation DeleteAgendaItemById($agendaItemId: Int!) {
deleteAgendaItemById(agendaItemId: $agendaItemId) {
success
}
}
Mutation Variables
{
"agendaItemId": 42
}
Example JavaScript Implementation
import axios from "axios";
async function deleteAgendaItem(agendaItemId) {
try {
const response = 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_AGENDA_ITEM_BY_ID,
variables: { agendaItemId },
}),
});
const data = response.data.data.deleteAgendaItemById;
if (data.success) {
console.log("Agenda item deleted successfully");
}
} catch (error) {
console.error("Error deleting agenda item:", error);
}
}
// Example usage
deleteAgendaItem(42); Have questions?
Still have questions? Talk to support.