0

Delete Record by ID

by
Published Oct 17, 2025

This API deletes a specific record, identified by its ID value, which is displayed in a report of your Zoho Creator application. The delete request is subject to custom validations configured for the target form.

Script zoho Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Zoho = {
3
  token: string;
4
  baseUrl: string;
5
};
6
/**
7
 * Delete Record by ID
8
 * This API deletes a specific record, identified by its ID value, which is displayed in a report of your Zoho Creator application. The delete request is subject to custom validations configured for the target form.
9
 */
10
export async function main(
11
  auth: Zoho,
12
  account_owner_name: string,
13
  app_link_name: string,
14
  report_link_name: string,
15
  record_ID: string,
16
  body: {
17
    result?: { message?: false | true; tasks?: false | true };
18
    skip_workflow?: {}[];
19
  },
20
) {
21
  const url = new URL(
22
    `${auth.baseUrl}/creator/v2.1/data/${account_owner_name}/${app_link_name}/report/${report_link_name}/${record_ID}`,
23
  );
24

25
  const response = await fetch(url, {
26
    method: "DELETE",
27
    headers: {
28
      "Content-Type": "application/json",
29
      Authorization: "Zoho-oauthtoken " + auth.token,
30
    },
31
    body: JSON.stringify(body),
32
  });
33
  if (!response.ok) {
34
    const text = await response.text();
35
    throw new Error(`${response.status} ${text}`);
36
  }
37
  return await response.json();
38
}
39