0

Delete Form

by
Published Mar 25, 2024

Select a form to be deleted. [See the docs here](https://developer.typeform.com/create/reference/delete-form/).

Script typeform Verified

The script

Submitted by hugo697 Bun
Verified 398 days ago
1
import { createClient } from '@typeform/api-client'
2

3
type Typeform = {
4
	token: string
5
	baseUrl: string
6
}
7

8
export async function main(resource: Typeform, formId: string) {
9
	const typeformAPI = createClient({
10
		token: resource.token,
11
		apiBaseUrl: resource.baseUrl
12
	})
13

14
	return await typeformAPI.forms.delete({
15
		uid: formId
16
	})
17
}
18