E2B Events API
The events API from E2B — 2 operation(s) for events.
Operations 2
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
The events API from E2B — 2 operation(s) for events.
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/e2b-dev:e2b-dev-events-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: E2B Events API
version: 0.1.0
description: Complete E2B developer API. Platform endpoints are served on api.e2b.app. Sandbox endpoints (envd) are served on the shared sandbox host (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and E2b-Sandbox-Port headers.
servers:
- url: https://api.e2b.app
description: E2B Platform API
security: []
tags:
- name: Events
paths:
/events/sandboxes/{sandboxID}:
servers:
- url: https://api.e2b.app
description: E2B Platform API
get:
description: Get sandbox events
tags:
- Events
security:
- ApiKeyAuth: []
parameters:
- $ref: '#/components/parameters/sandboxID'
- name: offset
in: query
required: false
schema:
type: integer
format: int32
minimum: 0
default: 0
- name: limit
in: query
required: false
schema:
type: integer
format: int32
minimum: 1
maximum: 100
default: 10
- name: orderAsc
in: query
required: false
schema:
type: boolean
default: false
- name: types
in: query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
description: Filter events to the provided event types
responses:
'200':
description: Successfully returned the sandbox events
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SandboxEvent'
'400':
description: Bad request
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 400
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
invalidLimit:
summary: The limit query parameter is below 1
value:
code: 400
message: 'validation error: error in openapi3filter.RequestError: parameter "limit" in query has an error: number must be at least 1'
'401':
description: Authentication error
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 401
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
missingAuthentication:
summary: No supported authentication header was supplied
value:
code: 401
message: authorization header is missing
'403':
description: Forbidden
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 403
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
teamBanned:
summary: The team is banned at authentication
value:
code: 403
message: team is banned
'404':
description: Not found
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 404
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
resourceNotFound:
summary: The backend cannot find the requested resource
value:
code: 404
message: Sandbox events not found
'500':
description: Server error
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 500
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendError:
summary: The backend failed
value:
code: 500
message: Error when querying sandbox events
'503':
description: Service unavailable
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 503
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendUnavailable:
summary: The backend is not configured
value:
code: 503
message: Sandbox events are not available
'504':
description: Backend timeout
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 504
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendDeadlineExceeded:
summary: The backend deadline was exceeded
value:
code: 504
message: Error when querying sandbox events
operationId: getEventsSandbox
summary: List sandbox events
/events/sandboxes:
servers:
- url: https://api.e2b.app
description: E2B Platform API
get:
description: Get all sandbox events for the team associated with the API key
tags:
- Events
security:
- ApiKeyAuth: []
parameters:
- name: offset
in: query
required: false
schema:
type: integer
format: int32
minimum: 0
default: 0
- name: limit
in: query
required: false
schema:
type: integer
format: int32
minimum: 1
maximum: 100
default: 10
- name: orderAsc
in: query
required: false
schema:
type: boolean
default: false
- name: types
in: query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
description: Filter events to the provided event types
responses:
'200':
description: Successfully returned the sandbox events
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SandboxEvent'
'400':
description: Bad request
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 400
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
invalidEventType:
summary: An unrecognized event type was supplied
value:
code: 400
message: 'Invalid event type: bogus.event'
'401':
description: Authentication error
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 401
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
missingAuthentication:
summary: No supported authentication header was supplied
value:
code: 401
message: authorization header is missing
'403':
description: Forbidden
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 403
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
teamBanned:
summary: The team is banned at authentication
value:
code: 403
message: team is banned
'404':
description: Not found
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 404
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
resourceNotFound:
summary: The backend cannot find the requested resource
value:
code: 404
message: Sandbox events not found
'500':
description: Server error
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 500
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendError:
summary: The backend failed
value:
code: 500
message: Error when querying sandbox events
'503':
description: Service unavailable
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 503
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendUnavailable:
summary: The backend is not configured
value:
code: 503
message: Sandbox events are not available
'504':
description: Backend timeout
content:
application/json:
schema:
required:
- code
- message
properties:
code:
type: integer
format: int32
description: Error code
example: 504
error_code:
type: string
description: 'Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown.'
message:
type: string
description: Error
type: object
examples:
backendDeadlineExceeded:
summary: The backend deadline was exceeded
value:
code: 504
message: Error when querying sandbox events
operationId: listEventsSandboxes
summary: List events
components:
schemas:
SandboxEvent:
description: Sandbox event
required:
- id
- version
- type
- timestamp
- sandboxId
- sandboxExecutionId
- sandboxTemplateId
- sandboxBuildId
- sandboxTeamId
properties:
id:
type: string
format: uuid
description: Event unique identifier
version:
type: string
description: Event structure version
type:
type: string
description: Event name
eventCategory:
type: string
deprecated: true
description: Category of the event (e.g., 'lifecycle', 'process', etc.)
eventLabel:
type: string
deprecated: true
description: Label for the specific event type (e.g., 'sandbox_started', 'process_oom', etc.)
eventData:
type:
- object
- 'null'
description: Optional JSON data associated with the event
timestamp:
type: string
format: date-time
description: Timestamp of the event
sandboxId:
type: string
format: string
description: Unique identifier for the sandbox
sandboxExecutionId:
type: string
format: string
description: Unique identifier for the sandbox execution
sandboxTemplateId:
type: string
format: string
description: Unique identifier for the sandbox template
sandboxBuildId:
type: string
format: string
description: Unique identifier for the sandbox build
sandboxTeamId:
type: string
format: uuid
description: Team identifier associated with the sandbox
type: object
parameters:
sandboxID:
name: sandboxID
in: path
required: true
schema:
type: string
securitySchemes:
AccessTokenAuth:
type: http
scheme: bearer
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
SandboxAccessTokenAuth:
type: apiKey
in: header
name: X-Access-Token
description: 'Sandbox access token (`envdAccessToken`) for authenticating requests to a running sandbox. Returned by: [POST /sandboxes](/api-reference/sandboxes/create-sandbox) (on create), [POST /sandboxes/{sandboxID}/connect](/api-reference/sandboxes/connect-to-sandbox) (on connect), [POST /sandboxes/{sandboxID}/resume](/api-reference/sandboxes/resume-sandbox) (on resume), and [GET /sandboxes/{sandboxID}](/api-reference/sandboxes/get-sandbox) (for running or paused sandboxes).'
SandboxUserAuth:
type: http
scheme: basic
description: Optional system user for the operation. Sets file ownership and resolves relative paths. Pass the desired username with no password. Defaults to the sandbox's default user when omitted.
x-provenance:
method: harvested
publisher: E2B
source: https://e2b.dev/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)