# Kit on boxd

> Kit is a platform that allows creators to automate tasks and developers to build apps for the Kit App Store.

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

## From the shell

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

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 { every, kit } from "@boxd/run";

every("1 hour", async () => {
  const result = await kit.listTags({});
  console.log(result);
});
```

Run it with `run kit.run.ts`. Kit has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

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

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `add-subscriber-to-form` ·common | `kit.addSubscriberToForm()` | `--form-id` `--id` | 1 | Add an existing subscriber to a form by their IDs |
| `add-subscriber-to-form-by-email` ·common | `kit.addSubscriberToFormByEmail()` | `--email-address` `--form-id` | 1 | Add an existing subscriber to a form using their email address |
| `create-broadcast` ·common | `kit.createBroadcast()` | `--content` `--subject` | 6 | Create a new broadcast (email campaign) to send to subscribers |
| `create-custom-field` ·common | `kit.createCustomField()` | `--label` | 0 | Create a new custom field for subscriber data |
| `create-subscriber` ·common | `kit.createSubscriber()` | `--email-address` | 3 | Create a new subscriber or update an existing one (upsert) |
| `create-tag` ·common | `kit.createTag()` | `--name` | 0 | Create a new tag in the account |
| `create-webhook` ·common | `kit.createWebhook()` | `--event` `--target-url` | 0 | Creates a webhook subscription for real-time event notifications |
| `delete-broadcast` ·common | `kit.deleteBroadcast()` | `--id` | 0 | Delete a specific broadcast |
| `delete-custom-field` ·common | `kit.deleteCustomField()` | `--id` | 0 | Delete a specific custom field |
| `delete-subscriber` ·common | `kit.deleteSubscriber()` | `--id` | 0 | Unsubscribe a subscriber from all email communications by their ID |
| `delete-tag` ·common | `kit.deleteTag()` | `--id` | 0 | Delete a tag by ID |
| `delete-webhook` ·common | `kit.deleteWebhook()` | `--id` | 0 | Delete a webhook by ID |
| `filter-subscribers` ·common | `kit.filterSubscribers()` | `--all` | 0 | Filter subscribers based on engagement criteria such as email opens, clicks, or delivery status |
| `get-account` ·common | `kit.getAccount()` | — | 0 | Retrieve current account information |
| `get-account-colors` ·common | `kit.getAccountColors()` | — | 0 | Retrieve list of colors associated with the account |
| `get-broadcast` ·common | `kit.getBroadcast()` | `--id` | 0 | Retrieve details of a specific broadcast by ID |
| `get-broadcast-clicks` ·common | `kit.getBroadcastClicks()` | `--broadcast-id` | 3 | Retrieve link click data for a specific broadcast by ID |
| `get-broadcast-stats` ·common | `kit.getBroadcastStats()` | `--id` | 0 | Retrieve statistics for a specific broadcast by ID |
| `get-creator-profile` ·common | `kit.getCreatorProfile()` | — | 0 | Retrieve the creator profile information for the account |
| `get-email-stats` ·common | `kit.getEmailStats()` | — | 0 | Retrieve email statistics for the account |
| `get-growth-stats` ·common | `kit.getGrowthStats()` | — | 2 | Retrieve growth statistics for the account over a date range |
| `get-subscriber` ·common | `kit.getSubscriber()` | `--id` | 0 | Retrieve a specific subscriber by their ID |
| `get-subscriber-stats` ·common | `kit.getSubscriberStats()` | `--subscriber-id` | 2 | Retrieve email stats for a specific subscriber |
| `list-broadcasts` ·common | `kit.listBroadcasts()` | — | 4 | Retrieve a paginated list of all broadcasts |
| `list-custom-fields` ·common | `kit.listCustomFields()` | — | 4 | Retrieve a paginated list of custom fields |
| `list-email-templates` ·common | `kit.listEmailTemplates()` | — | 4 | Retrieve a paginated list of all email templates in the Kit account |
| `list-forms` ·common | `kit.listForms()` | — | 6 | Lists all forms in your Kit account with optional filtering and cursor-based pagination |
| `list-segments` ·common | `kit.listSegments()` | — | 4 | Retrieve a paginated list of segments |
| `list-sequences` ·common | `kit.listSequences()` | — | 4 | Retrieve a paginated list of all sequences |
| `list-subscribers` ·common | `kit.listSubscribers()` | — | 12 | Retrieve a list of subscribers |
| `list-subscribers-for-form` ·common | `kit.listSubscribersForForm()` | `--form-id` | 9 | Retrieves subscribers for a specific form by ID with optional filtering and cursor-based pagination |
| `list-tag-subscribers` ·common | `kit.listTagSubscribers()` | `--tag-id` | 9 | Retrieve subscribers for a specific tag |
| `list-tags` ·common | `kit.listTags()` | — | 4 | Retrieve a paginated list of all tags in the Kit account |
| `list-webhooks` ·common | `kit.listWebhooks()` | — | 3 | Retrieve a paginated list of all webhooks configured in the Kit account |
| `remove-tag-from-subscriber` ·common | `kit.removeTagFromSubscriber()` | `--subscriber-id` `--tag-id` | 0 | Remove a tag from a subscriber using their subscriber ID |
| `tag-subscriber` ·common | `kit.tagSubscriber()` | `--subscriber-id` `--tag-id` | 0 | Associate a subscriber with a specific tag by ID |
| `tag-subscriber-by-email` ·common | `kit.tagSubscriberByEmail()` | `--email-address` `--tag-id` | 0 | Assigns a tag to an existing subscriber using their email address |
| `untag-subscriber-by-email` ·common | `kit.untagSubscriberByEmail()` | `--email-address` `--tag-id` | 0 | Remove a tag from a subscriber using their email address |
| `update-account-colors` ·common | `kit.updateAccountColors()` | `--colors` | 0 | Update the list of colors for the account |
| `update-custom-field` ·common | `kit.updateCustomField()` | `--id` `--label` | 0 | Update a custom field's label |
| `update-subscriber` ·common | `kit.updateSubscriber()` | `--id` | 3 | Update an existing subscriber's information |
| `update-tag` ·common | `kit.updateTag()` | `--id` `--name` | 0 | Update a tag's name by ID |

## 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.
