# PhantomBuster

PhantomBuster is a cloud-based data extraction and automation platform that enables users to automate actions on the web, such as scraping data, generating leads, and automating social media tasks.

- **Category:** ai web scraping
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 53
- **Triggers:** 0
- **Slug:** `PHANTOMBUSTER`
- **Version:** 20260312_00

## Tools

### Abort Agent (v1)

**Slug:** `PHANTOMBUSTER_ABORT_AGENT_V1`

Tool to abort all running instances of an agent using the legacy v1 API. Use when you need to immediately stop an agent's execution. Supports soft abort for graceful shutdown.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | ID of the agent to abort. All running instances of this agent will be stopped. |
| `softAbort` | boolean | No | If true, attempts a soft abort of the agent. Soft abort allows the agent to gracefully finish its current operation before stopping. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Agent

**Slug:** `PHANTOMBUSTER_DELETE_AGENT`

Tool to delete an agent by id. Use when you need to remove a PhantomBuster agent. Ensure the agent is not currently running before deletion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the agent to delete. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Lead Objects

**Slug:** `PHANTOMBUSTER_DELETE_LEAD_OBJECTS`

Tool to delete one or more lead objects from organization storage. Use when you need to remove lead data. Provide either leadObjectId, or both slug and type parameters.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | No | Slug of the object to delete. Must be used together with type parameter. |
| `type` | string | No | Type of object to delete. Must be used together with slug parameter. |
| `leadObjectId` | string | No | ID of a lead object to delete. Provide either leadObjectId, or both slug and type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Many Leads

**Slug:** `PHANTOMBUSTER_DELETE_LEADS_MANY`

Tool to delete multiple leads from organization storage. Use when you need to bulk delete leads by their IDs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | array | Yes | List of lead IDs to delete. Each ID must be a valid lead identifier string. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete List

**Slug:** `PHANTOMBUSTER_DELETE_LIST`

Tool to delete a storage list by id (Beta). Use when you need to remove a list from organization storage.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the list to delete. |
| `X-Phantombuster-Org` | string | No | ID of the org that is perfoming the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Script

**Slug:** `PHANTOMBUSTER_DELETE_SCRIPT`

Tool to delete a script by id. Use when you need to remove a specific script from PhantomBuster. Optionally specify a branch and environment to delete a specific version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the script to delete. |
| `branch` | string | No | Branch of the script to delete. Must be 1-50 characters, alphanumeric, underscores, or hyphens. |
| `environment` | string ("staging" | "release") | No | Enum for script branch environment. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Agent

**Slug:** `PHANTOMBUSTER_GET_AGENT`

Tool to get an agent by its ID. Use when you need to retrieve detailed information about a specific Phantombuster agent, including its configuration, schedule, and execution settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the agent to fetch. |
| `withCode` | string | No | Set to "true" if you want to include the agent's script code in the response |
| `withSlaves` | string | No | Set to "true" if you want to include the agent's slave agents in the response |
| `withManifest` | string | No | Set to "true" if you want to return the agent's manifest in the response |
| `withSubSlaves` | string | No | Set to "true" if you want to include the agent's sub-slave agents in the response (requires withSlaves=true) |
| `withAgentObject` | string | No | Set to "true" if you want to include the agent_object in the response |
| `X-Phantombuster-Org` | string | No | ID of the org that is perfoming the operation (not necessary when using a third party key) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Agent Containers (v1)

**Slug:** `PHANTOMBUSTER_GET_AGENT_CONTAINERS`

Tool to get a list of ended containers for an agent, ordered by date. Use when you need to retrieve the last available output logs from an agent. This is a legacy v1 API endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | ID of the agent from which to retrieve the containers. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Agent Output (v1)

**Slug:** `PHANTOMBUSTER_GET_AGENT_OUTPUT`

Tool to get incremental data from an agent including console output, status, progress and messages. This is a legacy v1 API endpoint designed for easy incremental data retrieval. Use outputPos to track position.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | ID of the agent from which to retrieve the output, status and messages. |
| `mode` | string ("track" | "most-recent") | No | Mode for selecting which agent instance to track. |
| `containerId` | integer | No | ID of the specific instance from which to get console output. Required when mode is 'track'. |
| `fromOutputPos` | integer | No | Return the agent's console output starting from this position. Use for incremental retrieval. |
| `withoutResultObject` | boolean | No | If true, omit the agent's result object from the response to reduce payload size. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Agents

**Slug:** `PHANTOMBUSTER_GET_AGENTS_FETCH_ALL`

Tool to fetch all agents associated with the current user or organization. Use after validating your Phantombuster API key to list available agents.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Deleted Agents

**Slug:** `PHANTOMBUSTER_GET_AGENTS_FETCH_DELETED`

Tool to get deleted agents for the current user or organization. Use when you need to audit recently removed agents.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Branches Diff

**Slug:** `PHANTOMBUSTER_GET_BRANCHES_DIFF`

Tool to get the length difference between the staging and release branch of all scripts. Use when assessing branch changes before deployment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the script branch to fetch the diff from. |
| `X-Phantombuster-Org` | string | No | ID of the org performing the operation. Not required when using a personal API key. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Branches

**Slug:** `PHANTOMBUSTER_GET_BRANCHES_FETCH_ALL`

Tool to fetch all branches associated with the current organization. Use when you need to enumerate every branch across your scripts.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Containers Fetch All

**Slug:** `PHANTOMBUSTER_GET_CONTAINERS_FETCH_ALL`

Tool to get all containers associated with a specified agent. Use when you need to retrieve every container for a given agent, for monitoring or reporting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `agentId` | string | Yes | ID of the agent whose containers will be fetched. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Leads By List

**Slug:** `PHANTOMBUSTER_GET_LEADS_BY_LIST`

Tool to fetch leads by their list ID. Use when you need to retrieve leads from a specific list with optional pagination and filtering.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `listId` | string | Yes | Id of the lead list to fetch leads from. |
| `withCompanies` | boolean | No | Option for retrieving the company associated to the lead. |
| `paginationOptions` | object | No | Options for paginating through leads. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |
| `withLeadObjectsOfTypes` | array | No | Array of lead object types (max 3 items). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get IP Location

**Slug:** `PHANTOMBUSTER_GET_LOCATION_IP`

Tool to retrieve the country of a given or environment IP address. Use when you need to geolocate an IP endpoint. Example: get_location_ip(ip="8.8.8.8")

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ip` | string | No | IPv4 or IPv6 address to retrieve the country of. Omit to use the current environment's public IP. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Export Agent Usage CSV

**Slug:** `PHANTOMBUSTER_GET_ORGS_EXPORT_AGENT_USAGE`

Tool to export agent usage CSV for current organization. Use when you need a downloadable report of all agents' run statistics in CSV format.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `days` | integer | Yes | Number of days of data to export (1 to 180). |
| `agentId` | string | No | If set, export data only for this agent ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Export Container Usage CSV

**Slug:** `PHANTOMBUSTER_GET_ORGS_EXPORT_CONTAINER_USAGE`

Tool to export container usage CSV for current organization. Use when you need a downloadable CSV report of container execution history up to 6 months; URL expires in 30 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `days` | integer | Yes | Number of days of data to export (1 to 180). |
| `agentId` | string | No | If set, export data only for this agent ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organization

**Slug:** `PHANTOMBUSTER_GET_ORGS_FETCH`

Tool to fetch current organization details. Use when you need to retrieve the organization associated with the provided API key.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Agent Groups

**Slug:** `PHANTOMBUSTER_GET_ORGS_FETCH_AGENT_GROUPS`

Tool to get agent groups and order for the current organization. Use when you need to review how agents are grouped and ordered.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `X-Phantombuster-Org` | string | No | ID of the org performing the operation (omit if using your own API key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organization Resources

**Slug:** `PHANTOMBUSTER_GET_ORGS_FETCH_RESOURCES`

Tool to get current organization's resources and usage. Use when you need to monitor quotas.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Org Running Containers

**Slug:** `PHANTOMBUSTER_GET_ORGS_FETCH_RUNNING_CONTAINERS`

Tool to get the current organization's running containers. Use after listing agents to identify active containers across the organization.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Org Storage Lists Fetch All

**Slug:** `PHANTOMBUSTER_GET_ORG_STORAGE_LISTS_FETCH_ALL`

Tool to fetch all storage lists for the authenticated organization. Use when you need to enumerate every storage list available (Beta).

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Script

**Slug:** `PHANTOMBUSTER_GET_SCRIPT`

Tool to fetch a script by its unique ID. Use when you need to retrieve detailed metadata about a specific script, including its branches, visibility, and optionally its source code.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the script to fetch. |
| `branch` | string | No | If set, the specified branch will be used to retrieve the script. |
| `withCode` | string ("staging" | "release") | No | Environment enumeration for withCode parameter. |
| `environment` | string ("staging" | "release") | No | Environment enumeration for script branches. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation. Not necessary when using a third party key. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Script by Name

**Slug:** `PHANTOMBUSTER_GET_SCRIPT_BY_NAME`

Tool to retrieve a script by its name from Phantombuster (Legacy v1 API). Use when you need to fetch script metadata or content by name. Supports both JSON (structured) and raw (plain text) response formats.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("json") | No | Response format: 'json' returns structured metadata. |
| `name` | string | Yes | Name of the script to retrieve, with its extension (.js or .coffee). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Script Code

**Slug:** `PHANTOMBUSTER_GET_SCRIPTS_CODE`

Tool to get the code of a script. Use when you need to retrieve the source code content of a specific script.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `org` | string | No | If set, the specified org will be used to fetch the code. |
| `branch` | string | No | If set, the specified branch will be used to fetch the code. |
| `script` | string | Yes | Name of the script to fetch the code from. |
| `environment` | string ("staging" | "release") | No | Environment enum for script code fetching. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Scripts

**Slug:** `PHANTOMBUSTER_GET_SCRIPTS_FETCH_ALL`

Tool to fetch all scripts for the current user. Use after authenticating your Phantombuster API key to list scripts without their code bodies.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get User Information

**Slug:** `PHANTOMBUSTER_GET_USER`

Tool to get information about your PhantomBuster account and your agents using the legacy v1 API. Use when you need to check account quotas, remaining resources, or list associated agents.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unschedule All Agent Launches

**Slug:** `PHANTOMBUSTER_POST_AGENTS_UNSCHEDULE_ALL`

Tool to unschedule all scheduled launches for agents. Use when you need to disable every automated agent run organization-wide after verifying your API key.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Request AI Completion

**Slug:** `PHANTOMBUSTER_POST_AI_COMPLETIONS`

Tool to request a text completion from the AI module. Use when you need to generate text based on a prompt.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `n` | integer | No | Number of completion choices to generate. |
| `stop` | array | No | Sequences where the API will stop generating further tokens. |
| `topP` | number | No | Nucleus sampling probability between 0 and 1. |
| `model` | string | No | Identifier of the AI model to use for the completion. |
| `prompt` | string | Yes | Input text prompt to generate a completion for. |
| `maxTokens` | integer | No | Maximum number of tokens to generate in the completion. |
| `temperature` | number | No | Sampling temperature between 0 and 1. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Branch

**Slug:** `PHANTOMBUSTER_POST_BRANCHES_CREATE`

Tool to create a new branch. Use when you need to isolate updates by creating a separate branch. Use after authenticating with your Phantombuster API key and optionally specifying an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the branch to create. |
| `X-Phantombuster-Org` | string | No | ID of the organization performing the operation (not needed when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Branch

**Slug:** `PHANTOMBUSTER_POST_BRANCHES_DELETE`

Tool to delete a branch by id. Use when you need to remove obsolete or incorrect script branches; ensure the branch exists before calling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the branch to be deleted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Solve hCaptcha

**Slug:** `PHANTOMBUSTER_POST_HCAPTCHA`

Tool to solve an hCaptcha challenge. Use when you need a valid hCaptcha token for form submissions or automation flows.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `proxy` | string | No | Proxy URL (e.g., http://user:pass@host:port) to route requests through. |
| `pageUrl` | string | Yes | Full URL of the page where the hCaptcha appears. |
| `siteKey` | string | Yes | The public site key of the hCaptcha widget. |
| `userAgent` | string | No | Custom User-Agent to simulate in the solving request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Identity Token

**Slug:** `PHANTOMBUSTER_POST_IDENTITIES_GENERATE_TOKEN`

Tool to generate an identity token for PhantomBuster. Use when you need to create a new identity token for authentication or session management.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Many Leads

**Slug:** `PHANTOMBUSTER_POST_ORG_STORAGE_LEADS_SAVE_MANY`

Tool to save multiple leads (1-20) to organization storage in a single batch operation (Beta). Use when you need to create or update leads with LinkedIn profile data and optional enrichment fields.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `leads` | array | Yes | Array of leads to save. Must contain between 1 and 20 leads. Each lead requires a linkedinProfileUrl. |
| `X-Phantombuster-Org` | string | No | ID of the organization performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Solve reCAPTCHA

**Slug:** `PHANTOMBUSTER_POST_RECAPTCHA`

Tool to solve a reCAPTCHA challenge (v2 or v3). Use when you need a valid reCAPTCHA response token for form submissions or automation. Note: API returns 200 status even on errors; check the error field in the response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | Yes | The site key of the reCAPTCHA widget (found in the page HTML or network requests). |
| `url` | string | Yes | Full URL of the page where the reCAPTCHA widget appears. |
| `type` | string ("v2" | "v3") | Yes | Version of reCAPTCHA to solve: 'v2' for checkbox or invisible reCAPTCHA, 'v3' for score-based reCAPTCHA. |
| `minScore` | number | No | Minimum score required for reCAPTCHA v3 (between 0 and 1). Only applicable for type='v3'. |
| `pageAction` | string | No | Action name for reCAPTCHA v3 (matches the action parameter in grecaptcha.execute). Only applicable for type='v3'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Script Visibility

**Slug:** `PHANTOMBUSTER_POST_SCRIPTS_VISIBILITY`

Tool to update the visibility of a script. Use when you need to change whether a script is private, public, or open source.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the script to change visibility for. |
| `branch` | string | Yes | Name of the branch to change visibility for. |
| `visibility` | string ("private" | "semi public" | "public" | "semi open source" | "open source") | Yes | New branch visibility. |
| `X-Phantombuster-Org` | string | No | ID of the organization performing the operation (not needed when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Release Branch

**Slug:** `PHANTOMBUSTER_RELEASE_BRANCH`

Tool to release a script branch. Use when you need to deploy a branch to production or release changes to specified scripts.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the branch to release. |
| `scriptIds` | array | Yes | List of script IDs to release. |
| `X-Phantombuster-Org` | string | No | ID of the organization performing the operation (not needed when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Agent

**Slug:** `PHANTOMBUSTER_SAVE_AGENT`

Tool to create a new agent or update an existing one. Use when you need to configure an agent's launch schedule, settings, or behavior. If an agent ID is provided, the existing agent will be updated; otherwise, a new agent is created.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | If provided, updates the existing agent with this ID. If omitted, creates a new agent. |
| `org` | string | No | Organization to link the agent to (pattern: ^(deleted_\d{1,16}-)?[a-z][a-z0-9-_]{1,48}[a-z0-9_]$). |
| `name` | string | No | Name of the agent (max 100 characters) |
| `branch` | string | No | Branch to assign the agent to (alphanumeric, dash, max 50) |
| `script` | string | No | Script filename to assign to the agent (e.g., 'myscript.js') |
| `argument` | string | No | Default argument used to launch the agent (string or object) |
| `expireAt` | integer | No | Unix timestamp (epoch ms) when the agent will be deleted. |
| `fileMgmt` | string ("folders" | "mix" | "delete") | No | Agent file management type. |
| `proxyType` | string ("none" | "http" | "pool" | "squid lease") | No | Proxy type configuration. |
| `launchType` | string ("manually" | "repeatedly" | "once" | "after agent") | No | Launch type for the agent. |
| `agentObject` | string | No | Sets the agent's object as a JSON string. |
| `environment` | string ("staging" | "release") | No | Script branch environment. |
| `launchOnceAt` | integer | No | Must be set when launchType is 'once'. Unix timestamp (epoch ms) for single launch. |
| `proxyAddress` | string | No | HTTP proxy address (for proxyType='http') or proxy pool name (for proxyType='pool'). |
| `notifications` | object | No | Notification settings for the agent. |
| `proxyPassword` | string | No | Password for proxy authentication (used with proxyType='http'). |
| `proxyUsername` | string | No | Username for proxy authentication (used with proxyType='http'). |
| `idempotencyKey` | string | No | Optional key for idempotent operations - only for creating an agent. |
| `maxParallelism` | integer | No | Maximum number of concurrent executions of the agent. |
| `maxRetryNumber` | integer | No | Maximum number of retries the agent will attempt before aborting. |
| `executionTimeLimit` | number | No | Execution time limit in seconds. Agent will be stopped if this limit is exceeded. |
| `fileMgmtMaxFolders` | integer | No | Maximum number of folders for file management. |
| `launchAfterAgentId` | string | No | Must be set when launchType is 'after agent'. ID of the agent that triggers this agent. |
| `repeatedLaunchTimes` | object | No | Schedule configuration for repeated launches. |
| `repeatedLaunchPreset` | string ("Once every other day" | "Once per day" | "Once per day, at the start of the day" | "Twice per day" | "Thrice per day" | "4 times per day" | "6 times per day" | "8 times per day" | "Once every other hour" | "Once per hour" | "Twice per hour" | "Thrice per hour" | "4 times per hour" | "Once every other working hour" | "Once per working hour" | "Twice per working hour" | "Thrice per working hour" | "4 times per working hour" | "Once every other working hour, excluding weekends" | "Once per working hour, excluding weekends" | "Twice per working hour, excluding weekends" | "Thrice per working hour, excluding weekends" | "4 times per working hour, excluding weekends") | No | Preset launch schedules. |
| `squidLeaseIdentifier` | object | No | Squid lease configuration. |
| `masterAgentLaunchAfter` | number | No | Delay in seconds before launching after a slave agent finishes. Platform defaults to 10-15 minutes if not set. |
| `masterAgentLaunchOnExitCodes` | string | No | Launch if slave agent's exit code matches array values, or set to 'all' to launch on any exit code. |
| `applyScriptManifestDefaultSettings` | boolean | No | If true, applies the manifest's default settings to the agent. |
| `wasSetupValidWhenSubmittedByTheFrontend` | boolean | No | If true, the agent's setup is considered complete. |
| `shouldPropagateUpdatedSettingsToWorkersRegardlessOfSessionType` | boolean | No | If true, propagates updated settings to workers regardless of session type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Agent Groups

**Slug:** `PHANTOMBUSTER_SAVE_AGENT_GROUPS`

Tool to update agent groups and order for the current user's organization. Use when you need to reorganize agents into groups or change their display order.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `agentGroups` | array | Yes | New agent groups. Can be a list of agent IDs (strings) or AgentGroup objects with id, name, and agents. Order of the groups and agents will be preserved. |
| `X-Phantombuster-Org` | string | No | ID of the org performing the operation (not necessary when using a third party key) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Company Object

**Slug:** `PHANTOMBUSTER_SAVE_COMPANY_OBJECT`

Tool to save one company object to the organization storage. Use when you need to create or update a company object with LinkedIn company data and custom properties.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | The internal id of the company object. If provided, updates the existing object. |
| `slug` | string | Yes | The slug of the company object. |
| `type` | string | Yes | The type of company object. |
| `orgId` | string | No | The org id associated with the company object. |
| `properties` | object | Yes | The properties of the object. Can contain any additional company data. |
| `linkedinCompanyId` | string | Yes | The external id of the company scraped from LinkedIn. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Many Company Objects

**Slug:** `PHANTOMBUSTER_SAVE_COMPANY_OBJECTS_MANY`

Tool to save many company objects to organization storage. Use when you need to bulk insert or update company data with a minimum of 1 and maximum of 20 objects per request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `companies` | array | Yes | List of company objects to save. Minimum 1, maximum 20 objects. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Identity Event

**Slug:** `PHANTOMBUSTER_SAVE_IDENTITY_EVENT`

Tool to save an identity event to Phantombuster. Use when you need to record user interactions or activities associated with specific social media profiles.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `timestamp` | integer | No | Optional timestamp of the identity event in milliseconds since epoch. Must be between 1000000000000 and 9999999999999. |
| `event_data` | object | Yes | Event data of the identity event containing additional information about the event. |
| `event_type` | string | Yes | Type of the identity event (e.g., profile_view, connection_request). |
| `profile_id` | string | Yes | Profile ID of the identity event. |
| `identity_type` | string | Yes | Identity type of the identity event (e.g., linkedin, twitter, facebook). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Lead

**Slug:** `PHANTOMBUSTER_SAVE_LEAD`

Tool to save or update a lead in Phantombuster org storage. Use when you need to store LinkedIn profile data or other lead information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `error` | string | No | Error message if there was an issue processing the lead. |
| `civility` | string | No | Civility or title of the lead (e.g., Mr., Ms., Dr.). |
| `lastName` | string | No | Last name of the lead. |
| `location` | string | No | Geographic location of the lead. |
| `metadata` | object | No | Additional metadata for the lead. |
| `websites` | array | No | List of websites associated with the lead. |
| `firstName` | string | No | First name of the lead. |
| `companyName` | string | No | Current company name of the lead. |
| `phoneNumbers` | array | No | List of phone numbers of the lead. |
| `companyWebsite` | string | No | Website of the lead's current company. |
| `personalEmails` | array | No | List of personal email addresses of the lead. |
| `audienceOfLeads` | array | No | Audience segments this lead belongs to. |
| `companyIndustry` | string | No | Industry of the lead's current company. |
| `linkedinHeadline` | string | No | LinkedIn headline of the lead. |
| `linkedinJobTitle` | string | No | Current job title of the lead on LinkedIn. |
| `linkedinCompanyId` | string | No | LinkedIn company ID of the lead's current company. |
| `linkedinProfileId` | string | No | LinkedIn profile ID of the lead. |
| `twitterProfileUrl` | string | No | Twitter profile URL of the lead. |
| `linkedinCompanyUrl` | string | No | LinkedIn company URL. |
| `linkedinProfileUrl` | string | Yes | LinkedIn profile URL of the lead (required). This is the unique identifier for the lead. |
| `linkedinProfileUrn` | string | No | URN of the lead's LinkedIn profile. |
| `linkedinSchoolName` | string | No | Name of the lead's school on LinkedIn. |
| `professionalEmails` | array | No | List of professional email addresses of the lead. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |
| `linkedinCompanySlug` | string | No | LinkedIn company slug. |
| `linkedinDescription` | string | No | LinkedIn description or summary of the lead. |
| `linkedinJobLocation` | string | No | Location of the lead's current job on LinkedIn. |
| `linkedinOpenProfile` | boolean | No | Whether the lead has an open LinkedIn profile. |
| `linkedinSkillsLabel` | string | No | Skills label from the lead's LinkedIn profile. |
| `previousCompanyName` | string | No | Name of the lead's previous company. |
| `linkedinJobDateRange` | string | No | Date range of the lead's current job on LinkedIn. |
| `linkedinSchoolDegree` | string | No | Degree obtained at the lead's school on LinkedIn. |
| `aiGeneratedProperties` | object | No | AI-generated properties for the lead. |
| `customResultsFileName` | string | No | Custom results file name for the lead. |
| `linkedinIsHiringBadge` | boolean | No | Whether the lead has a hiring badge on LinkedIn. |
| `linkedinFollowersCount` | number | No | Number of LinkedIn followers the lead has. |
| `linkedinJobDescription` | string | No | Description of the lead's current job on LinkedIn. |
| `linkedinProfileImageUrl` | string | No | URL of the lead's LinkedIn profile image. |
| `linkedinProfileImageUrn` | string | No | URN of the lead's LinkedIn profile image. |
| `linkedinSchoolDateRange` | string | No | Date range of the lead's school attendance on LinkedIn. |
| `linkedinPreviousJobTitle` | string | No | Previous job title of the lead on LinkedIn. |
| `linkedinSchoolCompanyUrl` | string | No | LinkedIn URL of the lead's school. |
| `salesNavigatorProfileUrl` | string | No | Sales Navigator profile URL of the lead. |
| `linkedinIsOpenToWorkBadge` | boolean | No | Whether the lead has an open to work badge on LinkedIn. |
| `linkedinSchoolDescription` | string | No | Description of the lead's school on LinkedIn. |
| `linkedinPreviousCompanyUrl` | string | No | LinkedIn URL of the lead's previous company. |
| `linkedinPreviousSchoolName` | string | No | Name of the lead's previous school on LinkedIn. |
| `linkedinPreviousJobLocation` | string | No | Location of the lead's previous job on LinkedIn. |
| `crmAccountRelativeProperties` | array | No | CRM account relative properties for the lead. |
| `linkedinPreviousJobDateRange` | string | No | Date range of the lead's previous job on LinkedIn. |
| `linkedinPreviousSchoolDegree` | string | No | Degree obtained at the lead's previous school on LinkedIn. |
| `linkedinPreviousJobDescription` | string | No | Description of the lead's previous job on LinkedIn. |
| `linkedinPreviousSchoolDateRange` | string | No | Date range of the lead's previous school attendance on LinkedIn. |
| `linkedinPreviousSchoolCompanyUrl` | string | No | LinkedIn URL of the lead's previous school. |
| `linkedinAccountRelativeProperties` | array | No | LinkedIn account relative properties for the lead. |
| `linkedinPreviousSchoolDescription` | string | No | Description of the lead's previous school on LinkedIn. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Lead Object

**Slug:** `PHANTOMBUSTER_SAVE_LEAD_OBJECT`

Tool to save a lead object to organization storage. Use when you need to store or update lead information with custom properties.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes | Slug of the object to save. Must be 470 characters or less. |
| `type` | string | Yes | Type of object to save. |
| `leadId` | string | No | ID of a lead to associate with this object. |
| `agentId` | string | Yes | ID of the agent associated with this lead object. |
| `leadUrn` | string | No | URN of a lead to associate with this object. |
| `leadSlug` | string | No | Slug of a lead to associate with this object. |
| `properties` | object | Yes | Properties of the object. Can contain any key-value pairs. |
| `leadObjectId` | string | No | ID of a lead object to update. If provided, updates existing object instead of creating new one. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Many Lead Objects

**Slug:** `PHANTOMBUSTER_SAVE_LEADS_OBJECTS_MANY`

Tool to save multiple lead objects to Phantombuster's organization storage. Use when you need to create or update multiple lead objects in a single API call.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `leadsObjects` | array | Yes | Array of lead objects to save. Each object must include type, slug, properties, and agentId. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save List

**Slug:** `PHANTOMBUSTER_SAVE_LIST`

Tool to save (create or update) a list with filter criteria. Use when you need to create a new list or update an existing one by providing a filter configuration. This is a Beta feature.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | A string for updating existing lists (omit when creating new ones). |
| `name` | string | Yes | A string specifying the list's title. |
| `tags` | array | No | An array of strings for organizational categorization. Allowed values: 'hidden', 'workflow', 'pbai', 'opinion-leaders' |
| `filter` | object | Yes | An object that configures which leads are included in the list. Supports global search using '__global_search__' key, simple field filters, logical AND/OR operators, and complex nested filters. Example: {'__global_search__': 'test'} or {'email': 'user@example.com'} |
| `description` | string | No | A string describing the list's purpose. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Save Script

**Slug:** `PHANTOMBUSTER_SAVE_SCRIPT`

Tool to create a new script or update an existing one. Provide an id to update; otherwise creates new script. Use when you need to save JavaScript automation code to Phantombuster.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | No | If provided, the script with this ID will be updated. Otherwise, a new script is created. |
| `code` | string | No | JavaScript source code of the script (max 600,000 chars). |
| `name` | string | Yes | Name of the script file. Must end with .js or .coffee. Prepend with 'lib-' to define as a module. |
| `branch` | string | No | Name of the branch to associate with the script (alphanumeric, hyphens, 1-50 chars). |
| `manifest` | object | No | JSON script manifest required to create/update a script. |
| `markdown` | string | No | Markdown description of the script (max 200,000 chars). |
| `X-Phantombuster-Org` | string | No | ID of the organization performing the operation (not needed when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Company Objects

**Slug:** `PHANTOMBUSTER_SEARCH_COMPANY_OBJECTS`

Tool to search company objects in Phantombuster's organizational storage. Use when you need to find companies by specific criteria or perform a global search.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `or` | array | No | Array of filter conditions joined by OR logic. Each condition is an object with field names as keys and string values. |
| `and` | array | No | Array of filter conditions joined by AND logic. Each condition is an object with field names as keys and string values. |
| `filter` | object | No | Nested filter object for more complex filtering logic with field names as keys and string values. |
| `__global_search__` | string | No | Global search string to search across all fields of company objects. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Lead Objects

**Slug:** `PHANTOMBUSTER_SEARCH_LEAD_OBJECTS`

Tool to search lead objects in Phantombuster org storage. Use when you need to find leads based on search criteria or filter conditions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `filter` | object | Yes | Filter criteria for searching leads. Use '__global_search__' for simple text searches across all fields. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stop Agent

**Slug:** `PHANTOMBUSTER_STOP_AGENT`

Tool to stop a running agent. Use when you need to halt agent execution, optionally cascading to slave agents or switching to manual launch mode.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Id of the agent to stop. |
| `softAbort` | boolean | No | If true, tries to softly abort the agent. |
| `dontLaunchSoon` | boolean | No | If true, disables the next scheduled 'launch soon' of the agent. |
| `cascadeToAllSlaves` | boolean | No | If true, slave agents will recursively be stopped (even nested slaves). |
| `switchToManualLaunch` | boolean | No | If true, the agent will switch to manual launch. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Script (v1 API)

**Slug:** `PHANTOMBUSTER_UPDATE_SCRIPT`

Tool to update an existing script or create a new one if it does not exist (Legacy v1 API). Use when you need to save script code to Phantombuster. If insertOnly is true, the operation will fail if a script with the same name already exists.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the script to update or create, with its extension (.js or .coffee). |
| `text` | string | Yes | Full text contents of the script. |
| `insertOnly` | boolean | No | If true, make sure that we don't update an existing script. An error will be returned if a script with the same name already exists. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Script Access List

**Slug:** `PHANTOMBUSTER_UPDATE_SCRIPTS_ACCESS_LIST`

Tool to update the access list of a script. Use when you need to add or remove users/orgs from a script's access list in a specific branch.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `add` | string | No | Org or user to add in the access list. |
| `name` | string | Yes | Name of the script to update the access list of. |
| `branch` | string | Yes | Name of the branch to update the access list of. |
| `remove` | string | No | Org or user to remove from the access list. |
| `X-Phantombuster-Org` | string | No | ID of the org that is performing the operation (not necessary when using a third party key). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
