> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e2b.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List default templates

> Lists the platform's default templates, ordered by template ID. Deleted templates are left out. Templates that are not public are listed only to their own team and to admin callers. The build, resources and envd version are those of the newest ready build tagged `default`, the one a sandbox started from the template runs, and are zero or empty when there is none; `buildStatus` describes the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.




## OpenAPI

````yaml /openapi-public.yaml get /default-templates
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
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Volumes
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
  - name: Secrets
  - name: Events
  - name: Webhooks
paths:
  /default-templates:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    get:
      tags:
        - Templates
      summary: List default templates
      description: >
        Lists the platform's default templates, ordered by template ID. Deleted
        templates are left out. Templates that are not public are listed only to
        their own team and to admin callers. The build, resources and envd
        version are those of the newest ready build tagged `default`, the one a
        sandbox started from the template runs, and are zero or empty when there
        is none; `buildStatus` describes the newest build tagged `default` in
        any state. Usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`,
        `createdBy`) are reported only for the caller's own templates and to
        admin callers.
      operationId: listDefault-templates
      responses:
        '200':
          description: Successfully returned the default templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Template'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 401
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                missingAuthentication:
                  summary: No supported authentication header was supplied
                  value:
                    code: 401
                    message: authorization header is missing
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 403
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                teamBanned:
                  summary: The team is banned at authentication
                  value:
                    code: 403
                    message: team is banned
        '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 (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                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 (a node could not create the sandbox
                      this time; retry), sandbox_create_refused (a node refused
                      the sandbox for a reason no retry changes, such as a vcpu
                      count out of bounds in the stored build; a server error,
                      since no request field reaches that check),
                      internal_server_error, secret_limit_reached,
                      idempotency_request_mismatch, idempotency_in_progress,
                      idempotency_outcome_unknown.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                operationFailed:
                  summary: The default-template query fails
                  value:
                    code: 500
                    message: Error when listing default templates
      security:
        - ApiKeyAuth: []
components:
  schemas:
    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'
        isDefault:
          type: boolean
          description: >
            Whether the template is one of the platform's default templates. A
            default template owned by another team carries zero or null usage
            fields (`spawnCount`, `buildCount`, `lastSpawnedAt`, `createdBy`).
        description:
          type: string
          description: Description of the template
      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
    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
    EnvdVersion:
      type: string
      description: Version of the envd running in the sandbox
    TemplateBuildStatus:
      type: string
      description: Status of the template build
      enum:
        - building
        - waiting
        - ready
        - error
        - uploaded
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````