# Apollo on boxd

> Apollo provides CRM and lead generation capabilities, helping businesses discover contacts, manage outreach, and track sales pipelines for consistent customer relationship development.

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

## From the shell

```sh
run auth apollo      # once: prints a link to connect your account
run apollo           # list its commands
run apollo get-labels
```

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

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

Run it with `run apollo.run.ts`. Apollo 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 apollo <command> --help` lists the optional ones. "common" marks what `run apollo` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `add-contacts-to-sequence` ·common | `apollo.addContactsToSequence()` | `--contact-ids` `--emailer-campaign-id` `--send-email-from-email-account-id` `--sequence-id` | 6 | Adds contacts to a specified Apollo email sequence and returns the contact details |
| `bulk-organization-enrichment` ·common | `apollo.bulkOrganizationEnrichment()` | `--domains` | 0 | Enriches data for up to 10 organizations simultaneously by providing a list of their base company domains (e.g., 'apollo.io', not 'www.apollo.io') |
| `bulk-people-enrichment` ·common | `apollo.bulkPeopleEnrichment()` | `--details` | 3 | Use to enrich multiple person profiles simultaneously with comprehensive data from Apollo's database |
| `bulk-update-account-stage` ·common | `apollo.bulkUpdateAccountStage()` | `--account-ids` `--account-stage-id` | 0 | Bulk updates the stage for specified existing Apollo.io accounts, moving them to a valid new account stage |
| `create-account` | `apollo.createAccount()` | `--name` | 5 | Creates a new account in Apollo.io; a new record is created even if a similar account exists, and provided `owner_id` or `account_stage_id` must be valid existing IDs |
| `create-bulk-accounts` | `apollo.createBulkAccounts()` | `--accounts` | 1 | Creates multiple accounts in Apollo.io with a single API call (maximum 100 accounts per request) |
| `create-bulk-contacts` | `apollo.createBulkContacts()` | `--contacts` | 1 | Bulk create multiple contacts in Apollo with a single API call |
| `create-call-record` | `apollo.createCallRecord()` | — | 13 | Log call records in Apollo from external systems |
| `create-contact` | `apollo.createContact()` | `--first-name` `--last-name` | 13 | Creates a new contact in Apollo.io; use `account_id` to link to an organization and `contact_stage_id` for sales stage |
| `create-custom-field` | `apollo.createCustomField()` | `--label` `--type` | 2 | Creates a new custom field in Apollo.io for contacts, accounts, or opportunities |
| `create-deal` | `apollo.createDeal()` | `--name` | 5 | Creates a new sales opportunity (deal) in Apollo.io; all provided IDs (`owner_id`, `account_id`, `opportunity_stage_id`) must be valid existing Apollo identifiers |
| `create-task` | `apollo.createTask()` | `--contact-id` `--due-at` `--status` `--type` `--user-id` | 3 | Create a single task in Apollo.io |
| `get-account` ·common | `apollo.getAccount()` | `--id` | 0 | Retrieve detailed information about a specific account by its Apollo ID |
| `get-auth-status` ·common | `apollo.getAuthStatus()` | — | 0 | Check whether the provided Apollo API key is valid and accepted by Apollo (health/auth check) |
| `get-contact` ·common | `apollo.getContact()` | `--contact-id` | 0 | Retrieves detailed information about a specific contact by its ID |
| `get-deal` ·common | `apollo.getDeal()` | `--opportunity-id` | 0 | Retrieves information about a specific deal by its ID |
| `get-labels` ·common | `apollo.getLabels()` | — | 0 | Retrieves all labels from Apollo.io, used for organizing contacts and accounts |
| `get-opportunity-stages` ·common | `apollo.getOpportunityStages()` | — | 0 | Retrieves all configured opportunity (deal) stages from the Apollo.io account |
| `get-organization` ·common | `apollo.getOrganization()` | `--id` | 0 | Retrieves complete information about a specific organization by its Apollo ID |
| `get-organization-job-postings` ·common | `apollo.getOrganizationJobPostings()` | `--organization-id` | 3 | Retrieves paginated job postings for a specified organization by its ID, optionally filtering by domain; ensure `organization_id` is a valid identifier |
| `get-typed-custom-fields` ·common | `apollo.getTypedCustomFields()` | — | 0 | Retrieves all typed custom field definitions available in the Apollo.io instance, detailing their types and configurations |
| `list-account-stages` | `apollo.listAccountStages()` | — | 0 | Retrieves the IDs for all available account stages in your team's Apollo account |
| `list-contact-stages` | `apollo.listContactStages()` | — | 0 | Retrieves all available contact stages from an Apollo account, including their unique IDs and names |
| `list-deals` | `apollo.listDeals()` | — | 3 | Retrieves a list of deals from Apollo, using Apollo's default sort order if 'sort_by_field' is omitted |
| `list-email-accounts` ·common | `apollo.listEmailAccounts()` | — | 0 | Retrieves all email accounts and their details for the authenticated user; takes no parameters |
| `list-fields` ·common | `apollo.listFields()` | — | 1 | Retrieves all field definitions from Apollo.io, including system fields and custom fields |
| `list-users` | `apollo.listUsers()` | — | 2 | Retrieves a list of all users (teammates) associated with the Apollo account, supporting pagination via `page` and `per_page` parameters |
| `organization-enrichment` | `apollo.organizationEnrichment()` | `--domain` | 0 | Fetches comprehensive organization enrichment data from Apollo.io for a given company domain; results are most meaningful if the company exists in Apollo's database |
| `organization-search` | `apollo.organizationSearch()` | — | 9 | Searches Apollo's database for organizations using various filters; consumes credits on every call (unavailable on free plans), avoid re-running identical queries and surface quota errors rather than… |
| `people-enrichment` | `apollo.peopleEnrichment()` | — | 12 | Enriches and retrieves information for a person from Apollo.io |
| `people-search` ·common | `apollo.peopleSearch()` | — | 11 | Searches Apollo's contact database for people using various filters; results capped at 50,000 records and does not enrich contact data |
| `search-accounts` | `apollo.searchAccounts()` | — | 6 | Searches for accounts within your existing Apollo.io database using various criteria; requires a paid plan and is limited to 50,000 records |
| `search-calls` | `apollo.searchCalls()` | — | 12 | Searches for call records in Apollo.io using filters like date range, duration, direction (inbound/outgoing), users, contacts, purposes, outcomes, and keywords |
| `search-contacts` | `apollo.searchContacts()` | — | 6 | Searches Apollo contacts using keywords, stage IDs (from 'List Contact Stages' action), or sorting (max 50,000 records; `sort_ascending` requires `sort_by_field`) |
| `search-news-articles` ·common | `apollo.searchNewsArticles()` | `--organization-ids` | 5 | Search for news articles about companies in Apollo's database |
| `search-outreach-emails` ·common | `apollo.searchOutreachEmails()` | — | 2 | Search for outreach emails sent through Apollo sequences |
| `search-sequences` ·common | `apollo.searchSequences()` | — | 3 | Searches for sequences (e.g., automated email campaigns) in Apollo.io |
| `search-tasks` ·common | `apollo.searchTasks()` | — | 13 | Searches for tasks in Apollo.io using filters like keywords, date ranges (due, created, updated), priorities, types, assigned users, associated contacts/accounts, supporting sorting and pagination |
| `update-account` | `apollo.updateAccount()` | `--account-id` | 6 | Updates specified attributes of an existing account in Apollo.io |
| `update-account-owners` ·common | `apollo.updateAccountOwners()` | `--account-ids` `--owner-id` | 0 | Updates the ownership of multiple Apollo accounts to a specified user |
| `update-call-record` | `apollo.updateCallRecord()` | `--id` | 13 | Update an existing call record in Apollo.io |
| `update-contact` | `apollo.updateContact()` | `--contact-id` | 16 | Update an existing contact's information in Apollo |
| `update-contact-ownership` ·common | `apollo.updateContactOwnership()` | `--contact-ids` `--owner-id` | 0 | Updates the ownership of specified Apollo contacts to a given Apollo user, who must be part of the same team |
| `update-contact-stage` ·common | `apollo.updateContactStage()` | `--contact-ids` `--contact-stage-id` | 0 | Updates the stage for one or more existing contacts in Apollo.io to a new valid contact stage, useful for managing sales funnel progression |
| `update-contact-status-in-sequence` ·common | `apollo.updateContactStatusInSequence()` | `--contact-id` `--sequence-id` `--status` | 0 | Updates a contact's status within a designated Apollo sequence, but cannot set the status to 'active' |
| `update-contacts-bulk` | `apollo.updateContactsBulk()` | — | 14 | Bulk update multiple Apollo contacts with a single API call |
| `update-deals` | `apollo.updateDeals()` | `--opportunity-id` | 9 | Updates specified fields of an existing Apollo.io deal (opportunity), requiring a valid `opportunity_id` |
| `view-api-usage-stats` | `apollo.viewApiUsageStats()` | — | 0 | Fetches Apollo API usage statistics and rate limits for the connected team |

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