Encore Encore Framework API API

The Encore Framework API API from Encore — 1 operation(s) for encore framework api.

OpenAPI Specification

encore-dev-encore-framework-api-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Encore Framework Apps Encore Framework API API
  version: '1.57'
  description: 'Conceptual OpenAPI describing the runtime HTTP surface that the Encore framework

    (Encore.ts and Encore.go) exposes for every Encore application. This is not a

    single hosted API — it is the per-application surface generated by the framework

    when an api() / //encore:api declaration is parsed. Real endpoints, paths, and

    schemas are app-specific.

    '
  contact:
    name: Encore
    url: https://encore.dev
  license:
    name: MPL-2.0
    url: https://github.com/encoredev/encore/blob/main/LICENSE
servers:
- url: http://localhost:4000
  description: Local Encore dev server (encore run)
- url: https://staging-{app-id}.encr.app
  description: Encore Cloud staging environment
  variables:
    app-id:
      default: example
- url: https://{app-id}.encr.app
  description: Encore Cloud production environment
  variables:
    app-id:
      default: example
tags:
- name: Encore Framework API
paths:
  /{service}/{endpoint}:
    parameters:
    - name: service
      in: path
      required: true
      description: The Encore service name (the folder containing encore.service.ts or a Go package with //encore:service).
      schema:
        type: string
    - name: endpoint
      in: path
      required: true
      description: The api() / //encore:api endpoint name within the service.
      schema:
        type: string
    get:
      operationId: invokeEndpointGet
      summary: Invoke An Encore Endpoint
      description: 'Conceptual route showing how Encore exposes any api() declaration with `expose: true`.

        The real method, path, request schema, and response schema are derived from the developer''s

        TypeScript interface or Go struct at build time.

        '
      responses:
        '200':
          description: Endpoint response shaped by the application's declared response type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndpointResponse'
        '400':
          description: Validation error — request did not match the declared request schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthenticated — endpoint requires auth and no valid auth context was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Encore Framework API
components:
  schemas:
    Error:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Encore canonical error code (e.g. invalid_argument, unauthenticated, not_found).
          example: invalid_argument
        message:
          type: string
          example: Field "name" must not be empty.
        details:
          type: array
          items:
            type: object
            additionalProperties: true
    EndpointResponse:
      type: object
      description: Placeholder for the application-specific response shape derived from the declared response type.
      additionalProperties: true