Skip to main content
E2B logo
  • Category: developer tools
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 28
  • Triggers: 0
  • Slug: E2B
  • Version: 20261101_00

Tools

Slug: E2B_CONNECT_SANDBOXTool to connect to an existing E2B sandbox and retrieve its details. Use when you need to reconnect to a sandbox from different environments or resume a paused sandbox. The TTL is extended upon connection.

Input Parameters

integer
Timeout in seconds for the sandbox connection. Maximum 86400 seconds (24 hours) for Pro users, 3600 seconds (1 hour) for Hobby users. Default is 300 seconds (5 minutes).
string
required
The unique identifier of the sandbox to connect to.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_CREATE_TEMPLATETool to create a new E2B template with specified configuration. Use when you need to define a new sandbox template that can be used to spawn sandbox environments.

Input Parameters

string
required
Unique identifier for the template. This is a human-readable name used to reference the template.
integer
Number of CPU cores to allocate to sandboxes using this template.
integer
Amount of memory in megabytes to allocate to sandboxes using this template.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_CREATE_WEBHOOKTool to register a new webhook to receive sandbox lifecycle events for the team. Use when you need to set up notifications for sandbox lifecycle events such as creation, updates, or termination.

Input Parameters

string
required
HTTPS endpoint where webhook events will be delivered. Must be a valid HTTPS URL.
string
required
Human-readable identifier for the webhook.
array
required
List of event types to subscribe to. Valid values: ‘sandbox.lifecycle.created’, ‘sandbox.lifecycle.updated’, ‘sandbox.lifecycle.killed’, ‘sandbox.lifecycle.paused’, ‘sandbox.lifecycle.resumed’.
boolean
required
Whether the webhook actively receives events.
string
required
Secret key used to verify webhook authenticity via HMAC signatures.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_DELETE_SANDBOXESTool to terminate and permanently delete a running E2B sandbox instance. Use when you need to kill a sandbox that is no longer needed. Once terminated, the sandbox cannot be resumed.

Input Parameters

string
required
The unique identifier of the sandbox to terminate.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_DELETE_TEMPLATEPermanently delete an E2B template that is no longer needed. The template cannot be deleted while running or paused sandboxes use it.

Input Parameters

string
required
The unique identifier of the template to permanently delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_DELETE_WEBHOOKTool to unregister a webhook and stop receiving lifecycle events. Use when you need to remove a webhook that is no longer needed or to clean up webhook registrations.

Input Parameters

string
required
The unique identifier of the webhook to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_HEALTHTool to check the health status of the E2B API. Use when you need to verify that the API service is operational and accessible.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_SANDBOXTool to retrieve detailed information about a specific sandbox by its ID. Use when you need to check sandbox status, metadata, or configuration details.

Input Parameters

string
required
The unique identifier of the sandbox to retrieve.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_SANDBOXES_LOGSTool to retrieve logs from a specific E2B sandbox instance. Use when you need to debug or monitor sandbox execution by viewing its console output and system logs.

Input Parameters

integer
Maximum number of log entries to return. Default is determined by the API.
integer
Index of the first log entry to return (0-based offset). Use for pagination.
string
required
The unique identifier of the sandbox to retrieve logs for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_SANDBOX_LIFECYCLE_EVENTSRetrieve lifecycle events for a specific sandbox, with pagination and sort options. The response accepts creation, update, and termination event types; other event types fail response validation.

Input Parameters

integer
Number of events to return. Default is 10, minimum is 1, maximum is 100.
integer
Number of events to skip from the beginning. Default is 0.
boolean
Sort direction—true for ascending chronological order, false for descending (default: false).
string
required
The unique identifier of the sandbox to retrieve events for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_SANDBOX_METRICSTool to retrieve timestamped CPU, memory, and disk usage metrics for a sandbox. Use when you need to monitor resource usage of a running sandbox. Metrics are collected every 5 seconds; returns empty array if no metrics available yet.

Input Parameters

integer
End timestamp for metrics filtering (Unix timestamp in seconds).
integer
Start timestamp for metrics filtering (Unix timestamp in seconds).
string
required
The unique identifier of the sandbox to retrieve metrics for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_TEAMS_METRICSRetrieve timestamped team metrics, including concurrent sandbox counts and sandbox start rates, with optional time bounds.

Input Parameters

integer
End timestamp for metrics filtering (Unix timestamp in seconds).
integer
Start timestamp for metrics filtering (Unix timestamp in seconds).
string
required
The unique identifier of the team to retrieve metrics for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_TEAMS_METRICS_MAXTool to retrieve the maximum value for a specific team metric in a given interval. Use when you need to check team limits or peak usage, such as maximum concurrent sandboxes allowed or highest resource usage.

Input Parameters

integer
End timestamp for metrics filtering as Unix timestamp (seconds since epoch). If provided, returns maximum in the specified interval.
integer
Start timestamp for metrics filtering as Unix timestamp (seconds since epoch). If provided, returns maximum in the specified interval.
string
required
The metric type to retrieve the maximum value for. Allowed values are ‘concurrent_sandboxes’ for maximum concurrent sandbox limit or ‘sandbox_start_rate’ for sandbox start rate.
string
required
The unique identifier of the team to retrieve maximum metrics for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_TEMPLATES_BUILD_STATUSTool to get the status of a template build. Use when you need to check the build status of a template that was started asynchronously. Useful in polling loops to monitor template builds in progress.

Input Parameters

string
required
The unique identifier of the specific build.
integer
Offset for fetching logs from a specific point. Used to retrieve logs incrementally without re-fetching previous entries. Defaults to 0.
string
required
The unique identifier of the template.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_TEMPLATES_FILESTool to get an upload link for a tar file containing build layer files. Use when you need to retrieve or download template build layer files by their hash.

Input Parameters

string
required
The hash of the build layer files to retrieve.
string
required
The unique identifier of the template.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_GET_WEBHOOKTool to retrieve the current webhook configuration for a specific webhook. Use when you need to inspect webhook settings, verify configuration, or check webhook status.

Input Parameters

string
required
The unique identifier of the webhook to retrieve.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_LIST_SANDBOXESList team sandboxes with state and metadata filters, a page size, and an optional pagination token. The response contains sandbox information but does not expose a next-page token.

Input Parameters

integer
Number of items per page. Must be between 1 and 100. Default is 100.
array
Filter by sandbox state. Accepts ‘running’ and/or ‘paused’. Multiple states are combined with AND logic.
object
Key-value pairs to filter sandboxes by metadata set during creation. Multiple filters are combined with AND logic.
string
Base64-encoded pagination token for fetching the next page of results.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_LIST_SANDBOXES_METRICSRetrieve timestamped CPU, memory, and disk usage metrics for multiple sandboxes, keyed by sandbox ID. Metrics are collected every 5 seconds; the metrics mapping may be empty when no metrics are available yet.

Input Parameters

string
End timestamp for metrics filtering (ISO 8601 format).
string
Start timestamp for metrics filtering (ISO 8601 format).
array
required
List of sandbox IDs to retrieve metrics for. Provide one or more sandbox identifiers.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_LIST_TEAM_SANDBOX_LIFECYCLE_EVENTSTool to retrieve the latest lifecycle events across all sandboxes associated with the team. Use when you need to monitor sandbox activity, track lifecycle changes, or audit sandbox operations.

Input Parameters

integer
Number of events to return. Must be between 1 and 100. Default is 10.
integer
Number of events to skip for pagination. Must be non-negative. Default is 0.
boolean
Sort order for events. True for ascending (oldest first), false for descending (newest first). Default is false.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_LIST_TEMPLATESTool to list all available E2B templates for your team. Use when you need to view available templates, retrieve template identifiers, or audit template configurations.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_LIST_WEBHOOKSTool to retrieve all registered webhooks for your team. Use when you need to view all webhook configurations, audit webhook settings, or manage multiple webhooks.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_PAUSE_SANDBOXTool to pause a running E2B sandbox preserving its filesystem and memory state. Use when you need to temporarily suspend a sandbox while maintaining its state for later resumption. Takes approximately 4 seconds per 1 GiB of RAM to pause. Paused sandboxes can be stored for up to 30 days.

Input Parameters

string
required
The unique identifier of the sandbox to pause.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_POST_SANDBOXESTool to create a new E2B sandbox from a template. Use when you need to launch a fresh sandbox environment for code execution, testing, or development purposes.

Input Parameters

object
Custom environment variables for the sandbox as key-value pairs. These will be available inside the sandbox environment.
integer
Timeout value in seconds for the sandbox session. Maximum is 86400 (24 hours) for Pro plan, 3600 (1 hour) for Hobby plan. Default is 300 seconds if not specified.
object
Custom metadata key-value pairs for the sandbox. Use for tracking purpose, owner, or any other custom attributes.
boolean
Enable automatic pausing of the sandbox when inactive to save resources.
string
required
The ID of the template to use for creating the sandbox. This identifies which preconfigured environment to launch.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_POST_SANDBOXES_TIMEOUTTool to set the timeout for an E2B sandbox. Use when you need to extend or reduce the sandbox lifetime. The timeout is measured from the current time, and calling this multiple times overwrites the previous TTL.

Input Parameters

integer
required
Timeout duration in seconds from the time of this request. Minimum is 1 second. Maximum is 86400 seconds (24 hours) for Pro users, 3600 seconds (1 hour) for Hobby users. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point.
string
required
The unique identifier of the sandbox to update the timeout for.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_REFRESH_SANDBOXTool to refresh an E2B sandbox and extend its time to live. Use when you need to keep a sandbox alive longer and prevent it from timing out.

Input Parameters

string
required
The unique identifier of the sandbox to refresh and extend its TTL.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_START_TEMPLATE_BUILDStart a build for an E2B template with specific configuration. The tool returns a success flag and message for a successful build-start response.

Input Parameters

boolean
Whether the whole build should be forced to run regardless of the cache.
array
List of steps to execute in the template build. Each step defines an operation to perform during the build process.
string
required
Identifier of the build to start.
string
Ready check command to execute in the template after the build to verify readiness.
string
Command to execute in the template after the build completes.
string
Base image to use for the template build. Specify either fromImage or fromTemplate, not both.
string
required
Identifier of the template to build.
string
Base template to use for the template build. Specify either fromImage or fromTemplate, not both.
object
Registry authentication configuration for pulling base images.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_UPDATE_TEMPLATEUpdate an E2B template’s public or private visibility by template ID. Public templates can be used by anyone, while private templates are restricted to the team.

Input Parameters

boolean
Whether the template should be publicly accessible. If true, the template can be used by anyone; if false, it remains private to the team.
string
required
The unique identifier of the template to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: E2B_UPDATE_WEBHOOKTool to update an existing webhook configuration including URL, enabled status, and subscribed events. Use when you need to modify webhook settings, change the destination URL, enable/disable a webhook, or update event subscriptions.

Input Parameters

string
The webhook endpoint URL to receive event notifications. If provided, replaces the previous URL.
array
List of event types to subscribe to. Available events: ‘sandbox.lifecycle.created’ (sandbox creation), ‘sandbox.lifecycle.killed’ (sandbox termination), ‘sandbox.lifecycle.updated’ (sandbox configuration updates), ‘sandbox.lifecycle.paused’ (sandbox pausing), ‘sandbox.lifecycle.resumed’ (sandbox resuming).
boolean
Whether the webhook is active. If true, webhook will send notifications; if false, webhook is disabled.
string
required
The unique identifier of the webhook to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not