Skip to main content
POST
/
v3
/
templates
cURL
curl --request POST \
  --url https://api.e2b.app/v3/templates \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "tags": [
    "<string>"
  ],
  "alias": "<string>",
  "teamID": "<string>",
  "cpuCount": 2,
  "memoryMB": 129
}
'
{
  "templateID": "<string>",
  "buildID": "<string>",
  "public": true,
  "names": [
    "<string>"
  ],
  "tags": [
    "<string>"
  ],
  "aliases": [
    "<string>"
  ]
}

Authorizations

X-API-Key
string
header
required

Body

application/json
name
string

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.

tags
string[]

Tags to assign to the template build

alias
string
deprecated

Alias of the template. Deprecated, use name instead.

teamID
string
deprecated

Identifier of the team

cpuCount
integer<int32>

CPU cores for the sandbox

Required range: x >= 1
memoryMB
integer<int32>

Memory for the sandbox in MiB

Required range: x >= 128

Response

The build was requested successfully

templateID
string
required

Identifier of the template

buildID
string
required

Identifier of the last successful build for given template

public
boolean
required

Whether the template is public or only accessible by the team

names
string[]
required

Names of the template

tags
string[]
required

Tags assigned to the template build

aliases
string[]
required
deprecated

Aliases of the template