# Typeform on boxd

> Build beautiful, interactive forms that people love to fill out. Collect data, accept payments, and integrate with your favorite tools.

- Page: https://boxd.sh/integrations/typeform/
- CLI: `run typeform` (35 commands, 8 marked common)
- SDK: `import { typeform } from "@boxd/run"`; every parameter and response type is at `@boxd/run/typeform`
- Triggers: 1
- Connect: `run auth typeform` (Sign in with Typeform), or https://app.boxd.sh/integrations/detail/typeform
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth typeform      # once: prints a link to connect your account
run typeform           # list its commands
run typeform list-forms
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { typeform } from "@boxd/run";

const result = await typeform.listForms({});
console.log(result);

typeform.on("new-response", { form_id: "…" }, async (event) => {
  // New Form Response: runs on this machine, once per event
  console.log(event);
});
```

Run it with `run typeform.run.ts`. A script that calls `.on()` keeps running as a job and handles each event.

## Commands

Required flags are listed; `run typeform <command> --help` lists the optional ones. "common" marks what `run typeform` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `create-account-workspace` | `typeform.createAccountWorkspace()` | `--account-id` `--name` | 0 | Create a new workspace in a specific Typeform account |
| `create-form` ·common | `typeform.createForm()` | `--title` | 8 | Create a new Typeform form with customizable fields, logic, and settings |
| `create-image` | `typeform.createImage()` | `--file-name` | 2 | Upload a new image to your Typeform account via base64 encoding or URL |
| `create-or-update-webhook` | `typeform.createOrUpdateWebhook()` | `--form-id` `--tag` `--url` | 4 | Create a new webhook or update an existing one for a specified Typeform |
| `create-theme` | `typeform.createTheme()` | `--colors` `--fields` `--font` | 4 | Create a new custom theme in Typeform with colors, fonts, background, and layout settings |
| `create-workspace` | `typeform.createWorkspace()` | `--name` | 0 | Create a new workspace in Typeform |
| `delete-form` | `typeform.deleteForm()` | `--form-id` | 0 | Permanently delete a Typeform and all of its responses |
| `delete-image` | `typeform.deleteImage()` | `--image-id` | 0 | Delete an image from your Typeform account |
| `delete-responses` | `typeform.deleteResponses()` | `--form-id` `--included-response-ids` | 0 | Delete specific responses from a Typeform by response IDs |
| `delete-theme` | `typeform.deleteTheme()` | `--theme-id` | 0 | Delete a theme from your Typeform account |
| `delete-webhook` | `typeform.deleteWebhook()` | `--form-id` `--tag` | 0 | Delete a webhook configuration from a Typeform form |
| `delete-workspace` | `typeform.deleteWorkspace()` | `--workspace-id` | 0 | Delete a workspace from your Typeform account |
| `get-about-me` ·common | `typeform.getAboutMe()` | — | 0 | Get information about the owner account in Typeform |
| `get-all-response-files` | `typeform.getAllResponseFiles()` | `--form-id` | 0 | Retrieve a compressed archive containing all files that respondents uploaded for a specified form |
| `get-background-by-size` | `typeform.getBackgroundBySize()` | `--image-id` `--size` | 0 | Retrieve a background image by size from Typeform |
| `get-choice-image-by-size` | `typeform.getChoiceImageBySize()` | `--image-id` `--size` | 0 | Retrieve a choice image by size from Typeform |
| `get-form` ·common | `typeform.getForm()` | `--form-id` | 0 | Retrieve a specific form's complete configuration including fields, logic, settings, and theme |
| `get-form-messages` | `typeform.getFormMessages()` | `--form-id` | 0 | Retrieve custom messages for a Typeform including button labels, error messages, and UI text |
| `get-form-responses` ·common | `typeform.getFormResponses()` | `--form-id` | 12 | Retrieve form responses from Typeform with filtering by date, pagination, search, and response type |
| `get-image-by-size` | `typeform.getImageBySize()` | `--image-id` `--size` | 0 | Retrieve an image in a specific size from Typeform |
| `get-theme` | `typeform.getTheme()` | `--theme-id` | 0 | Retrieve a specific theme's configuration including colors, fonts, and layout settings |
| `get-webhook` | `typeform.getWebhook()` | `--form-id` `--tag` | 0 | Retrieve a single webhook by specifying both the form ID and webhook tag |
| `get-workspace` ·common | `typeform.getWorkspace()` | `--workspace-id` | 0 | Retrieve detailed information about a specific workspace including its name, forms, and team members |
| `list-forms` ·common | `typeform.listForms()` | — | 6 | Retrieve a list of all forms in your Typeform account with filtering, pagination, and sorting options |
| `list-images` | `typeform.listImages()` | — | 0 | Retrieve all images in your Typeform account in reverse-chronological order |
| `list-themes` ·common | `typeform.listThemes()` | — | 2 | Retrieve a paginated list of themes in your Typeform account |
| `list-webhooks` | `typeform.listWebhooks()` | `--form-id` | 0 | Retrieve all webhooks associated with a specified typeform |
| `list-workspaces` ·common | `typeform.listWorkspaces()` | — | 3 | Retrieve all workspaces in a Typeform account with their IDs, names, form counts, and members |
| `patch-form` | `typeform.patchForm()` | `--form-id` `--operations` | 0 | Partially update a Typeform using JSON Patch operations |
| `patch-theme` | `typeform.patchTheme()` | `--theme-id` | 8 | Partially update a Typeform theme by ID |
| `update-form` | `typeform.updateForm()` | `--form-id` | 11 | Update an existing Typeform by completely replacing its configuration |
| `update-form-messages` | `typeform.updateFormMessages()` | `--form-id` | 5 | Update custom messages for form UI elements like buttons, errors, and placeholders in Typeform |
| `update-theme` | `typeform.updateTheme()` | `--colors` `--font` `--name` `--theme-id` | 5 | Update a theme's complete definition in Typeform |
| `update-workspace` | `typeform.updateWorkspace()` | `--operations` `--workspace-id` | 0 | Update a workspace's name or manage team member access (add/remove members) in Typeform |
| `upload-video` | `typeform.uploadVideo()` | `--field-id` `--form-id` `--language` | 0 | Initiate a video upload to Typeform by obtaining a signed upload URL |

## Triggers

`typeform.on("<event>", handler)` in a script; required config goes before the handler as an object.

| Event | Name | Required config | Description |
|---|---|---|---|
| `"new-response"` | New Form Response | `form_id` | Triggers when a respondent completes and submits the form |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
