{"openapi":"3.1.0","info":{"title":"E2B 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"}],"paths":{"/sandboxes":{"get":{"summary":"List sandboxes","x-api-group":"list","description":"List all running sandboxes. Use GET /v2/sandboxes instead.","deprecated":true,"tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"metadata","in":"query","description":"Metadata query used to filter the sandboxes (e.g. \"user=abc&app=prod\"). Each key and values must be URL encoded.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully returned all running sandboxes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ListedSandbox"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidMetadata":{"summary":"The metadata filter contains the invalid URL escape %zz","value":{"code":400,"message":"Error parsing metadata: error parsing metadata: error when unescaping query: invalid URL escape \"%zz\""}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxListFailed":{"summary":"The API cannot retrieve running sandboxes","value":{"code":500,"message":"Error when getting sandboxes"}}}}}}},"operationId":"listSandboxes"},"post":{"summary":"Create sandbox","description":"Create a sandbox from the template. Use POST /v2/sandboxes instead.","deprecated":true,"tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSandbox"}}}},"responses":{"201":{"description":"The sandbox was created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidAutoPausePolicy":{"summary":"Filesystem-only auto-pause was requested without enabling auto-pause","value":{"code":400,"message":"autoPauseMemory=false only applies when autoPause is true."}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"egressProxyDisabled":{"summary":"Egress proxy configuration was supplied without feature access","value":{"code":403,"message":"Egress proxy (network.egressProxy) is not enabled for this team."}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeConversionFailed":{"summary":"Resolving requested volume mounts fails","value":{"code":500,"message":"failed to convert volume mounts"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"capacityUnavailable":{"summary":"No node has capacity for the requested sandbox","value":{"code":503,"message":"Failed to place sandbox: not enough capacity for the requested resources right now, please retry shortly","error_code":"sandbox_capacity_unavailable"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"placementTimeout":{"summary":"Placement times out before its first attempt","value":{"code":504,"message":"Failed to place sandbox: placement timed out, please retry","error_code":"sandbox_placement_timeout"}}}}}}},"operationId":"postSandboxes"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/sandboxes":{"post":{"summary":"Create sandbox (v2)","description":"Create a sandbox from the template. All system communication with the sandbox is secured.","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSandboxV2"}}}},"responses":{"201":{"description":"The sandbox was created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidAutoPausePolicy":{"summary":"Filesystem-only auto-pause was requested without enabling auto-pause","value":{"code":400,"message":"autoPauseMemory=false only applies when autoPause is true."}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"egressProxyDisabled":{"summary":"Egress proxy configuration was supplied without feature access","value":{"code":403,"message":"Egress proxy (network.egressProxy) is not enabled for this team."}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeConversionFailed":{"summary":"Resolving requested volume mounts fails","value":{"code":500,"message":"failed to convert volume mounts"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"capacityUnavailable":{"summary":"No node has capacity for the requested sandbox","value":{"code":503,"message":"Failed to place sandbox: not enough capacity for the requested resources right now, please retry shortly","error_code":"sandbox_capacity_unavailable"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"placementTimeout":{"summary":"Placement times out before its first attempt","value":{"code":504,"message":"Failed to place sandbox: placement timed out, please retry","error_code":"sandbox_placement_timeout"}}}}}}},"operationId":"postSandboxesV2"},"get":{"summary":"List sandboxes (v2)","x-api-group":"list","description":"List all sandboxes","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"metadata","in":"query","description":"Metadata query used to filter the sandboxes (e.g. \"user=abc&app=prod\"). Each key and values must be URL encoded.","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","description":"Filter sandboxes by one or more states","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/SandboxState"}},"style":"form","explode":false},{"name":"order","in":"query","description":"Sort direction by sandbox start time. Defaults to desc (newest first).","required":false,"schema":{"$ref":"#/components/schemas/OrderDirection"}},{"name":"startedAfter","in":"query","description":"Return sandboxes started at or after this timestamp.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"template","in":"query","description":"Filter sandboxes by a template ID or alias.","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/paginationNextToken"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successfully returned all running sandboxes","headers":{"X-Next-Token":{"$ref":"#/components/headers/XNextToken"},"X-Total-Running":{"$ref":"#/components/headers/XTotalRunning"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ListedSandbox"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidNextToken":{"summary":"The pagination token cannot be decoded","value":{"code":400,"message":"Invalid next token"}},"invalidMetadata":{"summary":"The metadata filter cannot be parsed","value":{"code":400,"message":"Error parsing metadata"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxListFailed":{"summary":"The API cannot retrieve running sandboxes","value":{"code":500,"message":"Error when getting sandboxes"}},"pausedSandboxListFailed":{"summary":"The API cannot retrieve paused sandboxes","value":{"code":500,"message":"Error getting paused sandboxes"}}}}}}},"operationId":"listSandboxesV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/metrics":{"get":{"summary":"List sandbox metrics","x-api-group":"list","description":"List metrics for given sandboxes","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"sandbox_ids","in":"query","required":true,"description":"Comma-separated list of sandbox IDs to get metrics for","explode":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":100,"uniqueItems":true}}],"responses":{"200":{"description":"Successfully returned all running sandboxes with metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxesWithMetrics"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"tooManySandboxes":{"summary":"The request contains more than 100 sandbox IDs","value":{"code":400,"message":"Too many sandboxes requested, maximum is 100"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The team's metrics cluster cannot be resolved","value":{"code":500,"message":"cluster not found for sandbox metrics"}}}}}}},"operationId":"listSandboxesMetrics"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/logs":{"get":{"summary":"Get sandbox logs","description":"Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.","deprecated":true,"tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"},{"in":"query","name":"start","schema":{"type":"integer","format":"int64","minimum":0},"description":"Starting timestamp of the logs that should be returned in milliseconds"},{"in":"query","name":"limit","schema":{"default":1000,"format":"int32","minimum":0,"type":"integer"},"description":"Maximum number of logs that should be returned"}],"responses":{"200":{"description":"Successfully returned the sandbox logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxLogs"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The sandbox's logs cluster cannot be resolved","value":{"code":500,"message":"Failed to get cluster"}}}}}}},"operationId":"getSandboxLogs"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/sandboxes/{sandboxID}/logs":{"get":{"summary":"Get sandbox logs (v2)","description":"Get sandbox logs","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"},{"in":"query","name":"cursor","schema":{"type":"integer","format":"int64","minimum":0},"description":"Starting timestamp of the logs that should be returned in milliseconds"},{"in":"query","name":"limit","schema":{"default":1000,"type":"integer","format":"int32","minimum":0,"maximum":1000},"description":"Maximum number of logs that should be returned"},{"in":"query","name":"direction","schema":{"$ref":"#/components/schemas/LogsDirection"},"description":"Direction of the logs that should be returned"},{"in":"query","name":"level","schema":{"$ref":"#/components/schemas/LogLevel"},"description":"Minimum log level to return. Logs below this level are excluded"},{"in":"query","name":"search","schema":{"type":"string","maxLength":256},"description":"Case-sensitive substring match on log message content"}],"responses":{"200":{"description":"Successfully returned the sandbox logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxLogsV2Response"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The sandbox's logs cluster cannot be resolved","value":{"code":500,"message":"Failed to get cluster"}}}}}}},"operationId":"getSandboxLogsV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}":{"get":{"summary":"Get sandbox","description":"Get a sandbox by id","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"responses":{"200":{"description":"Successfully returned the sandbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxDetail"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The sandbox snapshot lookup fails","value":{"code":500,"message":"Error getting sandbox"}}}}}}},"operationId":"getSandbox"},"delete":{"summary":"Delete sandbox","description":"Kill a sandbox","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"responses":{"204":{"description":"The sandbox was killed successfully"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The sandbox removal operation fails","value":{"code":500,"message":"Error killing sandbox: sandbox operation failed"}}}}}}},"operationId":"deleteSandbox"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/metrics":{"get":{"summary":"Get sandbox metrics","description":"Get sandbox metrics","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"},{"in":"query","name":"start","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the start of the interval, in seconds, for which the metrics are returned."},{"in":"query","name":"end","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the end of the interval, in seconds, for which the metrics are returned."}],"responses":{"200":{"description":"Successfully returned the sandbox metrics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SandboxMetric"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The team's metrics cluster cannot be resolved","value":{"code":500,"message":"cluster not found for sandbox metrics"}}}}}}},"operationId":"getSandboxMetrics"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/pause":{"post":{"summary":"Pause sandbox","description":"Pause the sandbox","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxPauseRequest"}}}},"responses":{"204":{"description":"The sandbox was paused successfully and can be resumed"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"stateConflict":{"summary":"The current sandbox state does not permit the operation","value":{"code":409,"message":"Sandbox 'sandboxid' cannot be paused while in 'pausing' state"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The pause operation fails","value":{"code":500,"message":"Error pausing sandbox"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"nodeBusy":{"summary":"The node cannot accept snapshot work","value":{"code":503,"message":"Sandbox 'sandboxid' cannot be paused right now because its node is busy, please retry"}}}}}}},"operationId":"postSandboxPause"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/resume":{"post":{"summary":"Resume sandbox","deprecated":true,"description":"Resume the sandbox","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumedSandbox"}}}},"responses":{"201":{"description":"The sandbox was resumed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"alreadyRunning":{"summary":"The sandbox is already running","value":{"code":409,"message":"Sandbox sandboxid is already running"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The saved snapshot lookup fails","value":{"code":500,"message":"Error when getting snapshot"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"capacityUnavailable":{"summary":"No node has capacity for the requested sandbox","value":{"code":503,"message":"Failed to place sandbox: not enough capacity for the requested resources right now, please retry shortly","error_code":"sandbox_capacity_unavailable"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"placementTimeout":{"summary":"Placement times out before its first attempt","value":{"code":504,"message":"Failed to place sandbox: placement timed out, please retry","error_code":"sandbox_placement_timeout"}}}}}}},"operationId":"postSandboxResume"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/fork":{"post":{"summary":"Fork sandbox","description":"Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxForkRequest"}}}},"responses":{"201":{"description":"The sandbox was snapshotted and the forks were attempted; each entry reports one fork's outcome","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SandboxForkResult"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"stateConflict":{"summary":"The current sandbox state does not permit the operation","value":{"code":409,"message":"Sandbox 'sandboxid' cannot be forked while in 'pausing' state"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The fork checkpoint fails","value":{"code":500,"message":"Error forking sandbox"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"nodeBusy":{"summary":"The node cannot accept snapshot work","value":{"code":503,"message":"Sandbox 'sandboxid' cannot be forked right now because its node is busy, please retry"}}}}}}},"operationId":"postSandboxFork"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/connect":{"post":{"summary":"Connect to sandbox","description":"Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. Use POST /v2/sandboxes/{sandboxID}/connect instead.","deprecated":true,"tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSandbox"}}}},"responses":{"200":{"description":"The sandbox was already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"201":{"description":"The sandbox was resumed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"stateConflict":{"summary":"The sandbox is changing state","value":{"code":409,"message":"Sandbox \"sandboxid\" is being killed"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The saved snapshot lookup fails","value":{"code":500,"message":"Error when getting snapshot"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"capacityUnavailable":{"summary":"No node has capacity for the requested sandbox","value":{"code":503,"message":"Failed to place sandbox: not enough capacity for the requested resources right now, please retry shortly","error_code":"sandbox_capacity_unavailable"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"placementTimeout":{"summary":"Placement times out before its first attempt","value":{"code":504,"message":"Failed to place sandbox: placement timed out, please retry","error_code":"sandbox_placement_timeout"}}}}}}},"operationId":"postSandboxConnect"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/sandboxes/{sandboxID}/connect":{"post":{"summary":"Connect sandbox (v2)","description":"Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSandboxV2"}}}},"responses":{"200":{"description":"The sandbox was already running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"201":{"description":"The sandbox was resumed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"stateConflict":{"summary":"The sandbox is changing state","value":{"code":409,"message":"Sandbox \"sandboxid\" is being killed"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The saved snapshot lookup fails","value":{"code":500,"message":"Error when getting snapshot"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"capacityUnavailable":{"summary":"No node has capacity for the requested sandbox","value":{"code":503,"message":"Failed to place sandbox: not enough capacity for the requested resources right now, please retry shortly","error_code":"sandbox_capacity_unavailable"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"placementTimeout":{"summary":"Placement times out before its first attempt","value":{"code":504,"message":"Failed to place sandbox: placement timed out, please retry","error_code":"sandbox_placement_timeout"}}}}}}},"operationId":"postSandboxConnectV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/timeout":{"post":{"summary":"Set sandbox timeout","description":"Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.","security":[{"ApiKeyAuth":[]}],"tags":["Sandboxes"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxTimeoutRequest"}}}},"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"responses":{"204":{"description":"Successfully set the sandbox timeout"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}},"maxInstanceLengthExceeded":{"summary":"The requested timeout exceeds the sandbox lifetime limit","value":{"code":400,"message":"Max instance length exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxChangingState":{"summary":"The sandbox is changing state","value":{"code":409,"message":"Sandbox \"sandboxid\" is being paused"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Updating the sandbox timeout fails","value":{"code":500,"message":"Error when setting sandbox timeout"}}}}}}},"operationId":"postSandboxTimeout"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/network":{"put":{"summary":"Update sandbox network","description":"Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.","security":[{"ApiKeyAuth":[]}],"tags":["Sandboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxNetworkUpdateConfig"}}}},"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"responses":{"204":{"description":"Successfully updated the sandbox network configuration"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"stateConflict":{"summary":"The sandbox is changing state","value":{"code":409,"message":"Sandbox \"sandboxid\" is being paused"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Looking up the sandbox for network-rule validation fails","value":{"code":500,"message":"Failed to get sandbox"}}}}}}},"operationId":"putSandboxNetwork"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/refreshes":{"post":{"summary":"Refresh sandbox","description":"Refresh the sandbox extending its time to live","security":[{"ApiKeyAuth":[]}],"tags":["Sandboxes"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRefreshRequest"}}}},"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"responses":{"204":{"description":"Successfully refreshed the sandbox"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}},"maxInstanceLengthExceeded":{"summary":"The requested timeout exceeds the sandbox lifetime limit","value":{"code":400,"message":"Max instance length exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxChangingState":{"summary":"The sandbox is changing state","value":{"code":409,"message":"Sandbox \"sandboxid\" is being paused"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Updating the sandbox lifetime fails","value":{"code":500,"message":"Error when setting sandbox timeout"}}}}}}},"operationId":"postSandboxRefreshes"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/sandboxes/{sandboxID}/snapshots":{"post":{"summary":"Create snapshot","description":"Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/sandboxID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxSnapshotRequest"}}}},"responses":{"201":{"description":"Snapshot created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotInfo"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSandboxId":{"summary":"The sandbox ID is malformed","value":{"code":400,"message":"Invalid sandbox ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"sandboxNotFound":{"summary":"No accessible sandbox or saved snapshot was found","value":{"code":404,"message":"Sandbox \"sandboxid\" doesn't exist or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"snapshotStateConflict":{"summary":"The current sandbox state does not allow a snapshot","value":{"code":409,"message":"Sandbox 'sandboxid' cannot be snapshotted while in 'pausing' state"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Creating the snapshot template fails","value":{"code":500,"message":"Error creating snapshot template"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"snapshotNodeBusy":{"summary":"The node cannot accept snapshot work","value":{"code":503,"message":"Sandbox 'sandboxid' cannot be snapshotted right now because its node is busy, please retry"}}}}}}},"operationId":"postSandboxSnapshots"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/snapshots":{"get":{"summary":"List snapshots","x-api-group":"list","description":"List all snapshots for the team","tags":["Sandboxes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"sandboxID","in":"query","required":false,"schema":{"type":"string","description":"Filter snapshots by source sandbox ID"}},{"name":"name","in":"query","description":"Filter snapshots by name or ID, optionally tag-qualified (e.g. \"my-snapshot\", \"my-team/my-snapshot\" or \"my-snapshot:v1\").","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/paginationLimit"},{"$ref":"#/components/parameters/paginationNextToken"}],"responses":{"200":{"description":"Successfully returned snapshots","headers":{"X-Next-Token":{"$ref":"#/components/headers/XNextToken"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotInfo"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidNextToken":{"summary":"The pagination token cannot be decoded","value":{"code":400,"message":"Invalid next token"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The snapshot query fails","value":{"code":500,"message":"Error listing snapshot templates"}}}}}}},"operationId":"listSnapshots"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v3/templates":{"post":{"summary":"Create template (v3)","description":"Create a new template","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuildRequestV3"}}}},"responses":{"202":{"description":"The build was requested successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRequestResponseV3"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"nameRequired":{"summary":"Neither name nor the deprecated alias was supplied","value":{"code":400,"message":"Name is required"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateDeleted":{"summary":"The template was deleted while registering the build","value":{"code":404,"message":"Template 'my-template' has been deleted and cannot be rebuilt"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"clusterChanged":{"summary":"The team's cluster changed during template registration","value":{"code":409,"message":"The team's cluster changed; retry the template build request"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The team's template-build cluster cannot be read","value":{"code":500,"message":"Error when checking the team's cluster"}}}}}}},"operationId":"postTemplatesV3"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/templates":{"get":{"summary":"List templates (v2)","x-api-group":"list","description":"List all templates","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"in":"query","required":false,"name":"teamID","schema":{"type":"string","description":"Identifier of the team, as its UUID or its public project ID (prj_)"}},{"$ref":"#/components/parameters/paginationNextToken"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successfully returned all templates","headers":{"X-Next-Token":{"$ref":"#/components/headers/XNextToken"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidNextToken":{"summary":"The pagination token cannot be decoded","value":{"code":400,"message":"Invalid next token"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template query fails","value":{"code":500,"message":"Error when getting templates"}}}}}}},"operationId":"listTemplatesV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/{templateID}/files/{hash}":{"get":{"summary":"Get build upload link","description":"Get an upload link for a tar file containing build layer files","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"},{"in":"path","name":"hash","required":true,"schema":{"type":"string","description":"Hash of the files"}}],"responses":{"201":{"description":"The upload link where to upload the tar file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuildFileUpload"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidFilesHash":{"summary":"The upload hash is malformed","value":{"code":400,"message":"Invalid files hash"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateRowNotFound":{"summary":"The template or template/build pair has no database row","value":{"code":404,"message":"Error when getting template: no rows in result set"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The build client cannot create the upload descriptor","value":{"code":500,"message":"Error when requesting layer files upload"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"buildClientUnavailable":{"summary":"No available build client could be selected","value":{"code":503,"message":"Error when getting available build client"}}}}}}},"operationId":"getTemplateFile"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates":{"get":{"summary":"List templates","x-api-group":"list","description":"List all templates","deprecated":true,"tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"in":"query","required":false,"name":"teamID","schema":{"type":"string","description":"Identifier of the team, as its UUID or its public project ID (prj_)"}}],"responses":{"200":{"description":"Successfully returned all templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamMismatch":{"summary":"The team parameter does not match the API key","value":{"code":400,"message":"Team ID param mismatch with the API key"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template query fails","value":{"code":500,"message":"Error when getting templates"}}}}}}},"operationId":"listTemplates"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/{templateID}":{"get":{"summary":"Get template","x-api-group":"list","description":"List all builds for a template","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"},{"$ref":"#/components/parameters/paginationNextToken"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successfully returned the template with its builds","headers":{"X-Next-Token":{"$ref":"#/components/headers/XNextToken"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateWithBuilds"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidNextToken":{"summary":"The pagination token cannot be decoded","value":{"code":400,"message":"Invalid next token"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template was not found","value":{"code":404,"message":"Template my-template not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template lookup fails","value":{"code":500,"message":"Error when getting template"}}}}}}},"operationId":"getTemplate"},"delete":{"summary":"Delete template","description":"Delete a template","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"}],"responses":{"204":{"description":"The template was deleted successfully"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"runningSandboxes":{"summary":"The template is still used by running sandboxes","value":{"code":400,"message":"cannot delete template 'my-template' because there are running sandboxes using it"}},"pausedSandboxes":{"summary":"The template is still used by paused sandboxes","value":{"code":400,"message":"cannot delete template 'my-template' because there are paused sandboxes using it"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template deletion fails","value":{"code":500,"message":"Error when deleting template"}}}}}}},"operationId":"deleteTemplate"},"patch":{"summary":"Update template","description":"Update template","deprecated":true,"tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateRequest"}}}},"responses":{"200":{"description":"The template was updated successfully","content":{"application/json":{"schema":{"type":"null"},"example":null}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidTemplateId":{"summary":"The template ID contains an unsupported character","value":{"code":400,"message":"Invalid template ID: invalid template ID: invalid!"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template is missing or inaccessible during the update","value":{"code":404,"message":"Template 'my-template' not found or you don't have access to it"}}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"publicAliasTaken":{"summary":"The legacy endpoint cannot create the backward-compatible public alias","value":{"code":409,"message":"Public template name 'my-template' is already taken. Your template is available at 'my-team/my-template'. Please update your CLI to remove this error message."}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template update fails","value":{"code":500,"message":"Error updating template"}}}}}}},"operationId":"patchTemplate"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/templates/{templateID}/builds/{buildID}":{"post":{"summary":"Start build (v2)","description":"Start the build","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"},{"$ref":"#/components/parameters/buildID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuildStartV2"}}}},"responses":{"202":{"description":"The build has started"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"buildNotWaiting":{"summary":"The build cannot be started in its current state","value":{"code":400,"message":"build is not in waiting state"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateRowNotFound":{"summary":"The template or template/build pair has no database row","value":{"code":404,"message":"Error when getting template: no rows in result set"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Creating the build record fails","value":{"code":500,"message":"Error during template build request"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"buildClientUnavailable":{"summary":"No available build client could be selected","value":{"code":503,"message":"Error when getting available build client"}}}}}}},"operationId":"postTemplateBuildV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/v2/templates/{templateID}":{"patch":{"summary":"Update template (v2)","description":"Update template","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateRequest"}}}},"responses":{"200":{"description":"The template was updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateResponse"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidTemplateId":{"summary":"The template ID contains an unsupported character","value":{"code":400,"message":"Invalid template ID: invalid template ID: invalid!"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template is missing or inaccessible during the update","value":{"code":404,"message":"Template 'my-template' not found or you don't have access to it"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The template update fails","value":{"code":500,"message":"Error updating template"}}}}}}},"operationId":"patchTemplateV2"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/{templateID}/builds/{buildID}/status":{"get":{"summary":"Get build status","description":"Get template build info","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"},{"$ref":"#/components/parameters/buildID"},{"in":"query","name":"logsOffset","schema":{"default":0,"type":"integer","format":"int32","minimum":0},"description":"Index of the starting build log that should be returned with the template"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","format":"int32","minimum":0,"maximum":100},"description":"Maximum number of logs that should be returned"},{"in":"query","name":"level","schema":{"$ref":"#/components/schemas/LogLevel"}}],"responses":{"200":{"description":"Successfully returned the template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuildInfo"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"buildNotFound":{"summary":"The build ID is valid but the build was not found","value":{"code":400,"message":"Build '00000000-0000-0000-0000-000000000000' not found"}},"invalidBuildId":{"summary":"The build ID is malformed","value":{"code":400,"message":"Invalid build id"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"templateAccessDenied":{"summary":"The authenticated team cannot access the template","value":{"code":403,"message":"You don't have access to this sandbox template (my-template)"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Looking up the build fails","value":{"code":500,"message":"Error when getting template"}}}}}}},"operationId":"getTemplateBuildStatus"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/{templateID}/builds/{buildID}/logs":{"get":{"summary":"Get build logs","description":"Get template build logs","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"},{"$ref":"#/components/parameters/buildID"},{"in":"query","name":"cursor","schema":{"type":"integer","format":"int64","minimum":0},"description":"Starting timestamp of the logs that should be returned in milliseconds"},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","format":"int32","minimum":0,"maximum":100},"description":"Maximum number of logs that should be returned"},{"in":"query","name":"direction","schema":{"$ref":"#/components/schemas/LogsDirection"}},{"in":"query","name":"level","schema":{"$ref":"#/components/schemas/LogLevel"}},{"in":"query","name":"source","schema":{"$ref":"#/components/schemas/LogsSource"},"description":"Source of the logs that should be returned from"}],"responses":{"200":{"description":"Successfully returned the template build logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBuildLogsResponse"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"buildNotFound":{"summary":"The build ID is valid but the build was not found","value":{"code":400,"message":"Build '00000000-0000-0000-0000-000000000000' not found"}},"invalidBuildId":{"summary":"The build ID is malformed","value":{"code":400,"message":"Invalid build id"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"templateAccessDenied":{"summary":"The authenticated team cannot access the template","value":{"code":403,"message":"You don't have access to this sandbox template (my-template)"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Looking up the build fails","value":{"code":500,"message":"Error when getting template"}}}}}}},"operationId":"getTemplateBuildLogs"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/aliases/{alias}":{"get":{"summary":"Get template by alias","description":"Check if template with given alias exists","tags":["Templates"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"alias","in":"path","required":true,"schema":{"type":"string","description":"Template alias"}}],"responses":{"200":{"description":"Successfully queried template by alias","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateAliasResponse"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidAlias":{"summary":"The alias contains an unsupported character","value":{"code":400,"message":"Invalid alias format: invalid template ID: invalid!"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Looking up an explicit template tag fails","value":{"code":500,"message":"Error when checking template tag existence"}}}}}}},"operationId":"getTemplatesAlias"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/tags":{"post":{"summary":"Assign tags","description":"Assign tag(s) to a template build","tags":["Tags"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignTemplateTagsRequest"}}}},"responses":{"201":{"description":"Tag assigned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedTemplateTags"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"emptyTags":{"summary":"No tags were supplied","value":{"code":400,"message":"At least one tag is required"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateTagNotFound":{"summary":"The target template tag is missing","value":{"code":404,"message":"Template 'my-template' with tag 'default' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Writing a template tag assignment fails","value":{"code":500,"message":"Error creating tag assignment"}}}}}}},"operationId":"postTemplatesTags"},"delete":{"summary":"Delete tags","description":"Delete multiple tags from templates","tags":["Tags"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTemplateTagsRequest"}}}},"responses":{"204":{"description":"Tags deleted successfully"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"emptyTags":{"summary":"No tags were supplied","value":{"code":400,"message":"At least one tag is required"}},"defaultTag":{"summary":"The reserved default tag cannot be deleted","value":{"code":400,"message":"Cannot delete the 'default' tag"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Deleting template tag assignments fails","value":{"code":500,"message":"Error deleting tag assignments"}}}}}}},"operationId":"deleteTemplatesTags"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/templates/{templateID}/tags":{"get":{"summary":"List template tags","x-api-group":"list","description":"List all tags for a template","tags":["Tags"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/templateID"}],"responses":{"200":{"description":"Successfully returned the template tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateTag"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidTemplateReference":{"summary":"The template reference contains an unsupported character","value":{"code":400,"message":"Invalid template reference: invalid template ID: invalid!"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"templateNotFound":{"summary":"The template reference cannot be resolved","value":{"code":404,"message":"template 'my-template' not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Listing template tags fails","value":{"code":500,"message":"Error when listing template tags"}}}}}}},"operationId":"getTemplateTags"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/volumes":{"get":{"summary":"List team volumes","x-api-group":"list","description":"List all team volumes","tags":["Volumes"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Successfully listed all team volumes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Volume"}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The volume query fails","value":{"code":500,"message":"Error when getting volumes"}}}}}}},"operationId":"listVolumes"},"post":{"summary":"Create team volume","description":"Create a new team volume","tags":["Volumes"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewVolume"}}}},"responses":{"201":{"description":"Successfully created a new team volume","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeAndToken"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeNameExists":{"summary":"A volume with this name already exists","value":{"code":400,"message":"Volume with name 'my-volume' already exists"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"volumesDisabled":{"summary":"Volumes are not enabled for this team","value":{"code":403,"message":"use of volumes is not enabled"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The deployment has no default volume type","value":{"code":500,"message":"No persistent volume type is configured"}}}}}},"501":{"description":"Not implemented by this deployment","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":501},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeSigningUnavailable":{"summary":"The deployment has no volume content-token signing configuration","value":{"code":501,"message":"volumes content token signing is not supported by this deployment"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"clusterNotFound":{"summary":"The team's cluster could not be resolved","value":{"code":503,"message":"Cluster not found"}}}}}}},"operationId":"postVolumes"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/volumes/{volumeID}":{"get":{"summary":"Team volume","description":"Get team volume info","tags":["Volumes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/volumeID"}],"responses":{"200":{"description":"Successfully retrieved a team volume","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeAndToken"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidVolumeId":{"summary":"The volume ID is malformed","value":{"code":400,"message":"Invalid volume ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeNotFound":{"summary":"The volume was not found for this team","value":{"code":404,"message":"Volume not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The API cannot sign a volume content token","value":{"code":500,"message":"failed to sign token"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"clusterNotFound":{"summary":"The team's cluster could not be resolved","value":{"code":503,"message":"Cluster not found"}}}}}}},"operationId":"getVolume"},"delete":{"summary":"Delete team volume","description":"Delete a team volume","tags":["Volumes"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/volumeID"}],"responses":{"204":{"description":"Successfully deleted a team volume"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidVolumeId":{"summary":"The volume ID is malformed","value":{"code":400,"message":"Invalid volume ID"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"volumeNotFound":{"summary":"The volume was not found for this team","value":{"code":404,"message":"Volume not found"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"Recording the volume deletion fails","value":{"code":500,"message":"Error recording volume deletion"}}}}}}},"operationId":"deleteVolume"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/health":{"get":{"summary":"Check the health of the service","responses":{"204":{"description":"The service is healthy"},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"operationId":"getHealth","security":[],"tags":["Envd"]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/metrics":{"get":{"summary":"Service stats","security":[{"SandboxAccessTokenAuth":[]}],"responses":{"200":{"description":"The resource usage metrics of the service","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Metrics collection can also fail with an empty body.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}},"x-empty-body-allowed":true},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"operationId":"getMetrics","tags":["Envd"]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/envs":{"get":{"summary":"Environment variables","security":[{"SandboxAccessTokenAuth":[]}],"responses":{"200":{"description":"Environment variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvVars"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"operationId":"getEnvVars","tags":["Envd"]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/files":{"get":{"summary":"Download a file","tags":["Filesystem"],"security":[{"SandboxAccessTokenAuth":[]}],"parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"$ref":"#/components/parameters/FilePath"},{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/SignatureExpiration"},{"name":"Range","in":"header","description":"Byte range to download.","schema":{"type":"string"},"example":"bytes=2-5"},{"name":"If-Modified-Since","in":"header","description":"Return 304 if the file has not changed since this HTTP date.","schema":{"type":"string"},"example":"Tue, 01 Jan 2030 00:00:00 GMT"},{"name":"Accept-Encoding","in":"header","description":"Supported transfer encodings include gzip and identity. Range and conditional requests require acceptable identity encoding.","schema":{"type":"string"},"example":"identity"}],"responses":{"200":{"description":"Entire file downloaded successfully. The Content-Type depends on the file. A gzip response uses the file extension's media type, or application/octet-stream as fallback.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}},"headers":{"Accept-Ranges":{"schema":{"type":"string","example":"bytes"}},"Last-Modified":{"schema":{"type":"string"},"description":"File modification time as an HTTP date."},"Content-Length":{"schema":{"type":"integer"},"description":"Response length when known."}}},"206":{"description":"Partial file content for a satisfiable Range request. Content-Type depends on the file, or is multipart/byteranges for multiple ranges.","headers":{"Accept-Ranges":{"schema":{"type":"string","example":"bytes"}},"Last-Modified":{"schema":{"type":"string"},"description":"File modification time as an HTTP date."},"Content-Length":{"schema":{"type":"integer"},"description":"Response length when known."},"Content-Range":{"description":"Range returned for a single-range response.","schema":{"type":"string","example":"bytes 2-5/10"}}},"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"The file has not changed according to the conditional request. No response body.","headers":{"Last-Modified":{"schema":{"type":"string"},"description":"File modification time as an HTTP date."}}},"400":{"description":"Invalid path The sandbox proxy rejects missing or invalid routing information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"path '/home/user/docs' is a directory","code":400}},"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Invalid user Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"upstream":{"value":{"message":"error looking up user 'nonexistent': user: unknown user nonexistent","code":401}},"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"missing signature query parameter"}}}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"path '/home/user/missing.txt' does not exist","code":404}}}},"406":{"description":"Requested encoding is not supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupportedEncoding":{"value":{"code":406,"message":"error parsing Accept-Encoding: no acceptable encoding found, supported: [gzip]"}},"rangeRequiresIdentity":{"value":{"code":406,"message":"identity encoding not acceptable for Range or conditional request"}}}}}},"416":{"description":"The requested byte range is invalid or does not overlap the file. This is a plain-text error from the file server.","headers":{"Content-Range":{"description":"File length for an unsatisfiable range.","schema":{"type":"string","example":"bytes */10"}}},"content":{"text/plain":{"schema":{"type":"string"},"examples":{"rangeDoesNotOverlap":{"value":"invalid range: failed to overlap\n"}}}}},"500":{"description":"Internal server error The sandbox proxy encountered an unexpected routing error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"error opening file '/home/user/file.txt': permission denied","code":500}},"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"operationId":"downloadFile","x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/api/download.go#L19-L184"},"post":{"summary":"Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.","description":"Any request header of the form `X-Metadata-<key>: <value>` is persisted\nas a user-defined extended attribute on the uploaded file. The\n`X-Metadata-` prefix is stripped and the remaining header name is\nlowercased to form the metadata key; the resulting map is returned on\n`EntryInfo` lookups (e.g. `Stat`, `ListDir`).\n\nEach upload replaces the file's metadata with the keys provided in\nthat request: keys previously stored but absent from the new request\nare removed, and an upload that sends no `X-Metadata-*` header clears\nall existing metadata.\n\nBoth keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`)\nand are rejected with HTTP 400 otherwise. Each key is capped at 246\nbytes (the Linux VFS xattr-name limit minus the namespace prefix), and\nthe combined size of all metadata on a file (keys plus values, with the\nnamespace prefix counted per key) is capped at 4096 bytes to stay within\nthe filesystem's per-inode xattr budget. Multiple files in a single\nmultipart upload receive the same metadata. If the same\n`X-Metadata-<key>` header is sent more than once, only the first\nvalue is used.\n","tags":["Filesystem"],"security":[{"SandboxAccessTokenAuth":[]}],"parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"$ref":"#/components/parameters/FilePath"},{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/SignatureExpiration"}],"requestBody":{"$ref":"#/components/requestBodies/File"},"responses":{"200":{"description":"The file was uploaded successfully. The response contains serialized JSON. Current envd also serves these bytes as text/plain, so parse the text as JSON to read the upload entries.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntryInfo"}},"example":[{"path":"/home/user/hello.txt","name":"hello.txt","type":"file"}]},"text/plain":{"schema":{"type":"string"},"x-decoded-schema":{"type":"array","items":{"$ref":"#/components/schemas/EntryInfo"}},"examples":{"uploadedFile":{"summary":"JSON text describing the uploaded file","value":"[{\"name\":\"example.txt\",\"path\":\"/tmp/example.txt\",\"type\":\"file\"}]"}}}}},"400":{"description":"Invalid path The sandbox proxy rejects missing or invalid routing information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"path '/home/user/docs' is a directory","code":400}},"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Invalid user Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"upstream":{"value":{"message":"error looking up user 'nonexistent': user: unknown user nonexistent","code":401}},"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"missing signature query parameter"}}}}}},"500":{"description":"Internal server error The sandbox proxy encountered an unexpected routing error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"error opening file '/home/user/file.txt': permission denied","code":500}},"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"507":{"description":"Not enough disk space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"not enough disk space available","code":507}}}}},"operationId":"uploadFile","x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/api/upload.go#L345-L358"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/CreateWatcher":{"post":{"tags":["Filesystem"],"summary":"CreateWatcher","description":"Non-streaming versions of WatchDir","operationId":"filesystem.Filesystem.CreateWatcher","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.CreateWatcherRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.CreateWatcherResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"path /tmp/missing not found: stat /tmp/missing: no such file or directory"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error statting path /etc/hostname/child: stat /etc/hostname/child: not a directory"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/watch_sync.go#L150"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/GetWatcherEvents":{"post":{"tags":["Filesystem"],"summary":"GetWatcherEvents","operationId":"filesystem.Filesystem.GetWatcherEvents","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.GetWatcherEventsRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.GetWatcherEventsResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"watcher with id does-not-exist not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"The watcher's error channel closed unexpectedly","value":{"code":"internal","message":"watcher error channel closed"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/watch_sync.go#L201"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/ListDir":{"post":{"tags":["Filesystem"],"summary":"ListDir","operationId":"filesystem.Filesystem.ListDir","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.ListDirRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.ListDirResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument. Connect RPC error: failed_precondition.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"path is not a directory: /etc/hostname"}},"failed_precondition":{"summary":"Example failed_precondition response","value":{"code":"failed_precondition","message":"cyclic symlink or chain >255 links at \"/tmp/loop\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"path not found: lstat /tmp/missing: no such file or directory"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error resolving symlink: not a directory"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/dir.go#L17"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/MakeDir":{"post":{"tags":["Filesystem"],"summary":"MakeDir","operationId":"filesystem.Filesystem.MakeDir","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.MakeDirRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.MakeDirResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"path already exists but it is not a directory: /etc/hostname"}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"The new directory disappeared before its entry information was read","value":{"code":"not_found","message":"file not found: lstat /tmp/example: no such file or directory"}}}}}},"409":{"description":"Connect RPC error: already_exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"already_exists":{"summary":"Example already_exists response","value":{"code":"already_exists","message":"directory already exists: /tmp"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error getting file info: stat /etc/hostname/child: not a directory"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/dir.go#L56"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/Move":{"post":{"tags":["Filesystem"],"summary":"Move","operationId":"filesystem.Filesystem.Move","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.MoveRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.MoveResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"source file not found: rename /tmp/missing /tmp/destination: no such file or directory"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error renaming: rename /home/user /home/user: file exists"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/move.go#L15"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/Remove":{"post":{"tags":["Filesystem"],"summary":"Remove","operationId":"filesystem.Filesystem.Remove","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.RemoveRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.RemoveResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error removing file or directory: unlinkat /etc/hostname/child: not a directory"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/remove.go#L14"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/RemoveWatcher":{"post":{"tags":["Filesystem"],"summary":"RemoveWatcher","operationId":"filesystem.Filesystem.RemoveWatcher","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.RemoveWatcherRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.RemoveWatcherResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"watcher with id does-not-exist not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/watch_sync.go#L232"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/Stat":{"post":{"tags":["Filesystem"],"summary":"Stat","operationId":"filesystem.Filesystem.Stat","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.StatRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/filesystem.StatResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"file not found: lstat /tmp/missing: no such file or directory"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error getting file info: lstat /etc/hostname/child: not a directory"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/filesystem/stat.go#L12"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/filesystem.Filesystem/WatchDir":{"post":{"tags":["Filesystem"],"summary":"WatchDir","description":"Server-streaming RPC. Use the Connect protocol with streaming support.","operationId":"filesystem.Filesystem.WatchDir","requestBody":{"content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/filesystem.WatchDirRequest"}}},"required":true,"description":"Send Connect-framed bytes with Content-Type application/connect+json. Each uncompressed request frame begins with flags byte 0, then the JSON payload length as four big-endian bytes, then the UTF-8 JSON payload. The decoded payload follows `#/components/schemas/filesystem.WatchDirRequest` (x-connect-message-schema). Sending a bare JSON document does not encode a valid Connect request frame."},"responses":{"200":{"description":"Stream of WatchDirResponse events Decoded terminal error example (the wire also includes the five-byte frame prefix): `{\"error\":{\"code\":\"not_found\",\"message\":\"path /tmp/missing not found: stat /tmp/missing: no such file or directory\"}}`. Connect-framed bytes, not an ordinary JSON document. Each frame has a one-byte flags field and a four-byte big-endian payload length. The decoded data payload follows x-connect-message-schema. The final frame has flags=2 and follows x-connect-end-stream-schema. RPC failures appear in its error object while the HTTP status remains 200. Authentication or routing failures before the stream can use the separate HTTP responses below.","content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/filesystem.WatchDirResponse"},"x-connect-end-stream-schema":{"$ref":"#/components/schemas/ConnectEndStreamResponse"},"x-connect-decoded-examples":{"completed":{"flags":2,"payload":{}},"failed":{"flags":2,"payload":{"error":{"code":"not_found","message":"path /tmp/missing not found: stat /tmp/missing: no such file or directory"}}}}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"parameters":[{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}},{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"x-response-contract-source":"https://github.com/connectrpc/connect-go/blob/v1.18.1/protocol_connect.go#L1203-L1308","x-codeSamples":[{"lang":"python","label":"Python (Connect framing)","source":"import json\nimport os\nimport struct\nimport urllib.request\n\n# Set E2B_SANDBOX_ID and E2B_ENVD_ACCESS_TOKEN from a secured sandbox's\n# create/connect response. This token is not your project API key.\nmessages = [{\"path\": \"/home/user\", \"recursive\": False}]\nbody = b\"\"\nfor message in messages:\n    payload = json.dumps(message).encode(\"utf-8\")\n    body += struct.pack(\">BI\", 0, len(payload)) + payload\n\nrequest = urllib.request.Request(\n    \"https://sandbox.e2b.app/filesystem.Filesystem/WatchDir\",\n    data=body,\n    headers={\n        \"Content-Type\": \"application/connect+json\",\n        \"Connect-Protocol-Version\": \"1\",\n        \"Connect-Timeout-Ms\": \"5000\",\n        \"E2b-Sandbox-Id\": os.environ[\"E2B_SANDBOX_ID\"],\n        \"E2b-Sandbox-Port\": \"49983\",\n        \"X-Access-Token\": os.environ[\"E2B_ENVD_ACCESS_TOKEN\"],\n    },\n    method=\"POST\",\n)\nwith urllib.request.urlopen(request, timeout=10) as response:\n    data = response.read()\n\n# HTTP 200 can still contain a terminal error. Decode each envelope.\noffset = 0\nwhile offset < len(data):\n    if len(data) - offset < 5:\n        raise ValueError(\"Truncated Connect envelope\")\n    flags, length = struct.unpack_from(\">BI\", data, offset)\n    offset += 5\n    if length > len(data) - offset:\n        raise ValueError(\"Truncated Connect message\")\n    message = json.loads(data[offset:offset + length])\n    offset += length\n    if flags & 2:\n        if message.get(\"error\"):\n            raise RuntimeError(message[\"error\"])\n        break\n    print(message)\n\n# The five-second example deadline ends the watch with deadline_exceeded.\n"}]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/CloseStdin":{"post":{"tags":["Process"],"summary":"CloseStdin","description":"Close stdin to signal EOF to the process.\n Only works for non-PTY processes. For PTY, send Ctrl+D (0x04) instead.","operationId":"process.Process.CloseStdin","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.CloseStdinRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.CloseStdinResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: unknown.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"unknown":{"summary":"Closing stdin is not supported for a PTY process","value":{"code":"unknown","message":"error closing stdin: cannot close stdin for PTY process — send Ctrl+D (0x04) instead"}}}}}},"501":{"description":"Connect RPC error: unimplemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"unimplemented":{"summary":"Example unimplemented response","value":{"code":"unimplemented","message":"invalid input type *process.ProcessSelector"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/process/input.go#L86"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/Connect":{"post":{"tags":["Process"],"summary":"Connect","description":"Server-streaming RPC. Use the Connect protocol with streaming support.","operationId":"process.Process.Connect","requestBody":{"content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.ConnectRequest"}}},"required":true,"description":"Send Connect-framed bytes with Content-Type application/connect+json. Each uncompressed request frame begins with flags byte 0, then the JSON payload length as four big-endian bytes, then the UTF-8 JSON payload. The decoded payload follows `#/components/schemas/process.ConnectRequest` (x-connect-message-schema). Sending a bare JSON document does not encode a valid Connect request frame."},"responses":{"200":{"description":"Stream of ConnectResponse events Decoded terminal error example (the wire also includes the five-byte frame prefix): `{\"error\":{\"code\":\"not_found\",\"message\":\"process with pid 2147483647 not found\"}}`. Connect-framed bytes, not an ordinary JSON document. Each frame has a one-byte flags field and a four-byte big-endian payload length. The decoded data payload follows x-connect-message-schema. The final frame has flags=2 and follows x-connect-end-stream-schema. RPC failures appear in its error object while the HTTP status remains 200. Authentication or routing failures before the stream can use the separate HTTP responses below.","content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.ConnectResponse"},"x-connect-end-stream-schema":{"$ref":"#/components/schemas/ConnectEndStreamResponse"},"x-connect-decoded-examples":{"completed":{"flags":2,"payload":{}},"failed":{"flags":2,"payload":{"error":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"parameters":[{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}},{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"x-response-contract-source":"https://github.com/connectrpc/connect-go/blob/v1.18.1/protocol_connect.go#L1203-L1308","x-codeSamples":[{"lang":"python","label":"Python (Connect framing)","source":"import json\nimport os\nimport struct\nimport urllib.request\n\n# Set E2B_SANDBOX_ID and E2B_ENVD_ACCESS_TOKEN from a secured sandbox's\n# create/connect response. This token is not your project API key.\n# E2B_PROCESS_PID must identify a running process in that sandbox.\nmessages = [{\"process\": {\"pid\": int(os.environ[\"E2B_PROCESS_PID\"])}}]\nbody = b\"\"\nfor message in messages:\n    payload = json.dumps(message).encode(\"utf-8\")\n    body += struct.pack(\">BI\", 0, len(payload)) + payload\n\nrequest = urllib.request.Request(\n    \"https://sandbox.e2b.app/process.Process/Connect\",\n    data=body,\n    headers={\n        \"Content-Type\": \"application/connect+json\",\n        \"Connect-Protocol-Version\": \"1\",\n        \"Connect-Timeout-Ms\": \"5000\",\n        \"E2b-Sandbox-Id\": os.environ[\"E2B_SANDBOX_ID\"],\n        \"E2b-Sandbox-Port\": \"49983\",\n        \"X-Access-Token\": os.environ[\"E2B_ENVD_ACCESS_TOKEN\"],\n    },\n    method=\"POST\",\n)\nwith urllib.request.urlopen(request, timeout=10) as response:\n    data = response.read()\n\n# HTTP 200 can still contain a terminal error. Decode each envelope.\noffset = 0\nwhile offset < len(data):\n    if len(data) - offset < 5:\n        raise ValueError(\"Truncated Connect envelope\")\n    flags, length = struct.unpack_from(\">BI\", data, offset)\n    offset += 5\n    if length > len(data) - offset:\n        raise ValueError(\"Truncated Connect message\")\n    message = json.loads(data[offset:offset + length])\n    offset += length\n    if flags & 2:\n        if message.get(\"error\"):\n            raise RuntimeError(message[\"error\"])\n        break\n    print(message)\n"}]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/List":{"post":{"tags":["Process"],"summary":"List","operationId":"process.Process.List","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.ListRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.ListResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/process/list.go#L12"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/SendInput":{"post":{"tags":["Process"],"summary":"SendInput","operationId":"process.Process.SendInput","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.SendInputRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.SendInputResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"The process has stdin disabled or already closed","value":{"code":"internal","message":"error writing to stdin: stdin not enabled or closed"}}}}}},"501":{"description":"Connect RPC error: unimplemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"unimplemented":{"summary":"Example unimplemented response","value":{"code":"unimplemented","message":"invalid input type *process.ProcessSelector"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/process/input.go#L14"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/SendSignal":{"post":{"tags":["Process"],"summary":"SendSignal","operationId":"process.Process.SendSignal","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.SendSignalRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.SendSignalResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"The process exited after lookup but before the signal was delivered","value":{"code":"internal","message":"error sending signal: os: process already finished"}}}}}},"501":{"description":"Connect RPC error: unimplemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"unimplemented":{"summary":"Example unimplemented response","value":{"code":"unimplemented","message":"invalid input type *process.ProcessSelector"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/process/signal.go#L13"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/Start":{"post":{"tags":["Process"],"summary":"Start","description":"Server-streaming RPC. Use the Connect protocol with streaming support.","operationId":"process.Process.Start","requestBody":{"content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.StartRequest"}}},"required":true,"description":"Send Connect-framed bytes with Content-Type application/connect+json. Each uncompressed request frame begins with flags byte 0, then the JSON payload length as four big-endian bytes, then the UTF-8 JSON payload. The decoded payload follows `#/components/schemas/process.StartRequest` (x-connect-message-schema). Sending a bare JSON document does not encode a valid Connect request frame."},"responses":{"200":{"description":"Stream of StartResponse events Decoded terminal error example (the wire also includes the five-byte frame prefix): `{\"error\":{\"code\":\"invalid_argument\",\"message\":\"cwd '/tmp/missing' does not exist\"}}`. Connect-framed bytes, not an ordinary JSON document. Each frame has a one-byte flags field and a four-byte big-endian payload length. The decoded data payload follows x-connect-message-schema. The final frame has flags=2 and follows x-connect-end-stream-schema. RPC failures appear in its error object while the HTTP status remains 200. Authentication or routing failures before the stream can use the separate HTTP responses below.","content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.StartResponse"},"x-connect-end-stream-schema":{"$ref":"#/components/schemas/ConnectEndStreamResponse"},"x-connect-decoded-examples":{"completed":{"flags":2,"payload":{}},"failed":{"flags":2,"payload":{"error":{"code":"invalid_argument","message":"cwd '/tmp/missing' does not exist"}}}}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"security":[{"SandboxAccessTokenAuth":[]},{"SandboxAccessTokenAuth":[],"SandboxUserAuth":[]}],"parameters":[{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}},{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"x-response-contract-source":"https://github.com/connectrpc/connect-go/blob/v1.18.1/protocol_connect.go#L1203-L1308","x-codeSamples":[{"lang":"python","label":"Python (Connect framing)","source":"import json\nimport os\nimport struct\nimport urllib.request\n\n# Set E2B_SANDBOX_ID and E2B_ENVD_ACCESS_TOKEN from a secured sandbox's\n# create/connect response. This token is not your project API key.\nmessages = [{\"process\": {\"cmd\": \"/bin/echo\", \"args\": [\"Hello from E2B\"]}, \"stdin\": False}]\nbody = b\"\"\nfor message in messages:\n    payload = json.dumps(message).encode(\"utf-8\")\n    body += struct.pack(\">BI\", 0, len(payload)) + payload\n\nrequest = urllib.request.Request(\n    \"https://sandbox.e2b.app/process.Process/Start\",\n    data=body,\n    headers={\n        \"Content-Type\": \"application/connect+json\",\n        \"Connect-Protocol-Version\": \"1\",\n        \"Connect-Timeout-Ms\": \"5000\",\n        \"E2b-Sandbox-Id\": os.environ[\"E2B_SANDBOX_ID\"],\n        \"E2b-Sandbox-Port\": \"49983\",\n        \"X-Access-Token\": os.environ[\"E2B_ENVD_ACCESS_TOKEN\"],\n    },\n    method=\"POST\",\n)\nwith urllib.request.urlopen(request, timeout=10) as response:\n    data = response.read()\n\n# HTTP 200 can still contain a terminal error. Decode each envelope.\noffset = 0\nwhile offset < len(data):\n    if len(data) - offset < 5:\n        raise ValueError(\"Truncated Connect envelope\")\n    flags, length = struct.unpack_from(\">BI\", data, offset)\n    offset += 5\n    if length > len(data) - offset:\n        raise ValueError(\"Truncated Connect message\")\n    message = json.loads(data[offset:offset + length])\n    offset += length\n    if flags & 2:\n        if message.get(\"error\"):\n            raise RuntimeError(message[\"error\"])\n        break\n    print(message)\n"}]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/StreamInput":{"post":{"tags":["Process"],"summary":"StreamInput","description":"Client-streaming RPC. Client input stream ensures ordering of messages. Use the Connect protocol with streaming support.","operationId":"process.Process.StreamInput","requestBody":{"content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.StreamInputRequest"}}},"required":true,"description":"Send Connect-framed bytes with Content-Type application/connect+json. Each uncompressed request frame begins with flags byte 0, then the JSON payload length as four big-endian bytes, then the UTF-8 JSON payload. The decoded payload follows `#/components/schemas/process.StreamInputRequest` (x-connect-message-schema). Sending a bare JSON document does not encode a valid Connect request frame."},"responses":{"200":{"description":"Stream of StreamInputResponse events Decoded terminal error example (the wire also includes the five-byte frame prefix): `{\"error\":{\"code\":\"not_found\",\"message\":\"process with pid 2147483647 not found\"}}`. Connect-framed bytes, not an ordinary JSON document. Each frame has a one-byte flags field and a four-byte big-endian payload length. The decoded data payload follows x-connect-message-schema. The final frame has flags=2 and follows x-connect-end-stream-schema. RPC failures appear in its error object while the HTTP status remains 200. Authentication or routing failures before the stream can use the separate HTTP responses below.","content":{"application/connect+json":{"schema":{"type":"string","format":"binary"},"x-connect-message-schema":{"$ref":"#/components/schemas/process.StreamInputResponse"},"x-connect-end-stream-schema":{"$ref":"#/components/schemas/ConnectEndStreamResponse"},"x-connect-decoded-examples":{"completed":{"flags":2,"payload":{}},"failed":{"flags":2,"payload":{"error":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}}}},"401":{"description":"Sandbox access-token or signature authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvdHTTPError"},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"parameters":[{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}},{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983}],"x-response-contract-source":"https://github.com/connectrpc/connect-go/blob/v1.18.1/protocol_connect.go#L1203-L1308","x-codeSamples":[{"lang":"python","label":"Python (Connect framing)","source":"import json\nimport os\nimport struct\nimport urllib.request\n\n# Set E2B_SANDBOX_ID and E2B_ENVD_ACCESS_TOKEN from a secured sandbox's\n# create/connect response. This token is not your project API key.\n# E2B_PROCESS_PID must identify a running process in that sandbox.\n# The process must have been started with stdin enabled.\nmessages = [{\"start\": {\"process\": {\"pid\": int(os.environ[\"E2B_PROCESS_PID\"])}}},\n            {\"data\": {\"input\": {\"stdin\": \"aGVsbG8K\"}}}]\nbody = b\"\"\nfor message in messages:\n    payload = json.dumps(message).encode(\"utf-8\")\n    body += struct.pack(\">BI\", 0, len(payload)) + payload\n\nrequest = urllib.request.Request(\n    \"https://sandbox.e2b.app/process.Process/StreamInput\",\n    data=body,\n    headers={\n        \"Content-Type\": \"application/connect+json\",\n        \"Connect-Protocol-Version\": \"1\",\n        \"Connect-Timeout-Ms\": \"5000\",\n        \"E2b-Sandbox-Id\": os.environ[\"E2B_SANDBOX_ID\"],\n        \"E2b-Sandbox-Port\": \"49983\",\n        \"X-Access-Token\": os.environ[\"E2B_ENVD_ACCESS_TOKEN\"],\n    },\n    method=\"POST\",\n)\nwith urllib.request.urlopen(request, timeout=10) as response:\n    data = response.read()\n\n# HTTP 200 can still contain a terminal error. Decode each envelope.\noffset = 0\nwhile offset < len(data):\n    if len(data) - offset < 5:\n        raise ValueError(\"Truncated Connect envelope\")\n    flags, length = struct.unpack_from(\">BI\", data, offset)\n    offset += 5\n    if length > len(data) - offset:\n        raise ValueError(\"Truncated Connect message\")\n    message = json.loads(data[offset:offset + length])\n    offset += length\n    if flags & 2:\n        if message.get(\"error\"):\n            raise RuntimeError(message[\"error\"])\n        break\n    print(message)\n"}]},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/process.Process/Update":{"post":{"tags":["Process"],"summary":"Update","operationId":"process.Process.Update","parameters":[{"name":"E2b-Sandbox-Id","in":"header","required":true,"description":"Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.","schema":{"type":"string"}},{"name":"E2b-Sandbox-Port","in":"header","required":true,"description":"Port envd listens on inside the sandbox (default 49983).","schema":{"type":"integer","default":49983},"example":49983},{"name":"Connect-Protocol-Version","in":"header","required":true,"schema":{"type":"string","enum":["1"]},"example":"1"},{"name":"Connect-Timeout-Ms","in":"header","schema":{"$ref":"#/components/schemas/connect-timeout-header"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/process.UpdateResponse"}}}},"400":{"description":"The sandbox proxy rejects missing or invalid routing information. Connect RPC error: invalid_argument.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"missingRoutingHeader":{"summary":"The sandbox proxy rejects missing or invalid routing information.","value":"missing header\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"invalid_argument":{"summary":"Example invalid_argument response","value":{"code":"invalid_argument","message":"Connect-Protocol-Version must be \"1\": got \"invalid\""}}}}}},"401":{"description":"Sandbox access-token or signature authentication failed. Connect RPC error: unauthenticated.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EnvdHTTPError"},{"$ref":"#/components/schemas/ConnectRPCError"}]},"examples":{"sandboxAuthentication":{"summary":"Missing or invalid sandbox credentials","value":{"code":401,"message":"unauthorized access, please provide a valid access token or method signing if supported"}},"unauthenticated":{"summary":"Example unauthenticated response","value":{"code":"unauthenticated","message":"invalid username: 'nonexistent'"}}}}}},"404":{"description":"Connect RPC error: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"not_found":{"summary":"Example not_found response","value":{"code":"not_found","message":"process with pid 2147483647 not found"}}}}}},"500":{"description":"The sandbox proxy encountered an unexpected routing error. Connect RPC error: internal.","content":{"text/plain":{"schema":{"type":"string"},"examples":{"routingFailure":{"summary":"The sandbox proxy encountered an unexpected routing error.","value":"Unexpected error when routing request: invalid sandbox port\n"}}},"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"internal":{"summary":"Example internal response","value":{"code":"internal","message":"error resizing tty: tty not assigned to process"}}}}}},"501":{"description":"Connect RPC error: unimplemented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRPCError"},"examples":{"unimplemented":{"summary":"Example unimplemented response","value":{"code":"unimplemented","message":"invalid input type *process.ProcessSelector"}}}}}},"502":{"description":"The sandbox proxy could not find the sandbox. Browser navigation may receive an HTML error page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxRoutingError"},"examples":{"sandboxNotFound":{"value":{"sandboxId":"sandbox-id","message":"The sandbox was not found","code":502}}}},"text/html":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/connect.error"}}}}},"security":[{"SandboxAccessTokenAuth":[]}],"x-response-contract-source":"https://github.com/e2b-dev/infra/blob/0c21aa2277b59a1d040761ed3fbbb29a78775470/packages/envd/internal/services/process/update.go#L13"},"servers":[{"url":"https://sandbox.e2b.app","description":"Sandbox API (envd) - routes using sandbox ID and port headers"}]},"/teams/{teamID}/metrics":{"get":{"summary":"Get team metrics","description":"Get metrics for the team","tags":["Teams"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/teamID"},{"in":"query","name":"start","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the start of the interval, in seconds, for which the metrics are returned."},{"in":"query","name":"end","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the end of the interval, in seconds, for which the metrics are returned."}],"responses":{"200":{"description":"Successfully returned the team metrics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMetric"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidTimeRange":{"summary":"The start timestamp is later than the end timestamp","value":{"code":400,"message":"start time cannot be after end time"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"The team-metrics query failed. The message starts with `error querying team metrics: ` followed by the underlying query 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"}}}}},"operationId":"getTeamMetrics"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/teams/{teamID}/metrics/max":{"get":{"summary":"Get team metrics max","description":"Get the maximum metrics for the team in the given interval","tags":["Teams"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/teamID"},{"in":"query","name":"start","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the start of the interval, in seconds, for which the metrics are returned."},{"in":"query","name":"end","schema":{"type":"integer","format":"int64","minimum":0},"description":"Unix timestamp for the end of the interval, in seconds, for which the metrics are returned."},{"in":"query","name":"metric","required":true,"schema":{"type":"string","enum":["concurrent_sandboxes","sandbox_start_rate"]},"description":"Metric to retrieve the maximum value for"}],"responses":{"200":{"description":"Successfully returned the team metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxTeamMetric"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidTimeRange":{"summary":"The start timestamp is later than the end timestamp","value":{"code":400,"message":"start time cannot be after end time"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}}}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"operationFailed":{"summary":"The maximum-metrics query fails","value":{"code":500,"message":"Error querying max team metrics"}}}}}}},"operationId":"getTeamMetricsMax"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/secrets":{"get":{"summary":"List secrets","x-api-group":"list","description":"List the project's secrets. No response carries a secret value.","tags":["Secrets"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/paginationNextToken"},{"$ref":"#/components/parameters/paginationLimit"}],"responses":{"200":{"description":"Successfully listed the project's secrets","headers":{"X-Next-Token":{"$ref":"#/components/headers/XNextToken"},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Secret"}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSecretsRequest":{"summary":"Request validation or the secrets backend rejects the input","value":{"code":400,"message":"Invalid secrets request"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsUnauthorized":{"summary":"Authentication is missing or invalid","value":{"code":401,"message":"You are not authenticated"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"Secrets are not available for this team"}},"secretsUnavailable":{"summary":"The secrets feature or backend is unavailable for the team","value":{"code":403,"message":"Secrets are not available for this team"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretNotFound":{"summary":"The secrets backend cannot find the requested secret","value":{"code":404,"message":"Secret not found"}},"preHandlerNotFound":{"summary":"A request is rejected as not found before reaching the secrets handler","value":{"code":404,"message":"Not found"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretConflict":{"summary":"Conflict, failed precondition, aborted modification, or secret limit reached","value":{"code":409,"message":"Secret cannot be modified in its current state"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"Unexpected internal failure. Panic recovery returns HTTP 500 without a response body. Secrets-backend failures use 502 or 504.","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":502},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendError":{"summary":"The secrets backend failed or returned an unusable response","value":{"code":502,"message":"Secrets backend error"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendTimeout":{"summary":"The secrets backend deadline was exceeded","value":{"code":504,"message":"Secrets backend timed out"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}}},"operationId":"listSecrets"},"post":{"summary":"Create secret","description":"Create a secret by storing a runtime marker as its first version. The response carries metadata only.","tags":["Secrets"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSecret"}}}},"responses":{"201":{"description":"Successfully created the secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSecretsRequest":{"summary":"Request validation or the secrets backend rejects the input","value":{"code":400,"message":"Invalid secrets request"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsUnauthorized":{"summary":"Authentication is missing or invalid","value":{"code":401,"message":"You are not authenticated"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"Secrets are not available for this team"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"secretsUnavailable":{"summary":"The secrets feature or backend is unavailable for the team","value":{"code":403,"message":"Secrets are not available for this team"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretNotFound":{"summary":"The secrets backend cannot find the requested secret","value":{"code":404,"message":"Secret not found"}},"preHandlerNotFound":{"summary":"A request is rejected as not found before reaching the secrets handler","value":{"code":404,"message":"Not found"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"409":{"description":"Secret name conflict or project live-secret limit reached. A quota response has error_code secret_limit_reached and, when reported by the backend, the effective cap in message.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretLimitReached":{"value":{"code":409,"message":"Project has reached its limit of 50 live secrets","error_code":"secret_limit_reached"}},"secretConflict":{"summary":"Conflict, failed precondition, aborted modification, or secret limit reached","value":{"code":409,"message":"Secret cannot be modified in its current state"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"Unexpected internal failure. Panic recovery returns HTTP 500 without a response body. Secrets-backend failures use 502 or 504.","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":502},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendError":{"summary":"The secrets backend failed or returned an unusable response","value":{"code":502,"message":"Secrets backend error"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendTimeout":{"summary":"The secrets backend deadline was exceeded","value":{"code":504,"message":"Secrets backend timed out"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}}},"operationId":"postSecrets"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/secrets/{secretID}":{"get":{"summary":"Get secret","description":"Get one secret's metadata, selected by identifier or name.","tags":["Secrets"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/secretID"}],"responses":{"200":{"description":"Successfully retrieved the secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSecretsRequest":{"summary":"Request validation or the secrets backend rejects the input","value":{"code":400,"message":"Invalid secrets request"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsUnauthorized":{"summary":"Authentication is missing or invalid","value":{"code":401,"message":"You are not authenticated"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"Secrets are not available for this team"}},"secretsUnavailable":{"summary":"The secrets feature or backend is unavailable for the team","value":{"code":403,"message":"Secrets are not available for this team"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretNotFound":{"summary":"The secrets backend cannot find the requested secret","value":{"code":404,"message":"Secret not found"}},"preHandlerNotFound":{"summary":"A request is rejected as not found before reaching the secrets handler","value":{"code":404,"message":"Not found"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretConflict":{"summary":"Conflict, failed precondition, aborted modification, or secret limit reached","value":{"code":409,"message":"Secret cannot be modified in its current state"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"Unexpected internal failure. Panic recovery returns HTTP 500 without a response body. Secrets-backend failures use 502 or 504.","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":502},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendError":{"summary":"The secrets backend failed or returned an unusable response","value":{"code":502,"message":"Secrets backend error"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendTimeout":{"summary":"The secrets backend deadline was exceeded","value":{"code":504,"message":"Secrets backend timed out"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}}},"operationId":"getSecret"},"post":{"summary":"Update secret","description":"Replace the secret's stored marker by appending a new version. The response carries metadata only.","tags":["Secrets"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/secretID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretUpdate"}}}},"responses":{"200":{"description":"Successfully updated the secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSecretsRequest":{"summary":"Request validation or the secrets backend rejects the input","value":{"code":400,"message":"Invalid secrets request"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsUnauthorized":{"summary":"Authentication is missing or invalid","value":{"code":401,"message":"You are not authenticated"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"Secrets are not available for this team"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"secretsUnavailable":{"summary":"The secrets feature or backend is unavailable for the team","value":{"code":403,"message":"Secrets are not available for this team"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretNotFound":{"summary":"The secrets backend cannot find the requested secret","value":{"code":404,"message":"Secret not found"}},"preHandlerNotFound":{"summary":"A request is rejected as not found before reaching the secrets handler","value":{"code":404,"message":"Not found"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretConflict":{"summary":"Conflict, failed precondition, aborted modification, or secret limit reached","value":{"code":409,"message":"Secret cannot be modified in its current state"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"Unexpected internal failure. Panic recovery returns HTTP 500 without a response body. Secrets-backend failures use 502 or 504.","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":502},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendError":{"summary":"The secrets backend failed or returned an unusable response","value":{"code":502,"message":"Secrets backend error"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendTimeout":{"summary":"The secrets backend deadline was exceeded","value":{"code":504,"message":"Secrets backend timed out"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}}},"operationId":"postSecret"},"delete":{"summary":"Delete secret","description":"Revoke the secret and schedule its versions for cleanup.","tags":["Secrets"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/secretID"}],"responses":{"204":{"description":"Successfully deleted the secret","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidSecretsRequest":{"summary":"Request validation or the secrets backend rejects the input","value":{"code":400,"message":"Invalid secrets request"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsUnauthorized":{"summary":"Authentication is missing or invalid","value":{"code":401,"message":"You are not authenticated"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"Secrets are not available for this team"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}},"secretsUnavailable":{"summary":"The secrets feature or backend is unavailable for the team","value":{"code":403,"message":"Secrets are not available for this team"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretNotFound":{"summary":"The secrets backend cannot find the requested secret","value":{"code":404,"message":"Secret not found"}},"preHandlerNotFound":{"summary":"A request is rejected as not found before reaching the secrets handler","value":{"code":404,"message":"Not found"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":409},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretConflict":{"summary":"Conflict, failed precondition, aborted modification, or secret limit reached","value":{"code":409,"message":"Secret cannot be modified in its current state"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30},"RateLimit-Limit":{"description":"Configured rate-limit burst size.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests remaining in the rate-limit window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":429},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rateLimitExceeded":{"summary":"A configured API rate limit was exceeded","value":{"code":429,"message":"Rate limit exceeded"}}}}}},"500":{"description":"Unexpected internal failure. Panic recovery returns HTTP 500 without a response body. Secrets-backend failures use 502 or 504.","headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code","example":502},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendError":{"summary":"The secrets backend failed or returned an unusable response","value":{"code":502,"message":"Secrets backend error"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"secretsBackendTimeout":{"summary":"The secrets backend deadline was exceeded","value":{"code":504,"message":"Secrets backend timed out"}}}}},"headers":{"Cache-Control":{"description":"Secret-management responses must not be cached.","schema":{"type":"string","enum":["no-store"]}}}}},"operationId":"deleteSecret"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/sandboxes/{sandboxID}":{"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/sandboxes":{"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/webhooks":{"post":{"description":"Register events webhook.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successfully created webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreation"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidEventType":{"summary":"An unrecognized webhook event type was supplied","value":{"code":400,"message":"Invalid event type: invalid.event"}},"signingSecretTooShort":{"summary":"The webhook signing secret is shorter than 32 characters","value":{"code":400,"message":"Webhook secret must be at least 32 characters long"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Failed to create webhook"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Failed to create webhook"}}}}}}},"operationId":"postEventsWebhooks","summary":"Create webhook"},"get":{"description":"List registered webhooks.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of registered webhooks.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDetail"}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Failed to list webhooks"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Failed to list webhooks"}}}}}}},"operationId":"listEventsWebhooks","summary":"List webhooks"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/webhooks/{webhookID}":{"get":{"description":"Get a registered webhook.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/webhookID"}],"responses":{"200":{"description":"Successfully returned the webhook configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Failed to get webhook"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Failed to get webhook"}}}}}}},"operationId":"getEventsWebhook","summary":"Get webhook"},"patch":{"description":"Update a registered webhook configuration.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/webhookID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfiguration"}}}},"responses":{"200":{"description":"Successfully updated webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"invalidEventType":{"summary":"An unrecognized webhook event type was supplied","value":{"code":400,"message":"Invalid event type: invalid.event"}},"signingSecretTooShort":{"summary":"The webhook signing secret is shorter than 32 characters","value":{"code":400,"message":"Webhook secret must be at least 32 characters long"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Failed to update webhook"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Failed to update webhook"}}}}}}},"operationId":"patchEventsWebhook","summary":"Update webhook"},"delete":{"description":"Delete a registered webhook.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/webhookID"}],"responses":{"200":{"description":"Successfully deleted webhook."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"teamBanned":{"summary":"The team is banned at authentication","value":{"code":403,"message":"team is banned"}},"teamBlocked":{"summary":"The authenticated team is blocked. The message may append a reason","value":{"code":403,"message":"team is blocked"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Failed to delete webhook"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Failed to delete webhook"}}}}}}},"operationId":"deleteEventsWebhook","summary":"Delete webhook"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/webhooks/{webhookID}/deliveries":{"get":{"description":"List webhook delivery attempts.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/webhookID"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from the previous response's nextCursor field."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":25}},{"name":"orderAsc","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Include deliveries at or after this timestamp."},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Include deliveries before this timestamp."},{"name":"deliveryStatus","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["success","failed"]}},"description":"Filter deliveries by delivery status"},{"name":"eventType","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Filter deliveries by event type"}],"responses":{"200":{"description":"List of webhook delivery attempts grouped by event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesListPayload"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rangeTooLong":{"summary":"The requested deliveries range exceeds seven days","value":{"code":400,"message":"deliveries range must be 7 days or less"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Error when querying webhook deliveries"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Error when querying webhook deliveries"}}}}}}},"operationId":"getEventsWebhookDeliveries","summary":"List webhook deliveries"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]},"/events/webhooks/{webhookID}/stats":{"get":{"description":"Get webhook delivery aggregate stats.","tags":["Webhooks"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/webhookID"},{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Inclusive stats range start. Defaults to 24 hours ago."},{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Exclusive stats range end. Defaults to now."}],"responses":{"200":{"description":"Webhook delivery stats.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryStats"}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"rangeTooLong":{"summary":"The requested statistics range exceeds seven days","value":{"code":400,"message":"Stats range must be 7 days or less"}}}}}},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"resourceNotFound":{"summary":"The backend cannot find the requested resource","value":{"code":404,"message":"Webhook 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendError":{"summary":"The backend failed","value":{"code":500,"message":"Error when querying webhook delivery stats"}}}}}},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendUnavailable":{"summary":"The backend is not configured","value":{"code":503,"message":"Webhooks 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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"examples":{"backendDeadlineExceeded":{"summary":"The backend deadline was exceeded","value":{"code":504,"message":"Error when querying webhook delivery stats"}}}}}}},"operationId":"getEventsWebhookStats","summary":"Get webhook statistics"},"servers":[{"url":"https://api.e2b.app","description":"E2B Platform API"}]}},"components":{"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."}},"parameters":{"FilePath":{"name":"path","in":"query","required":false,"description":"Path to the file, URL encoded. Can be relative to the user's home directory (e.g. \"file.txt\" resolves to ~/file.txt).","schema":{"type":"string"}},"User":{"name":"username","in":"query","required":false,"description":"User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user.","schema":{"type":"string"}},"Signature":{"name":"signature","in":"query","required":false,"description":"Signature used for file access permission verification.","schema":{"type":"string"}},"SignatureExpiration":{"name":"signature_expiration","in":"query","required":false,"description":"Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter.","schema":{"type":"integer"}},"clusterID":{"name":"clusterID","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Identifier of the cluster"},"rigID":{"name":"rigID","in":"path","required":true,"schema":{"type":"string"},"description":"Rig identifier (e.g. \"default\")"},"templateID":{"name":"templateID","in":"path","required":true,"schema":{"type":"string"}},"buildID":{"name":"buildID","in":"path","required":true,"schema":{"type":"string"}},"sandboxID":{"name":"sandboxID","in":"path","required":true,"schema":{"type":"string"}},"teamID":{"name":"teamID","in":"path","required":true,"description":"Identifier of the team, as its UUID or its public project ID (prj_)","schema":{"type":"string"}},"nodeID":{"name":"nodeID","in":"path","required":true,"schema":{"type":"string"}},"apiKeyID":{"name":"apiKeyID","in":"path","required":true,"schema":{"type":"string"}},"snapshotID":{"name":"snapshotID","in":"path","required":true,"schema":{"type":"string","description":"Identifier of the snapshot (template ID)"}},"tag":{"name":"tag","in":"path","required":true,"schema":{"type":"string","description":"Tag name"}},"paginationLimit":{"name":"limit","in":"query","description":"Maximum number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"default":100,"maximum":100}},"paginationNextToken":{"name":"nextToken","in":"query","description":"Cursor to start the list from","required":false,"schema":{"type":"string"}},"volumeID":{"name":"volumeID","in":"path","required":true,"schema":{"type":"string"}},"secretID":{"name":"secretID","in":"path","required":true,"schema":{"type":"string","description":"Identifier of the secret (sec_ prefixed), or its canonical lower-case name\n"}},"webhookID":{"name":"webhookID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}},"requestBodies":{"File":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}},"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Raw file content. The 'path' query parameter is required when using this content type."}}}}},"responses":{"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"When present, the number of seconds to wait before retrying the request.","required":false,"schema":{"type":"integer","minimum":0},"example":30}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented by this deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Backend error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Backend timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UploadSuccess":{"description":"The file was uploaded successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntryInfo"}},"example":[{"path":"/home/user/hello.txt","name":"hello.txt","type":"file"}]}}},"DownloadSuccess":{"description":"Entire file downloaded successfully.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"The raw file content"}}}},"NotAcceptable":{"description":"Requested encoding is not supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"no acceptable encoding found, supported: [identity, gzip]","code":406}}}},"InvalidPath":{"description":"Invalid path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"path '/home/user/docs' is a directory","code":400}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"error opening file '/home/user/file.txt': permission denied","code":500}}}},"FileNotFound":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"path '/home/user/missing.txt' does not exist","code":404}}}},"InvalidUser":{"description":"Invalid user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"error looking up user 'nonexistent': user: unknown user nonexistent","code":401}}}},"NotEnoughDiskSpace":{"description":"Not enough disk space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"message":"not enough disk space available","code":507}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32","description":"Error code"},"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, internal_server_error, secret_limit_reached."},"message":{"type":"string","description":"Error"}},"type":"object"},"EntryInfo":{"required":["path","name","type"],"properties":{"path":{"type":"string","description":"Path to the file"},"name":{"type":"string","description":"Name of the file"},"type":{"type":"string","description":"Type of the file","enum":["file","directory"]},"metadata":{"type":"object","description":"User-defined metadata stored as extended attributes on the file.","additionalProperties":{"type":"string"}}},"type":"object"},"EnvVars":{"additionalProperties":{"type":"string","description":"Environment variables for the sandbox"},"type":"object"},"Metrics":{"type":"object","description":"Resource usage metrics","properties":{"ts":{"type":"integer","format":"int64","description":"Unix timestamp in UTC for current sandbox time"},"cpu_count":{"type":"integer","description":"Number of CPU cores"},"cpu_used_pct":{"type":"number","format":"float","description":"CPU usage percentage"},"mem_total":{"type":"integer","description":"Total virtual memory in bytes","format":"int64"},"mem_used":{"type":"integer","description":"Used virtual memory in bytes","format":"int64"},"mem_cache":{"type":"integer","description":"Cached memory (page cache) in bytes"},"mem_total_mib":{"type":"integer","description":"Total virtual memory in MiB","format":"int64"},"mem_used_mib":{"type":"integer","description":"Used virtual memory in MiB","format":"int64"},"disk_used":{"type":"integer","description":"Used disk space in bytes","format":"int64"},"disk_total":{"type":"integer","description":"Total disk space in bytes","format":"int64"}}},"connect-timeout-header":{"type":"number","title":"Connect-Timeout-Ms","description":"Define the timeout, in ms"},"connect.error":{"type":"object","properties":{"code":{"type":"string","examples":["not_found"],"enum":["canceled","unknown","invalid_argument","deadline_exceeded","not_found","already_exists","permission_denied","resource_exhausted","failed_precondition","aborted","out_of_range","unimplemented","internal","unavailable","data_loss","unauthenticated"],"description":"The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]."},"message":{"type":"string","description":"A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client."},"details":{"type":"array","items":{"$ref":"#/components/schemas/connect.error_details.Any"},"description":"A list of messages that carry the error details. There is no limit on the number of messages."}},"title":"Connect Error","additionalProperties":true,"description":"Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation"},"connect.error_details.Any":{"type":"object","properties":{"type":{"type":"string","description":"A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`. This is used to determine the schema of the data in the `value` field and is the discriminator for the `debug` field."},"value":{"type":"string","format":"binary","description":"The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field."},"debug":{"oneOf":[{"type":"object","title":"Any","additionalProperties":true,"description":"Detailed error information."}],"discriminator":{"propertyName":"type"},"title":"Debug","description":"Deserialized error detail payload. The 'type' field indicates the schema. This field is for easier debugging and should not be relied upon for application logic."}},"additionalProperties":true,"description":"Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details."},"filesystem.CreateWatcherRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"},"recursive":{"type":"boolean","title":"recursive"},"includeEntry":{"type":"boolean","title":"include_entry","description":"If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available."},"allowNetworkMounts":{"type":"boolean","title":"allow_network_mounts","description":"If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).\n Events on network mounts may be unreliable or not delivered at all."}},"title":"CreateWatcherRequest","additionalProperties":false},"filesystem.CreateWatcherResponse":{"type":"object","properties":{"watcherId":{"type":"string","title":"watcher_id"}},"title":"CreateWatcherResponse","additionalProperties":false},"filesystem.EntryInfo":{"type":"object","properties":{"name":{"type":"string","title":"name"},"type":{"title":"type","$ref":"#/components/schemas/filesystem.FileType"},"path":{"type":"string","title":"path"},"size":{"type":["integer","string"],"title":"size","format":"int64","description":"File size in bytes. Encoded as string for values exceeding JSON number precision (int64)."},"mode":{"type":"integer","title":"mode"},"permissions":{"type":"string","title":"permissions"},"owner":{"type":"string","title":"owner"},"group":{"type":"string","title":"group"},"modifiedTime":{"title":"modified_time","$ref":"#/components/schemas/google.protobuf.Timestamp"},"symlinkTarget":{"type":["string","null"],"title":"symlink_target","description":"If the entry is a symlink, this field contains the target of the symlink."},"metadata":{"type":"object","title":"metadata","additionalProperties":{"type":"string","title":"value"},"description":"User-defined metadata stored as extended attributes (xattrs) on the file.\n Keys live under the `user.e2b.` xattr namespace; the prefix is stripped here.\n Plain `user.*` xattrs written by other tooling are not reflected."}},"title":"EntryInfo","additionalProperties":false},"filesystem.EventType":{"type":"string","title":"EventType","enum":["EVENT_TYPE_UNSPECIFIED","EVENT_TYPE_CREATE","EVENT_TYPE_WRITE","EVENT_TYPE_REMOVE","EVENT_TYPE_RENAME","EVENT_TYPE_CHMOD"]},"filesystem.FileType":{"type":"string","title":"FileType","enum":["FILE_TYPE_UNSPECIFIED","FILE_TYPE_FILE","FILE_TYPE_DIRECTORY","FILE_TYPE_SYMLINK"]},"filesystem.FilesystemEvent":{"type":"object","properties":{"name":{"type":"string","title":"name"},"type":{"title":"type","$ref":"#/components/schemas/filesystem.EventType"},"entry":{"oneOf":[{"$ref":"#/components/schemas/filesystem.EntryInfo"},{"type":"null"}],"title":"entry","description":"Info of the entry that triggered the event. Only populated when include_entry\n was requested and the entry could be stat-ed (e.g. not set for remove/rename-away\n events, where the entry no longer exists at this path)."}},"title":"FilesystemEvent","additionalProperties":false},"filesystem.GetWatcherEventsRequest":{"type":"object","properties":{"watcherId":{"type":"string","title":"watcher_id"}},"title":"GetWatcherEventsRequest","additionalProperties":false},"filesystem.GetWatcherEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/filesystem.FilesystemEvent"},"title":"events"}},"title":"GetWatcherEventsResponse","additionalProperties":false},"filesystem.ListDirRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"},"depth":{"type":"integer","title":"depth"}},"title":"ListDirRequest","additionalProperties":false},"filesystem.ListDirResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/filesystem.EntryInfo"},"title":"entries"}},"title":"ListDirResponse","additionalProperties":false},"filesystem.MakeDirRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"}},"title":"MakeDirRequest","additionalProperties":false},"filesystem.MakeDirResponse":{"type":"object","properties":{"entry":{"title":"entry","$ref":"#/components/schemas/filesystem.EntryInfo"}},"title":"MakeDirResponse","additionalProperties":false},"filesystem.MoveRequest":{"type":"object","properties":{"source":{"type":"string","title":"source"},"destination":{"type":"string","title":"destination"}},"title":"MoveRequest","additionalProperties":false},"filesystem.MoveResponse":{"type":"object","properties":{"entry":{"title":"entry","$ref":"#/components/schemas/filesystem.EntryInfo"}},"title":"MoveResponse","additionalProperties":false},"filesystem.RemoveRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"}},"title":"RemoveRequest","additionalProperties":false},"filesystem.RemoveResponse":{"type":"object","title":"RemoveResponse","additionalProperties":false},"filesystem.RemoveWatcherRequest":{"type":"object","properties":{"watcherId":{"type":"string","title":"watcher_id"}},"title":"RemoveWatcherRequest","additionalProperties":false},"filesystem.RemoveWatcherResponse":{"type":"object","title":"RemoveWatcherResponse","additionalProperties":false},"filesystem.StatRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"}},"title":"StatRequest","additionalProperties":false},"filesystem.StatResponse":{"type":"object","properties":{"entry":{"title":"entry","$ref":"#/components/schemas/filesystem.EntryInfo"}},"title":"StatResponse","additionalProperties":false},"filesystem.WatchDirRequest":{"type":"object","properties":{"path":{"type":"string","title":"path"},"recursive":{"type":"boolean","title":"recursive"},"includeEntry":{"type":"boolean","title":"include_entry","description":"If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available."},"allowNetworkMounts":{"type":"boolean","title":"allow_network_mounts","description":"If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).\n Events on network mounts may be unreliable or not delivered at all."}},"title":"WatchDirRequest","additionalProperties":false},"filesystem.WatchDirResponse":{"type":"object","oneOf":[{"properties":{"filesystem":{"title":"filesystem","$ref":"#/components/schemas/filesystem.FilesystemEvent"}},"title":"filesystem","required":["filesystem"]},{"properties":{"keepalive":{"title":"keepalive","$ref":"#/components/schemas/filesystem.WatchDirResponse.KeepAlive"}},"title":"keepalive","required":["keepalive"]},{"properties":{"start":{"title":"start","$ref":"#/components/schemas/filesystem.WatchDirResponse.StartEvent"}},"title":"start","required":["start"]}],"title":"WatchDirResponse","unevaluatedProperties":false},"filesystem.WatchDirResponse.KeepAlive":{"type":"object","title":"KeepAlive","additionalProperties":false},"filesystem.WatchDirResponse.StartEvent":{"type":"object","title":"StartEvent","additionalProperties":false},"google.protobuf.Timestamp":{"type":"string","examples":["2023-01-15T01:30:15.01Z","2024-12-25T12:00:00Z"],"format":"date-time","description":"A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n     Timestamp timestamp;\n     timestamp.set_seconds(time(NULL));\n     timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n     struct timeval tv;\n     gettimeofday(&tv, NULL);\n\n     Timestamp timestamp;\n     timestamp.set_seconds(tv.tv_sec);\n     timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n     FILETIME ft;\n     GetSystemTimeAsFileTime(&ft);\n     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n     Timestamp timestamp;\n     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n     long millis = System.currentTimeMillis();\n\n     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n         .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n     Instant now = Instant.now();\n\n     Timestamp timestamp =\n         Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n             .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n     timestamp = Timestamp()\n     timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format."},"process.CloseStdinRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"}},"title":"CloseStdinRequest","additionalProperties":false},"process.CloseStdinResponse":{"type":"object","title":"CloseStdinResponse","additionalProperties":false},"process.ConnectRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"}},"title":"ConnectRequest","additionalProperties":false},"process.ConnectResponse":{"type":"object","properties":{"event":{"title":"event","$ref":"#/components/schemas/process.ProcessEvent"}},"title":"ConnectResponse","additionalProperties":false},"process.ListRequest":{"type":"object","title":"ListRequest","additionalProperties":false},"process.ListResponse":{"type":"object","properties":{"processes":{"type":"array","items":{"$ref":"#/components/schemas/process.ProcessInfo"},"title":"processes"}},"title":"ListResponse","additionalProperties":false},"process.PTY":{"type":"object","properties":{"size":{"title":"size","$ref":"#/components/schemas/process.PTY.Size"}},"title":"PTY","additionalProperties":false},"process.PTY.Size":{"type":"object","properties":{"cols":{"type":"integer","title":"cols"},"rows":{"type":"integer","title":"rows"}},"title":"Size","additionalProperties":false},"process.ProcessConfig":{"type":"object","properties":{"cmd":{"type":"string","title":"cmd"},"args":{"type":"array","items":{"type":"string"},"title":"args"},"envs":{"type":"object","title":"envs","additionalProperties":{"type":"string","title":"value"}},"cwd":{"type":["string","null"],"title":"cwd"}},"title":"ProcessConfig","additionalProperties":false},"process.ProcessEvent":{"type":"object","oneOf":[{"properties":{"data":{"title":"data","$ref":"#/components/schemas/process.ProcessEvent.DataEvent"}},"title":"data","required":["data"]},{"properties":{"end":{"title":"end","$ref":"#/components/schemas/process.ProcessEvent.EndEvent"}},"title":"end","required":["end"]},{"properties":{"keepalive":{"title":"keepalive","$ref":"#/components/schemas/process.ProcessEvent.KeepAlive"}},"title":"keepalive","required":["keepalive"]},{"properties":{"start":{"title":"start","$ref":"#/components/schemas/process.ProcessEvent.StartEvent"}},"title":"start","required":["start"]}],"title":"ProcessEvent","unevaluatedProperties":false},"process.ProcessEvent.DataEvent":{"type":"object","oneOf":[{"properties":{"pty":{"type":"string","title":"pty","format":"byte"}},"title":"pty","required":["pty"]},{"properties":{"stderr":{"type":"string","title":"stderr","format":"byte"}},"title":"stderr","required":["stderr"]},{"properties":{"stdout":{"type":"string","title":"stdout","format":"byte"}},"title":"stdout","required":["stdout"]}],"title":"DataEvent","unevaluatedProperties":false},"process.ProcessEvent.EndEvent":{"type":"object","properties":{"exitCode":{"type":"integer","title":"exit_code","format":"int32"},"exited":{"type":"boolean","title":"exited"},"status":{"type":"string","title":"status"},"error":{"type":["string","null"],"title":"error"}},"title":"EndEvent","additionalProperties":false},"process.ProcessEvent.KeepAlive":{"type":"object","title":"KeepAlive","additionalProperties":false},"process.ProcessEvent.StartEvent":{"type":"object","properties":{"pid":{"type":"integer","title":"pid"}},"title":"StartEvent","additionalProperties":false},"process.ProcessInfo":{"type":"object","properties":{"config":{"title":"config","$ref":"#/components/schemas/process.ProcessConfig"},"pid":{"type":"integer","title":"pid"},"tag":{"type":["string","null"],"title":"tag"}},"title":"ProcessInfo","additionalProperties":false},"process.ProcessInput":{"type":"object","oneOf":[{"properties":{"pty":{"type":"string","title":"pty","format":"byte"}},"title":"pty","required":["pty"]},{"properties":{"stdin":{"type":"string","title":"stdin","format":"byte"}},"title":"stdin","required":["stdin"]}],"title":"ProcessInput","unevaluatedProperties":false},"process.ProcessSelector":{"type":"object","oneOf":[{"properties":{"pid":{"type":"integer","title":"pid"}},"title":"pid","required":["pid"]},{"properties":{"tag":{"type":"string","title":"tag"}},"title":"tag","required":["tag"]}],"title":"ProcessSelector","unevaluatedProperties":false},"process.SendInputRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"},"input":{"title":"input","$ref":"#/components/schemas/process.ProcessInput"}},"title":"SendInputRequest","additionalProperties":false},"process.SendInputResponse":{"type":"object","title":"SendInputResponse","additionalProperties":false},"process.SendSignalRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"},"signal":{"title":"signal","$ref":"#/components/schemas/process.Signal"}},"title":"SendSignalRequest","additionalProperties":false},"process.SendSignalResponse":{"type":"object","title":"SendSignalResponse","additionalProperties":false},"process.Signal":{"type":"string","title":"Signal","enum":["SIGNAL_UNSPECIFIED","SIGNAL_SIGTERM","SIGNAL_SIGKILL"]},"process.StartRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessConfig"},"pty":{"oneOf":[{"$ref":"#/components/schemas/process.PTY"},{"type":"null"}],"title":"pty"},"tag":{"type":["string","null"],"title":"tag"},"stdin":{"type":["boolean","null"],"title":"stdin","description":"This is optional for backwards compatibility.\n We default to true. New SDK versions will set this to false by default."}},"title":"StartRequest","additionalProperties":false},"process.StartResponse":{"type":"object","properties":{"event":{"title":"event","$ref":"#/components/schemas/process.ProcessEvent"}},"title":"StartResponse","additionalProperties":false},"process.StreamInputRequest":{"type":"object","oneOf":[{"properties":{"data":{"title":"data","$ref":"#/components/schemas/process.StreamInputRequest.DataEvent"}},"title":"data","required":["data"]},{"properties":{"keepalive":{"title":"keepalive","$ref":"#/components/schemas/process.StreamInputRequest.KeepAlive"}},"title":"keepalive","required":["keepalive"]},{"properties":{"start":{"title":"start","$ref":"#/components/schemas/process.StreamInputRequest.StartEvent"}},"title":"start","required":["start"]}],"title":"StreamInputRequest","unevaluatedProperties":false},"process.StreamInputRequest.DataEvent":{"type":"object","properties":{"input":{"title":"input","$ref":"#/components/schemas/process.ProcessInput"}},"title":"DataEvent","additionalProperties":false},"process.StreamInputRequest.KeepAlive":{"type":"object","title":"KeepAlive","additionalProperties":false},"process.StreamInputRequest.StartEvent":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"}},"title":"StartEvent","additionalProperties":false},"process.StreamInputResponse":{"type":"object","title":"StreamInputResponse","additionalProperties":false},"process.UpdateRequest":{"type":"object","properties":{"process":{"title":"process","$ref":"#/components/schemas/process.ProcessSelector"},"pty":{"oneOf":[{"$ref":"#/components/schemas/process.PTY"},{"type":"null"}],"title":"pty"}},"title":"UpdateRequest","additionalProperties":false},"process.UpdateResponse":{"type":"object","title":"UpdateResponse","additionalProperties":false},"TeamUser":{"required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the user"},"email":{"type":["string","null"],"deprecated":true,"default":null,"description":"Email of the user"}},"type":"object"},"TemplateUpdateRequest":{"properties":{"public":{"type":"boolean","description":"Whether the template is public or only accessible by the team"}},"type":"object"},"TemplateUpdateResponse":{"required":["names"],"properties":{"names":{"type":"array","description":"Names of the template (namespace/alias format when namespaced)","items":{"type":"string"}}},"type":"object"},"CPUCount":{"type":"integer","format":"int32","minimum":1,"description":"CPU cores for the sandbox"},"MemoryMB":{"type":"integer","format":"int32","minimum":128,"description":"Memory for the sandbox in MiB"},"DiskSizeMB":{"type":"integer","format":"int32","minimum":0,"description":"Disk size for the sandbox in MiB"},"MinFreeDiskMb":{"type":"integer","format":"int32","minimum":0,"description":"Requested minimum free space after the template's build steps, in MiB. Omit to use the team's default. Set to 0 to request no minimum free-disk growth. The filesystem is never shrunk, including inherited or already-larger filesystems. Growth is best effort, so filesystem metadata can leave the available space slightly below the requested minimum."},"EnvdVersion":{"type":"string","description":"Version of the envd running in the sandbox"},"SandboxMetadata":{"additionalProperties":{"type":"string","description":"Metadata of the sandbox"},"type":"object"},"SandboxState":{"type":"string","description":"State of the sandbox","enum":["running","paused"]},"OrderDirection":{"type":"string","description":"Sort direction","default":"desc","enum":["asc","desc"]},"SnapshotInfo":{"type":"object","required":["snapshotID","names"],"properties":{"snapshotID":{"type":"string","description":"Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default)."},"names":{"type":"array","items":{"type":"string"},"description":"Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2)"}}},"Mcp":{"type":["object","null"],"description":"MCP configuration for the sandbox","additionalProperties":{}},"SandboxNetworkConfig":{"type":"object","properties":{"allowPublicTraffic":{"type":"boolean","default":true,"description":"Specify if the sandbox URLs should be accessible only with authentication."},"allowOut":{"type":"array","description":"List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. \"8.8.8.8/32\"), a bare IP address (e.g. \"8.8.8.8\"), or a domain name (e.g. \"example.com\", \"*.example.com\"). Allowed entries always take precedence over denied entries.","items":{"type":"string"}},"denyOut":{"type":"array","description":"List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.","items":{"type":"string"}},"egressProxy":{"$ref":"#/components/schemas/SandboxEgressProxyConfig"},"maskRequestHost":{"type":"string","description":"Specify host mask which will be used for all sandbox requests"},"httpsPorts":{"type":"array","description":"Sandbox ports that serve HTTPS rather than plaintext HTTP. Affects how the proxy reaches the service inside the sandbox; the public URL is HTTPS either way. Certificates are not verified, so self-signed ones work. The envd port (49983) cannot be listed.","maxItems":128,"uniqueItems":true,"items":{"type":"integer","format":"uint32","minimum":1,"maximum":65535}},"rules":{"type":"object","description":"Per-domain transform rules applied to matching outbound HTTPS requests. Keys may be exact DNS names (for example, \"api.example.com\") or a leading wildcard (for example, \"*.example.com\"), and are normalized to lowercase on write. Wildcards match subdomains at any depth but not the apex domain; a bare \"*\" is invalid. Exact rules take precedence, followed by the longest matching wildcard suffix, and matching rule sets are not merged. Broad wildcards such as \"*.com\" are allowed and may expose transformed credentials to every matching destination the sandbox contacts. Rules do not grant network access; configure allowOut separately to permit the destination.\n","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/SandboxNetworkRule"}}}}},"SandboxNetworkUpdateConfig":{"type":"object","description":"Network configuration update for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting a field clears it.","properties":{"allowOut":{"type":"array","description":"List of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. \"8.8.8.8/32\"), a bare IP address (e.g. \"8.8.8.8\"), or a domain name (e.g. \"example.com\", \"*.example.com\"). Allowed entries always take precedence over denied entries.","items":{"type":"string"}},"denyOut":{"type":"array","description":"List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.","items":{"type":"string"}},"egressProxy":{"$ref":"#/components/schemas/SandboxEgressProxyConfig"},"rules":{"type":"object","description":"Per-domain transform rules applied to matching outbound HTTPS requests. Replaces all existing rules when provided. Keys may be exact DNS names or a single leading wildcard (for example, \"*.example.com\"), and are normalized to lowercase on write. Wildcards match subdomains at any depth but not the apex domain; a bare \"*\" is invalid. Exact rules take precedence, followed by the longest matching wildcard suffix, and matching rule sets are not merged. Broad wildcards such as \"*.com\" are allowed and may expose transformed credentials to every matching destination the sandbox contacts. Rules do not grant network access; configure allowOut separately to permit the destination.\n","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/SandboxNetworkRule"}}},"allow_internet_access":{"type":"boolean","description":"Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config."}}},"SandboxNetworkRule":{"type":"object","description":"Transform rule applied to egress requests matching a domain pattern.","properties":{"transform":{"$ref":"#/components/schemas/SandboxNetworkTransform"}}},"SandboxNetworkTransform":{"type":"object","description":"Transformations applied to matching egress requests before forwarding.","properties":{"headers":{"type":"object","description":"HTTP headers to inject or override in matching requests. An existing header with the same name is replaced. Values are plain strings; secret resolution happens client-side before sending to the API.\n","additionalProperties":{"type":"string"}}}},"SandboxEgressProxyConfig":{"type":["object","null"],"description":"SOCKS5 proxy for sandbox egress. Outbound TCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows use remote DNS (ATYP=domain).","required":["address"],"properties":{"address":{"type":"string","description":"SOCKS5 proxy address in host:port format (e.g. \"proxy.example.com:1080\")."},"username":{"type":"string","maxLength":255,"description":"Optional SOCKS5 username (RFC 1929), max 255 bytes."},"password":{"type":"string","maxLength":255,"description":"Optional SOCKS5 password (RFC 1929), max 255 bytes."},"tls":{"$ref":"#/components/schemas/SandboxEgressProxyTLSConfig"}}},"SandboxEgressProxyTLSConfig":{"type":["object","null"],"description":"TLS for the connection to the SOCKS5 proxy. The SOCKS5 negotiation and the tunneled traffic both run inside the TLS session, so the proxy credentials are not sent in the clear. This secures only the hop to the proxy; what the proxy does onward is its own concern. A half-close from the sandbox reaches the proxy as a TLS close_notify, not a TCP FIN, and a proxy that treats close_notify as a full close cuts the reply short.","required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Connect to the proxy over TLS. When false, no other field in this object may be set."},"serverName":{"type":"string","maxLength":253,"description":"Name to verify the proxy certificate against, and to send as SNI. Defaults to the host part of address. Set this only when the certificate does not match the address the proxy is reached at."},"caCert":{"type":"string","maxLength":8192,"description":"One or more PEM-encoded certificates to verify the proxy against, for a proxy fronted by a private CA. These replace the system trust store, which is what is used when this is omitted. The system trust store depends on the host the orchestrator runs on, so set this to get the same verification everywhere."}}},"SandboxAutoResumeEnabled":{"type":"boolean","description":"Auto-resume enabled flag for paused sandboxes. Default false.","default":false},"SandboxAutoResumeConfig":{"type":"object","description":"Auto-resume configuration for paused sandboxes.","required":["enabled"],"properties":{"enabled":{"$ref":"#/components/schemas/SandboxAutoResumeEnabled"}}},"SandboxOnTimeout":{"type":"string","description":"Action taken when the sandbox times out.","enum":["kill","pause"]},"SandboxLifecycle":{"type":"object","description":"Sandbox lifecycle policy returned by sandbox info.","required":["autoResume","onTimeout"],"properties":{"autoResume":{"type":"boolean","description":"Whether the sandbox can auto-resume."},"onTimeout":{"$ref":"#/components/schemas/SandboxOnTimeout"}}},"SandboxLog":{"description":"Log entry with timestamp and line","required":["timestamp","line"],"properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the log entry"},"line":{"type":"string","description":"Log line content"}},"type":"object"},"SandboxLogEntry":{"required":["timestamp","level","message","fields"],"properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the log entry"},"message":{"type":"string","description":"Log message content"},"level":{"$ref":"#/components/schemas/LogLevel"},"fields":{"type":"object","additionalProperties":{"type":"string"}}},"type":"object"},"SandboxLogs":{"required":["logs","logEntries"],"properties":{"logs":{"description":"Logs of the sandbox","type":"array","items":{"$ref":"#/components/schemas/SandboxLog"}},"logEntries":{"description":"Structured logs of the sandbox","type":"array","items":{"$ref":"#/components/schemas/SandboxLogEntry"}}},"type":"object"},"SandboxLogsV2Response":{"required":["logs"],"properties":{"logs":{"default":[],"description":"Sandbox logs structured","type":"array","items":{"$ref":"#/components/schemas/SandboxLogEntry"}}},"type":"object"},"SandboxMetric":{"description":"Metric entry with timestamp and line","required":["timestamp","timestampUnix","cpuCount","cpuUsedPct","memUsed","memTotal","memCache","diskUsed","diskTotal"],"properties":{"timestamp":{"type":"string","format":"date-time","deprecated":true,"description":"Timestamp of the metric entry"},"timestampUnix":{"type":"integer","format":"int64","description":"Timestamp of the metric entry in Unix time (seconds since epoch)"},"cpuCount":{"type":"integer","format":"int32","description":"Number of CPU cores"},"cpuUsedPct":{"type":"number","format":"float","description":"CPU usage percentage"},"memUsed":{"type":"integer","format":"int64","description":"Memory used in bytes"},"memTotal":{"type":"integer","format":"int64","description":"Total memory in bytes"},"memCache":{"type":"integer","format":"int64","description":"Cached memory (page cache) in bytes"},"diskUsed":{"type":"integer","format":"int64","description":"Disk used in bytes"},"diskTotal":{"type":"integer","format":"int64","description":"Total disk space in bytes"}},"type":"object"},"SandboxVolumeMount":{"type":"object","properties":{"name":{"type":"string","description":"Name of the volume"},"path":{"type":"string","description":"Path of the volume"}},"required":["name","path"]},"Sandbox":{"required":["templateID","sandboxID","clientID","envdVersion"],"properties":{"templateID":{"type":"string","description":"Identifier of the template from which is the sandbox created"},"sandboxID":{"type":"string","description":"Identifier of the sandbox"},"alias":{"type":"string","description":"Alias of the template"},"clientID":{"type":"string","deprecated":true,"description":"Identifier of the client"},"envdVersion":{"$ref":"#/components/schemas/EnvdVersion"},"envdAccessToken":{"type":"string","description":"Access token used for envd communication"},"trafficAccessToken":{"type":["string","null"],"description":"Token required for accessing sandbox via proxy."},"domain":{"type":["string","null"],"description":"Base domain where the sandbox traffic is accessible"}},"type":"object"},"SandboxDetail":{"required":["templateID","sandboxID","clientID","startedAt","cpuCount","memoryMB","diskSizeMB","endAt","state","envdVersion"],"properties":{"templateID":{"type":"string","description":"Identifier of the template from which is the sandbox created"},"alias":{"type":"string","description":"Alias of the template"},"sandboxID":{"type":"string","description":"Identifier of the sandbox"},"clientID":{"type":"string","deprecated":true,"description":"Identifier of the client"},"startedAt":{"type":"string","format":"date-time","description":"Time when the sandbox was started"},"endAt":{"type":"string","format":"date-time","description":"Time when the sandbox will expire"},"envdVersion":{"$ref":"#/components/schemas/EnvdVersion"},"envdAccessToken":{"type":"string","description":"Access token used for envd communication"},"allowInternetAccess":{"type":["boolean","null"],"description":"Whether internet access was explicitly enabled or disabled for the sandbox. Null means it was not explicitly set."},"domain":{"type":["string","null"],"description":"Base domain where the sandbox traffic is accessible"},"cpuCount":{"$ref":"#/components/schemas/CPUCount"},"memoryMB":{"$ref":"#/components/schemas/MemoryMB"},"diskSizeMB":{"$ref":"#/components/schemas/DiskSizeMB"},"metadata":{"$ref":"#/components/schemas/SandboxMetadata"},"state":{"$ref":"#/components/schemas/SandboxState"},"network":{"$ref":"#/components/schemas/SandboxNetworkConfig"},"lifecycle":{"$ref":"#/components/schemas/SandboxLifecycle"},"volumeMounts":{"type":"array","items":{"$ref":"#/components/schemas/SandboxVolumeMount"}}},"type":"object"},"ListedSandbox":{"required":["templateID","sandboxID","clientID","startedAt","cpuCount","memoryMB","diskSizeMB","endAt","state","envdVersion"],"properties":{"templateID":{"type":"string","description":"Identifier of the template from which is the sandbox created"},"alias":{"type":"string","description":"Alias of the template"},"sandboxID":{"type":"string","description":"Identifier of the sandbox"},"clientID":{"type":"string","deprecated":true,"description":"Identifier of the client"},"startedAt":{"type":"string","format":"date-time","description":"Time when the sandbox was started"},"endAt":{"type":"string","format":"date-time","description":"Time when the sandbox will expire"},"cpuCount":{"$ref":"#/components/schemas/CPUCount"},"memoryMB":{"$ref":"#/components/schemas/MemoryMB"},"diskSizeMB":{"$ref":"#/components/schemas/DiskSizeMB"},"metadata":{"$ref":"#/components/schemas/SandboxMetadata"},"state":{"$ref":"#/components/schemas/SandboxState"},"envdVersion":{"$ref":"#/components/schemas/EnvdVersion"},"volumeMounts":{"type":"array","items":{"$ref":"#/components/schemas/SandboxVolumeMount"}}},"type":"object"},"SandboxesWithMetrics":{"required":["sandboxes"],"properties":{"sandboxes":{"additionalProperties":{"$ref":"#/components/schemas/SandboxMetric"}}},"type":"object"},"NewSandbox":{"required":["templateID"],"properties":{"templateID":{"type":"string","description":"Identifier of the required template"},"timeout":{"type":"integer","format":"int32","minimum":0,"default":15,"description":"Time to live for the sandbox in seconds."},"autoPause":{"type":"boolean","default":false,"description":"Automatically pauses the sandbox after the timeout"},"autoPauseMemory":{"type":"boolean","default":true,"description":"Controls the snapshot kind taken when the sandbox auto-pauses on timeout (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only the filesystem (a filesystem-only snapshot); resuming it cold-boots (reboots) the sandbox from disk. Such a snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with autoResume. Defaults to true (full memory snapshot)."},"autoResume":{"$ref":"#/components/schemas/SandboxAutoResumeConfig"},"secure":{"type":"boolean","description":"Secure all system communication with sandbox"},"allow_internet_access":{"type":"boolean","description":"Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config."},"network":{"$ref":"#/components/schemas/SandboxNetworkConfig"},"metadata":{"$ref":"#/components/schemas/SandboxMetadata"},"envVars":{"$ref":"#/components/schemas/EnvVars"},"mcp":{"$ref":"#/components/schemas/Mcp"},"iam":{"$ref":"#/components/schemas/SandboxIam"},"volumeMounts":{"type":"array","items":{"$ref":"#/components/schemas/SandboxVolumeMount"}}},"type":"object"},"NewSandboxV2":{"description":"Sandbox creation request. All system communication with the sandbox is always secured; the template's envd version must support secured access.","required":["templateID"],"properties":{"templateID":{"type":"string","description":"Identifier of the required template"},"timeout":{"type":"integer","format":"int32","minimum":1,"default":300,"description":"Time to live for the sandbox in seconds."},"autoPause":{"type":"boolean","default":false,"description":"Automatically pauses the sandbox after the timeout"},"autoPauseMemory":{"type":"boolean","default":true,"description":"Controls the snapshot kind taken when the sandbox auto-pauses on timeout (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only the filesystem (a filesystem-only snapshot); resuming it cold-boots (reboots) the sandbox from disk. Such a snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with autoResume. Defaults to true (full memory snapshot)."},"autoResume":{"$ref":"#/components/schemas/SandboxAutoResumeConfig"},"allow_internet_access":{"type":"boolean","description":"Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config."},"network":{"$ref":"#/components/schemas/SandboxNetworkConfig"},"metadata":{"$ref":"#/components/schemas/SandboxMetadata"},"envVars":{"$ref":"#/components/schemas/EnvVars"},"mcp":{"$ref":"#/components/schemas/Mcp"},"iam":{"$ref":"#/components/schemas/SandboxIam"},"volumeMounts":{"type":"array","items":{"$ref":"#/components/schemas/SandboxVolumeMount"}}},"type":"object"},"SandboxIam":{"type":"object","description":"Sandbox workload identity configuration. A non-empty, valid tokens map enables workload identity for the sandbox.","properties":{"tokens":{"$ref":"#/components/schemas/SandboxIamTokens"}}},"SandboxIamTokens":{"type":"object","description":"Named workload-token definitions, keyed by a caller-chosen token name.","additionalProperties":{"$ref":"#/components/schemas/SandboxIamToken"}},"SandboxIamToken":{"type":"object","required":["audience","tokenType"],"properties":{"audience":{"type":"string","description":"Audience of the workload token, stored exactly as provided."},"tokenType":{"type":"string","description":"Workload token type."}}},"ResumedSandbox":{"properties":{"timeout":{"type":"integer","format":"int32","minimum":0,"default":15,"description":"Time to live for the sandbox in seconds."},"autoPause":{"type":"boolean","deprecated":true,"description":"Automatically pauses the sandbox after the timeout"},"memory":{"type":"boolean","description":"Defaults to true. When false, resume from disk state only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory. Rejected with an error in environments where this capability is not enabled, never silently downgraded to a memory restore."}},"type":"object"},"ConnectSandbox":{"type":"object","required":["timeout"],"properties":{"timeout":{"description":"Timeout in seconds from the current time after which the sandbox should expire","type":"integer","format":"int32","minimum":0},"memory":{"type":"boolean","description":"Defaults to true. When false and the sandbox is paused, resume from disk state only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory. Rejected with an error in environments where this capability is not enabled, never silently downgraded to a memory restore."}}},"ConnectSandboxV2":{"type":"object","properties":{"timeout":{"description":"Timeout in seconds from the current time after which the sandbox should expire","type":"integer","format":"int32","minimum":1,"default":300},"memory":{"type":"boolean","description":"Defaults to true. When false and the sandbox is paused, resume from disk state only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory. Rejected with an error in environments where this capability is not enabled, never silently downgraded to a memory restore."}}},"SandboxTimeoutRequest":{"type":"object","required":["timeout"],"properties":{"timeout":{"description":"Timeout in seconds from the current time after which the sandbox should expire","type":"integer","format":"int32","minimum":0}}},"SandboxRefreshRequest":{"type":"object","properties":{"duration":{"description":"Duration for which the sandbox should be kept alive in seconds","type":"integer","maximum":3600,"minimum":0}}},"SandboxSnapshotRequest":{"type":"object","properties":{"name":{"type":"string","description":"Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one."},"memory":{"type":"boolean","description":"Whether to capture a full memory snapshot. When false, only the filesystem is persisted: the snapshot is smaller and faster to take, and sandboxes created from it cold-boot (start fresh from disk) instead of restoring memory, so they begin without the source sandbox's running processes, in-memory state, and open connections. The source sandbox keeps running in both cases. Defaults to true."}}},"SandboxPauseRequest":{"type":"object","properties":{"memory":{"type":"boolean","default":true,"description":"Whether to capture a full memory snapshot. When false, only the filesystem is persisted and resuming the sandbox cold-boots (reboots) it from disk, losing in-memory state, running processes, and open connections. Resume it with an explicit request (connect or resume); auto-resume, which can be triggered by arbitrary traffic, refuses such a sandbox. Defaults to true."}}},"SandboxForkRequest":{"type":"object","properties":{"timeout":{"type":"integer","format":"int32","minimum":0,"default":15,"description":"Time to live for the new forked sandboxes in seconds."},"count":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":1,"description":"Number of forked sandboxes to create. All forks boot from the same snapshot, so the snapshot is captured once regardless of count. Each fork succeeds or fails independently; the outcome of each is reported in its entry of the response list."}}},"SandboxForkResult":{"type":"object","description":"Result of one requested fork. Exactly one of sandbox or error is set: sandbox when the fork started successfully, error when it failed to start.","properties":{"sandbox":{"$ref":"#/components/schemas/Sandbox"},"error":{"$ref":"#/components/schemas/Error"}}},"TeamMetric":{"description":"Team metric with timestamp","required":["timestamp","timestampUnix","concurrentSandboxes","sandboxStartRate"],"properties":{"timestamp":{"type":"string","format":"date-time","deprecated":true,"description":"Timestamp of the metric entry"},"timestampUnix":{"type":"integer","format":"int64","description":"Timestamp of the metric entry in Unix time (seconds since epoch)"},"concurrentSandboxes":{"type":"integer","format":"int32","description":"The number of concurrent sandboxes for the team"},"sandboxStartRate":{"type":"number","format":"float","description":"Number of sandboxes started per second"}},"type":"object"},"MaxTeamMetric":{"description":"Team metric with timestamp","required":["timestamp","timestampUnix","value"],"properties":{"timestamp":{"type":"string","format":"date-time","deprecated":true,"description":"Timestamp of the metric entry"},"timestampUnix":{"type":"integer","format":"int64","description":"Timestamp of the metric entry in Unix time (seconds since epoch)"},"value":{"type":"number","description":"The maximum value of the requested metric in the given interval"}},"type":"object"},"Template":{"required":["templateID","buildID","cpuCount","memoryMB","diskSizeMB","public","createdAt","updatedAt","createdBy","lastSpawnedAt","spawnCount","buildCount","envdVersion","aliases","names","buildStatus"],"properties":{"templateID":{"type":"string","description":"Identifier of the template"},"buildID":{"type":"string","description":"Identifier of the last successful build for given template"},"cpuCount":{"description":"Resource allocation for the latest build, or 0 when build resources are unavailable.","anyOf":[{"$ref":"#/components/schemas/CPUCount"},{"type":"integer","const":0}]},"memoryMB":{"description":"Resource allocation for the latest build, or 0 when build resources are unavailable.","anyOf":[{"$ref":"#/components/schemas/MemoryMB"},{"type":"integer","const":0}]},"diskSizeMB":{"$ref":"#/components/schemas/DiskSizeMB"},"public":{"type":"boolean","description":"Whether the template is public or only accessible by the team"},"aliases":{"type":"array","description":"Aliases of the template","deprecated":true,"items":{"type":"string"}},"names":{"type":"array","description":"Names of the template (namespace/alias format when namespaced)","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Time when the template was created"},"updatedAt":{"type":"string","format":"date-time","description":"Time when the template was last updated"},"createdBy":{"oneOf":[{"$ref":"#/components/schemas/TeamUser"},{"type":"null"}]},"lastSpawnedAt":{"type":["string","null"],"format":"date-time","description":"Time when the template was last used"},"spawnCount":{"type":"integer","format":"int64","description":"Number of times the template was used"},"buildCount":{"type":"integer","format":"int32","description":"Number of times the template was built"},"envdVersion":{"$ref":"#/components/schemas/EnvdVersion"},"buildStatus":{"$ref":"#/components/schemas/TemplateBuildStatus"}},"type":"object"},"TemplateRequestResponseV3":{"required":["templateID","buildID","public","aliases","names","tags"],"properties":{"templateID":{"type":"string","description":"Identifier of the template"},"buildID":{"type":"string","description":"Identifier of the last successful build for given template"},"public":{"type":"boolean","description":"Whether the template is public or only accessible by the team"},"names":{"type":"array","description":"Names of the template","items":{"type":"string"}},"tags":{"type":"array","description":"Tags assigned to the template build","items":{"type":"string"}},"aliases":{"type":"array","description":"Aliases of the template","deprecated":true,"items":{"type":"string"}}},"type":"object"},"TemplateBuild":{"required":["buildID","status","createdAt","updatedAt","cpuCount","memoryMB"],"properties":{"buildID":{"type":"string","format":"uuid","description":"Identifier of the build"},"status":{"$ref":"#/components/schemas/TemplateBuildStatus"},"createdAt":{"type":"string","format":"date-time","description":"Time when the build was created"},"updatedAt":{"type":"string","format":"date-time","description":"Time when the build was last updated"},"finishedAt":{"type":"string","format":"date-time","description":"Time when the build was finished"},"cpuCount":{"$ref":"#/components/schemas/CPUCount"},"memoryMB":{"$ref":"#/components/schemas/MemoryMB"},"diskSizeMB":{"$ref":"#/components/schemas/DiskSizeMB"},"envdVersion":{"$ref":"#/components/schemas/EnvdVersion"}},"type":"object"},"TemplateWithBuilds":{"required":["templateID","public","aliases","names","createdAt","updatedAt","lastSpawnedAt","spawnCount","builds"],"properties":{"templateID":{"type":"string","description":"Identifier of the template"},"public":{"type":"boolean","description":"Whether the template is public or only accessible by the team"},"aliases":{"type":"array","description":"Aliases of the template","deprecated":true,"items":{"type":"string"}},"names":{"type":"array","description":"Names of the template (namespace/alias format when namespaced)","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Time when the template was created"},"updatedAt":{"type":"string","format":"date-time","description":"Time when the template was last updated"},"lastSpawnedAt":{"type":["string","null"],"format":"date-time","description":"Time when the template was last used"},"spawnCount":{"type":"integer","format":"int64","description":"Number of times the template was used"},"builds":{"type":"array","description":"List of builds for the template","items":{"$ref":"#/components/schemas/TemplateBuild"}}},"type":"object"},"TemplateAliasResponse":{"required":["templateID","public"],"properties":{"templateID":{"type":"string","description":"Identifier of the template"},"public":{"type":"boolean","description":"Whether the template is public or only accessible by the team"}},"type":"object"},"TemplateStep":{"description":"Step in the template build process","required":["type"],"properties":{"type":{"type":"string","description":"Type of the step"},"args":{"default":[],"type":"array","description":"Arguments for the step","items":{"type":"string"}},"filesHash":{"type":"string","description":"Hash of the files used in the step"},"force":{"default":false,"type":"boolean","description":"Whether the step should be forced to run regardless of the cache"}},"type":"object"},"TemplateBuildRequestV3":{"properties":{"name":{"description":"Name of the template. Can include a tag with colon separator (e.g. \"my-template\" or \"my-template:v1\"). If tag is included, it will be treated as if the tag was provided in the tags array.","type":"string","maxLength":128},"tags":{"type":"array","description":"Tags to assign to the template build","items":{"type":"string"}},"alias":{"description":"Alias of the template. Deprecated, use name instead.","type":"string","maxLength":128,"deprecated":true},"teamID":{"deprecated":true,"type":"string","description":"Identifier of the team, as its UUID or its public project ID (prj_)"},"cpuCount":{"$ref":"#/components/schemas/CPUCount"},"memoryMB":{"$ref":"#/components/schemas/MemoryMB"},"minFreeDiskMb":{"$ref":"#/components/schemas/MinFreeDiskMb"}},"type":"object"},"FromImageRegistry":{"oneOf":[{"$ref":"#/components/schemas/AWSRegistry"},{"$ref":"#/components/schemas/GCPRegistry"},{"$ref":"#/components/schemas/GeneralRegistry"}],"discriminator":{"propertyName":"type","mapping":{"aws":"#/components/schemas/AWSRegistry","gcp":"#/components/schemas/GCPRegistry","registry":"#/components/schemas/GeneralRegistry"}}},"AWSRegistry":{"type":"object","required":["type","awsAccessKeyId","awsSecretAccessKey","awsRegion"],"properties":{"type":{"type":"string","enum":["aws"],"description":"Type of registry authentication"},"awsAccessKeyId":{"type":"string","description":"AWS Access Key ID for ECR authentication"},"awsSecretAccessKey":{"type":"string","description":"AWS Secret Access Key for ECR authentication"},"awsRegion":{"type":"string","description":"AWS Region where the ECR registry is located"}}},"GCPRegistry":{"type":"object","required":["type","serviceAccountJson"],"properties":{"type":{"type":"string","enum":["gcp"],"description":"Type of registry authentication"},"serviceAccountJson":{"type":"string","description":"Service Account JSON for GCP authentication"}}},"GeneralRegistry":{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["registry"],"description":"Type of registry authentication"},"username":{"type":"string","description":"Username to use for the registry"},"password":{"type":"string","description":"Password to use for the registry"}}},"TemplateBuildStartV2":{"type":"object","description":"Exactly one of fromImage or fromTemplate must be given and non-empty.","properties":{"fromImage":{"type":"string","minLength":1,"description":"Image to use as a base for the template build"},"fromTemplate":{"type":"string","minLength":1,"description":"Template to use as a base for the template build"},"fromImageRegistry":{"$ref":"#/components/schemas/FromImageRegistry"},"force":{"default":false,"type":"boolean","description":"Whether the whole build should be forced to run regardless of the cache"},"steps":{"default":[],"description":"List of steps to execute in the template build","type":"array","items":{"$ref":"#/components/schemas/TemplateStep"}},"startCmd":{"description":"Start command to execute in the template after the build","type":"string"},"readyCmd":{"description":"Ready check command to execute in the template after the build","type":"string"}}},"TemplateBuildFileUpload":{"required":["present"],"properties":{"present":{"type":"boolean","description":"Whether the file is already present in the cache"},"url":{"description":"Url where the file should be uploaded to","type":"string"},"headers":{"description":"Request headers that must be sent with the upload request","type":"object","additionalProperties":{"type":"string"}}},"type":"object"},"LogLevel":{"type":"string","description":"Severity level for log entries (e.g. info, warn, error)"},"BuildLogEntry":{"required":["timestamp","message","level"],"properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the log entry"},"message":{"type":"string","description":"Log message content"},"level":{"$ref":"#/components/schemas/LogLevel"},"step":{"type":"string","description":"Step in the build process related to the log entry"}},"type":"object"},"BuildStatusReason":{"required":["message"],"properties":{"message":{"type":"string","description":"Message with the status reason, currently reporting only for error status"},"step":{"type":"string","description":"Step that failed"},"logEntries":{"default":[],"description":"Log entries related to the status reason","type":"array","items":{"$ref":"#/components/schemas/BuildLogEntry"}}},"type":"object"},"TemplateBuildStatus":{"type":"string","description":"Status of the template build","enum":["building","waiting","ready","error","uploaded"]},"TemplateBuildInfo":{"required":["templateID","buildID","status","logs","logEntries"],"properties":{"logs":{"default":[],"deprecated":true,"description":"Build logs (always empty since the V1 build path was removed, use logEntries)","type":"array","items":{"type":"string"}},"logEntries":{"default":[],"description":"Build logs structured","type":"array","items":{"$ref":"#/components/schemas/BuildLogEntry"}},"templateID":{"type":"string","description":"Identifier of the template"},"buildID":{"type":"string","description":"Identifier of the build"},"status":{"$ref":"#/components/schemas/TemplateBuildStatus"},"reason":{"$ref":"#/components/schemas/BuildStatusReason"}},"type":"object"},"TemplateBuildLogsResponse":{"required":["logs"],"properties":{"logs":{"default":[],"description":"Build logs structured","type":"array","items":{"$ref":"#/components/schemas/BuildLogEntry"}}},"type":"object"},"LogsDirection":{"type":"string","description":"Direction of the logs that should be returned","enum":["forward","backward"],"x-enum-varnames":["LogsDirectionForward","LogsDirectionBackward"]},"LogsSource":{"type":"string","description":"Source of the logs that should be returned","enum":["temporary","persistent"],"x-enum-varnames":["LogsSourceTemporary","LogsSourcePersistent"]},"AssignedTemplateTags":{"required":["tags","buildID"],"properties":{"tags":{"type":"array","items":{"type":"string"},"description":"Assigned tags of the template"},"buildID":{"type":"string","format":"uuid","description":"Identifier of the build associated with these tags"}},"type":"object"},"TemplateTag":{"required":["tag","buildID","createdAt"],"properties":{"tag":{"type":"string","description":"The tag name"},"buildID":{"type":"string","format":"uuid","description":"Identifier of the build associated with this tag"},"createdAt":{"type":"string","format":"date-time","description":"Time when the tag was assigned"}},"type":"object"},"AssignTemplateTagsRequest":{"required":["target","tags"],"properties":{"target":{"type":"string","description":"Target template in \"name:tag\" format"},"tags":{"description":"Tags to assign to the template","type":"array","items":{"type":"string"}}},"type":"object"},"DeleteTemplateTagsRequest":{"required":["name","tags"],"properties":{"name":{"type":"string","description":"Name of the template"},"tags":{"description":"Tags to delete","type":"array","items":{"type":"string"}}},"type":"object"},"Volume":{"type":"object","properties":{"volumeID":{"type":"string","description":"ID of the volume"},"name":{"type":"string","description":"Name of the volume"}},"required":["volumeID","name"]},"VolumeAndToken":{"type":"object","properties":{"volumeID":{"type":"string","description":"ID of the volume"},"name":{"type":"string","description":"Name of the volume"},"token":{"type":"string","description":"Auth token to use for interacting with volume content"},"domain":{"type":"string","description":"Domain to use as the destination for volume content requests,\nreplacing the default `api.<E2B_DOMAIN>`. Only returned when the\nteam is connected to a custom (BYOC) cluster; absent otherwise, in\nwhich case the default domain is used.\n"}},"required":["volumeID","name","token"]},"NewVolume":{"type":"object","properties":{"name":{"type":"string","description":"Name of the volume","pattern":"^[a-zA-Z0-9_-]+$"}},"required":["name"]},"SecretMetadata":{"type":"object","description":"Customer metadata of the secret. Always present, empty when unset. At most 32 entries; keys are limited to 128 bytes, values to 1024 bytes, and a secret's metadata to 8192 bytes in total.\n","maxProperties":32,"additionalProperties":{"type":"string","maxLength":1024}},"Secret":{"type":"object","description":"Metadata of a secret. It never carries the secret value.","required":["secretID","name","currentVersion","metadata","createdAt","updatedAt"],"properties":{"secretID":{"type":"string","description":"Identifier of the secret"},"name":{"type":"string","description":"Name of the secret, unique within the project"},"currentVersion":{"type":"integer","format":"int64","description":"Version served to readers that do not name one"},"metadata":{"$ref":"#/components/schemas/SecretMetadata"},"createdAt":{"type":"string","format":"date-time","description":"Time when the secret was created"},"updatedAt":{"type":"string","format":"date-time","description":"Time when the secret was last updated"}}},"NewSecret":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Name of the secret, unique within the project. Names are lower-cased before storage and returned in that canonical form; the sec_ prefix is reserved for secret identifiers.\n"},"value":{"type":"string","description":"Runtime marker stored as the secret's first version. The runtime resolves it to a value at sandbox egress."},"metadata":{"$ref":"#/components/schemas/SecretMetadata"}}},"SecretUpdate":{"type":"object","required":["value"],"properties":{"value":{"type":"string","description":"Runtime marker stored as the secret's new version. The runtime resolves it to a value at sandbox egress."},"metadata":{"$ref":"#/components/schemas/SecretMetadata"}}},"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"},"WebhookCreate":{"description":"Configuration for registering new webhooks","required":["name","url","events","signatureSecret"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["sandbox.lifecycle.created","sandbox.lifecycle.killed","sandbox.lifecycle.paused","sandbox.lifecycle.resumed","sandbox.lifecycle.updated","sandbox.lifecycle.checkpointed"]},"example":["sandbox.lifecycle.created"]},"enabled":{"type":"boolean","default":true},"signatureSecret":{"type":"string","description":"Secret used to sign the webhook payloads","minLength":32,"example":"replace-with-your-random-signing-secret"}},"type":"object"},"WebhookCreation":{"description":"Webhook creation response","required":["id","name","createdAt","teamId","url","enabled","events"],"properties":{"id":{"type":"string","description":"Webhook unique identifier"},"name":{"type":"string","description":"Webhook user friendly name"},"createdAt":{"type":"string","format":"date-time","description":"Time when the template was created"},"teamId":{"type":"string","description":"Unique identifier for the team"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string"}}},"type":"object"},"WebhookDetail":{"description":"Webhook detail response","required":["id","teamId","name","createdAt","url","enabled","events"],"properties":{"id":{"type":"string","description":"Webhook unique identifier"},"teamId":{"type":"string","description":"Unique identifier for the team"},"name":{"type":"string","description":"Webhook user friendly name"},"createdAt":{"type":"string","format":"date-time","description":"Time when the template was created"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string"}}},"type":"object"},"WebhookConfiguration":{"description":"Configuration for updating existing webhooks","properties":{"enabled":{"type":"boolean"},"name":{"type":"string","description":"Webhook user friendly name"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["sandbox.lifecycle.created","sandbox.lifecycle.killed","sandbox.lifecycle.paused","sandbox.lifecycle.resumed","sandbox.lifecycle.updated","sandbox.lifecycle.checkpointed"]},"example":["sandbox.lifecycle.created"]},"signatureSecret":{"type":"string","description":"Secret used to sign the webhook payloads","minLength":32,"example":"replace-with-your-random-signing-secret"}},"type":"object"},"WebhookDelivery":{"description":"Webhook delivery attempt","required":["id","teamId","webhookId","eventId","sandboxId","eventType","status","durationMs","requestBody","requestHeaders","requestUrl","errorClass","timestamp"],"properties":{"id":{"type":"string","format":"uuid","description":"Delivery attempt identifier"},"teamId":{"type":"string","format":"uuid","description":"Team identifier"},"webhookId":{"type":"string","format":"uuid","description":"Webhook configuration identifier"},"eventId":{"type":"string","format":"uuid","description":"Sandbox event identifier"},"sandboxId":{"type":"string","description":"Sandbox identifier"},"eventType":{"type":"string","description":"Sandbox event type"},"status":{"type":"string","enum":["success","failed"],"description":"Delivery attempt status"},"durationMs":{"type":"integer","format":"int32","description":"Delivery request duration in milliseconds"},"requestBody":{"type":"string","description":"Serialized webhook request body"},"requestHeaders":{"type":"string","description":"JSON-encoded request headers with sensitive values redacted"},"requestUrl":{"type":"string","format":"uri","description":"URL attempted for this delivery"},"responseBody":{"type":["string","null"],"description":"Truncated response body, if a response was received"},"responseHeaders":{"type":["string","null"],"description":"JSON-encoded response headers, if a response was received"},"responseHttpStatusCode":{"type":["integer","null"],"format":"int32","description":"HTTP response status code, if a response was received"},"errorClass":{"type":["string","null"],"enum":["http_error","dns_error","timeout","transport_error","request_error","signature_error","canceled"],"description":"Machine-readable non-HTTP or HTTP failure class"},"errorMessage":{"type":["string","null"],"description":"Error message for failures without a useful response body"},"timestamp":{"type":"string","format":"date-time","description":"Time when the delivery attempt started"}},"type":"object"},"WebhookDeliveryStats":{"description":"Webhook delivery aggregate stats","required":["buckets","total","failed","durationMs"],"properties":{"buckets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryStatsBucket"}},"total":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"durationMs":{"$ref":"#/components/schemas/WebhookDeliveryDurationStats"}},"type":"object"},"WebhookDeliveryDurationStats":{"description":"Webhook delivery duration statistics in milliseconds","required":["minimum","average","maximum"],"properties":{"minimum":{"type":"number","format":"double"},"average":{"type":"number","format":"double"},"maximum":{"type":"number","format":"double"}},"type":"object"},"WebhookDeliveryStatsBucket":{"description":"Webhook delivery stats for a time bucket","required":["timestamp","total","failed","durationMs"],"properties":{"timestamp":{"type":"string","format":"date-time"},"total":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"durationMs":{"$ref":"#/components/schemas/WebhookDeliveryDurationStats"}},"type":"object"},"WebhookDeliveryGroup":{"description":"Webhook delivery attempts grouped by sandbox event","required":["eventId","eventType","sandboxId","attempts"],"properties":{"eventId":{"type":"string","format":"uuid"},"eventType":{"type":"string"},"sandboxId":{"type":"string"},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"type":"object"},"WebhookDeliveriesListPayload":{"description":"Paginated webhook delivery attempts grouped by event","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryGroup"}},"nextCursor":{"type":["string","null"],"description":"Cursor to pass to the next list request, or null when there is no next page."}},"type":"object"},"EnvdHTTPError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"description":"HTTP error from envd, with a numeric status code. Distinct from a Connect RPC error."},"ConnectRPCError":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Connect error code, such as not_found or invalid_argument."},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string","format":"byte"},"debug":{}}}}},"description":"Connect JSON error. The code is a string, unlike envd's numeric HTTP errors."},"ConnectEndStreamResponse":{"type":"object","description":"Decoded JSON payload of the final Connect frame (flags byte 2). An absent error indicates successful completion.","properties":{"error":{"$ref":"#/components/schemas/ConnectRPCError"},"metadata":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SandboxRoutingError":{"type":"object","required":["sandboxId","message","code"],"properties":{"sandboxId":{"type":"string"},"message":{"type":"string"},"code":{"type":"integer"}}}},"headers":{"XNextToken":{"description":"Cursor to fetch the next page of results, if more exist","schema":{"type":"string"}},"XTotalRunning":{"description":"Number of running sandboxes matching the filters, before pagination is applied. Only present when running sandboxes were requested.\n","schema":{"type":"integer","format":"int32"}}}},"tags":[{"name":"Sandboxes"},{"name":"Templates"},{"name":"Tags"},{"name":"Volumes"},{"name":"Envd"},{"name":"Filesystem"},{"name":"Process"},{"name":"Teams"},{"name":"Secrets"},{"name":"Events"},{"name":"Webhooks"}],"security":[]}