0

Delete Group

by
Published Oct 17, 2025

Use this method to list the log groups.

Script mezmo Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Delete Group
4
 * Use this method to list the log groups.
5
 */
6
export async function main(auth: RT.Mezmo, groupId: string, servicekey: string) {
7
	const url = new URL(`https://api.mezmo.com/v1/config/groups/${groupId}`)
8

9
	const response = await fetch(url, {
10
		method: 'DELETE',
11
		headers: {
12
			servicekey: servicekey,
13
			Authorization: 'Token ' + auth.apiKey
14
		},
15
		body: undefined
16
	})
17
	if (!response.ok) {
18
		const text = await response.text()
19
		throw new Error(`${response.status} ${text}`)
20
	}
21
	return await response.json()
22
}
23