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

# Get template

> **Token scope:** `account` · `org` · `project` — read-only tokens allowed.

One template: upstream pin, services, and its required/optional variables. Public — no auth required.



## OpenAPI

````yaml /openapi/account.json get /templates/{code}
openapi: 3.1.0
info:
  title: InstaCloud API — Account level
  version: 0.1.0
  description: >-
    Endpoints that act as the token's owner: their organizations, their API
    tokens, and the public catalog. Creating an organization needs an
    account-wide token.


    Generated from the platform's own OpenAPI document
    (https://api.instacloud.com/openapi.json); see the [API
    overview](/reference/api/overview) for authentication and token scopes.
servers:
  - url: https://api.instacloud.com
    description: InstaCloud
security:
  - bearerAuth: []
tags:
  - name: Account
    description: The caller, their organizations and API tokens.
  - name: Catalog
    description: 'Public catalogs: templates and regions. No token needed.'
paths:
  /templates/{code}:
    get:
      tags:
        - Catalog
      summary: Get template
      description: >-
        **Token scope:** `account` · `org` · `project` — read-only tokens
        allowed.


        One template: upstream pin, services, and its required/optional
        variables. Public — no auth required.
      operationId: getTemplate
      parameters:
        - schema:
            type: string
          in: path
          name: code
          required: true
          description: template code (lower-kebab)
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  template:
                    $ref: '#/components/schemas/TemplateDetail'
                required:
                  - template
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    TemplateDetail:
      type: object
      properties:
        code:
          type: string
        version:
          type: string
        maintainer:
          type: string
        source:
          type: string
        name:
          type: string
        tagline:
          type: string
        category:
          type: string
        tags:
          type: array
          items:
            type: string
        upstream:
          description: the upstream pin (repo/image/pinned) from the manifest
          type: object
          additionalProperties: true
        services:
          description: the manifest's services map, keyed by service name
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TemplateManifestService'
        variables:
          type: object
          properties:
            required:
              type: array
              items:
                $ref: '#/components/schemas/TemplateVariable'
            optional:
              type: array
              items:
                $ref: '#/components/schemas/TemplateVariable'
        constraints:
          type: array
          items:
            type: object
            additionalProperties: true
        totalProjects:
          description: >-
            distinct PROJECTS that ever deployed this template (any outcome) —
            the adoption number; one project deploying repeatedly counts once
          type: integer
        activeProjects:
          description: >-
            distinct PROJECTS that still have at least one live service from a
            SUCCEEDED deployment of this template (service in creating/active;
            deleting, errored or deleted services do not keep a project active)
            — what a visitor reads as "running this now"
          type: integer
        successRate:
          description: >-
            share of the CONCLUDED deployments of this template that reached
            succeeded, as a whole percent. Denominator: deployments with status
            succeeded + failed + partial, EXCLUDING runs abandoned by a platform
            restart (a platform release must not count against a template) and
            excluding running deployments (not concluded). A partial deployment
            counts as a failure. This is a per-DEPLOYMENT rate, not per attempt:
            an idempotent retry reuses its deployment row. null (never 0) when
            nothing has concluded — no data is not 0%
          type:
            - integer
            - 'null'
        deploymentCount:
          description: cumulative DEPLOYMENT runs for this code
          type: integer
        activeDeploymentCount:
          description: >-
            DEPLOYMENT runs that succeeded and still have a live attributed
            service
          type: integer
        logoUrl:
          description: >-
            absolute https logo URL, served by the CDN in front of the public
            registry repo (cdn.jsdelivr.net) and pinned to the publishing merge
            SHA; null when the template published no logo. See
            templateManifest.ts TEMPLATE_LOGO_HOST for the enforced host.
          type:
            - string
            - 'null'
        license:
          description: >-
            the upstream project's license id, from the manifest's
            upstream.license; null when the manifest declares none
          type:
            - string
            - 'null'
        updatedAt:
          format: date-time
          description: when this template was last published — the catalog freshness stamp
          type: string
        readme:
          description: >-
            the template README as markdown (capped at publish — see
            templateManifest.ts TEMPLATE_README_MAX_BYTES); null when the
            template published none. Render with raw HTML disabled: the platform
            bounds its size, not its contents.
          type:
            - string
            - 'null'
        documentationUrl:
          description: >-
            the upstream project's own documentation link, from the manifest's
            meta.links.documentation; null when the manifest declares none
          type:
            - string
            - 'null'
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    TemplateManifestService:
      description: >-
        One entry of a manifest's services map, as parseTemplateManifest
        normalizes it. The four managed types, postgres, redis, mysql and
        mongodb, are declared bare: they carry none of image, build, port,
        healthcheck, volume or alwaysOn, because the platform owns all of it.
      type: object
      properties:
        type:
          type: string
          enum:
            - web
            - worker
            - postgres
            - redis
            - mysql
            - mongodb
        image:
          type: string
        build:
          type: string
        port:
          description: >-
            web only: the port the image listens on (8080 when omitted). A
            worker is portless and may not declare one — the platform runs it as
            port 0: nothing routed, no PORT env, no URL. A managed database may
            not declare one either: the platform owns its port.
          type: integer
        healthcheck:
          description: >-
            web only (required there): a path on the deployed service that the
            platform itself fetches. A worker has no HTTP endpoint and may not
            declare one — its health gate is the machine state. A managed
            database may not declare one: it is gated by the platform before any
            app deploys.
          type: string
        volume:
          description: >-
            needs a /data disk; the platform owns the size, a manifest never
            names one. A managed database may not declare one either: the
            platform owns its disk.
          type: boolean
        alwaysOn:
          description: >-
            idle mode at creation. Omitted = the platform default (compute is
            born always-on); explicit false = opt this service into
            scale-to-zero (refused on a worker: nothing is routed to it, so
            nothing could wake it); true = always-on, for work that arrives on
            an outbound connection. A managed database may not declare it
            either: the platform owns its idle policy.
          type: boolean
        env:
          $ref: '#/components/schemas/TemplateServiceEnv'
      required:
        - type
        - env
    TemplateVariable:
      description: >-
        One deploy-time template variable (env var), flattened out of the
        manifest.
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        required:
          type: boolean
        default:
          type: string
        generate:
          description: >-
            generator spec (secret:N) — the platform auto-generates the value
            when the caller supplies none
          type: string
        editable:
          type: boolean
      required:
        - name
    TemplateServiceEnv:
      description: The env a manifest service receives, normalized so every map is present.
      type: object
      properties:
        fixed:
          description: ENV_NAME → literal value
          type: object
          additionalProperties:
            type: string
        generated:
          description: ENV_NAME → "${<declared generator>}"
          type: object
          additionalProperties:
            type: string
        platform:
          description: >-
            ENV_NAME → "${{services.<name>.<CANONICAL_KEY>}}": a platform
            credential bound into this env by name; the value never leaves the
            secrets store
          type: object
          additionalProperties:
            type: string
        required:
          description: >-
            ENV_NAME → spec; the deploy fails with missing_variables when one
            resolves to no value
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TemplateVarSpec'
        optional:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TemplateVarSpec'
      required:
        - fixed
        - generated
        - platform
        - required
        - optional
    TemplateVarSpec:
      description: >-
        One variable as the manifest declares it, keyed by env name in the
        service's env maps.
      type: object
      properties:
        description:
          type: string
        default:
          type: string
        generate:
          description: >-
            generator spec (secret:N) — the platform auto-generates the value
            when the caller supplies none
          type: string
        editable:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Session access JWT or an API token (`insta_<prefix>_<secret>`).

````