Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

E2B templates API

The templates API from E2B — 11 operation(s) for templates.

E2B templates API is one of 14 APIs that E2B publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 2 JSON Schema definitions.

Tagged areas include templates. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a JSON-LD context, and 2 JSON Schemas.

This API exposes 15 operations across 11 paths, and defines 32 schemas. It is described by OpenAPI 3.0.0, at version 0.1.0.

Requests are made against a single base URL, https://api.e2b.app.

15 operations 11 paths 32 schemas 1 DELETE6 GET2 PATCH6 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
0.1.0
Base URL
https://api.e2b.app
Authentication
API Key, HTTP Bearer, API Key, API Key, API Key
Resource Areas
1

Authentication & Security 5

E2B templates API declares 5 security schemes for authenticating requests. An API key is passed in the header as X-API-Key (ApiKeyAuth). It accepts HTTP bearer tokens (access_token) (AccessTokenAuth). An API key is passed in the header as X-Supabase-Token (Supabase1TokenAuth). An API key is passed in the header as X-Supabase-Team (Supabase2TeamAuth). An API key is passed in the header as X-Admin-Token (AdminTokenAuth).

Paths & Operations 15

Across 11 paths, the API surfaces 15 operations — 1 DELETE, 6 GET, 2 PATCH, 6 POST. Each is listed below with its method, path, parameters, and response codes.

templates 15
POST
/v3/templates
Create a new template
body → 202400401500
POST
/v2/templatesdeprecated
Create a new template
body → 202400401500
GET
/templates/{templateID}/files/{hash}
Get an upload link for a tar file containing build layer files
2 params → 201400401404500
GET
/templates
List all templates
1 param → 200401500
POST
/templatesdeprecated
Create a new template
body → 202400401500
GET
/templates/{templateID}
List all builds for a template
3 params → 200401500
POST
/templates/{templateID}deprecated
Rebuild an template
1 param body → 202401500
DELETE
/templates/{templateID}
Delete a template
1 param → 204401500
PATCH
/templates/{templateID}deprecated
Update template
1 param body → 200400401500
POST
/templates/{templateID}/builds/{buildID}deprecated
Start the build
2 params → 202401500
POST
/v2/templates/{templateID}/builds/{buildID}
Start the build
2 params body → 202401500
PATCH
/v2/templates/{templateID}
Update template
1 param body → 200400401500
GET
/templates/{templateID}/builds/{buildID}/status
Get template build info
5 params → 200401404500
GET
/templates/{templateID}/builds/{buildID}/logs
Get template build logs
7 params → 200401404500
GET
/templates/aliases/{alias}
Check if template with given alias exists
1 param → 200400403404500

Schemas 32

The contract defines 32 schemas that model the data the API accepts and returns. The most detailed are Template (16 properties), TemplateLegacy (14 properties), TemplateBuild (9 properties), TemplateWithBuilds (9 properties). Each schema is shown below with its type and property counts.

TemplateBuildInfo
object
6 properties 5 required
AWSRegistry
object
4 properties 4 required
TemplateBuildRequest
object
7 properties 1 required
TemplateStep
object
Step in the template build process
4 properties 1 required
DiskSizeMB
integer
Disk size for the sandbox in MiB
Template
object
16 properties 16 required
TemplateUpdateResponse
object
1 property 1 required
TemplateBuildRequestV3
object
6 properties
TeamUser
object
2 properties 2 required
BuildLogEntry
object
4 properties 3 required
TemplateWithBuilds
object
9 properties 9 required
TemplateBuildStartV2
object
7 properties
TemplateRequestResponseV3
object
6 properties 6 required
TemplateBuildRequestV2
object
4 properties 1 required
Error
object
2 properties 2 required
TemplateUpdateRequest
object
1 property
GCPRegistry
object
2 properties 2 required
LogLevel
string
State of the sandbox
TemplateBuild
object
9 properties 6 required
CPUCount
integer
CPU cores for the sandbox
MemoryMB
integer
Memory for the sandbox in MiB
EnvdVersion
string
Version of the envd running in the sandbox
TemplateAliasResponse
object
2 properties 2 required
GeneralRegistry
object
3 properties 3 required
BuildStatusReason
object
3 properties 1 required
LogsDirection
string
Direction of the logs that should be returned
TemplateLegacy
object
14 properties 14 required
TemplateBuildStatus
string
Status of the template build
TemplateBuildLogsResponse
object
1 property 1 required
LogsSource
string
Source of the logs that should be returned
FromImageRegistry
TemplateBuildFileUpload
object
2 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

e2b-dev-templates-api-openapi.yml Raw ↑

Other APIs E2B publishes across the network.

E2B Code Interpreter SDK
E2B Desktop Sandbox SDK
E2B access-tokens API
E2B admin API
E2B api-keys API
E2B auth API
E2B events API
E2B Health API
E2B sandboxes API
E2B snapshots API
E2B tags API
E2B volumes API