---
title: "List templates"
url: "https://real-estate-agency.apim.eu/apis/listing-creation/versions/ccce93aa-5880-49f4-849d-af24517f6c76/operations/listTemplates"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/listing-creation/versions/ccce93aa-5880-49f4-849d-af24517f6c76.md

# List templates

`GET` `/templates`

Operation ID: `listTemplates`

The agency's design templates, each with the sections it supports.

## Responses

- `200` - Templates
- `401` - Key is missing, revoked or invalid

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Listing Creation
  version: 1.0.0
servers:
  - url: https://api.realestateagency.example/v1
    description: Production
  - url: https://sandbox.api.realestateagency.example/v1
    description: Sandbox - data is reset nightly
paths:
  /templates:
    get:
      tags:
        - Templates
      summary: List templates
      description: The agency's design templates, each with the sections it supports.
      operationId: listTemplates
      responses:
        "200":
          description: Templates
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Template"
              example:
                data:
                  - id: tpl_classic
                    name: Classic
                    description: Understated layout with a large cover photo.
                    sections:
                      - location
                      - features
                      - energy
                      - floor_plan
                      - commission
                  - id: tpl_modern
                    name: Modern
                    description: Two-column layout with bold typography, for new-build projects.
                    sections:
                      - location
                      - features
                      - energy
        "401":
          $ref: "#/components/responses/NotAuthenticated"
security:
  - apiKey: []
components:
  schemas:
    Template:
      type: object
      properties:
        id:
          type: string
          example: tpl_classic
        name:
          type: string
          example: Classic
        description:
          type: string
          example: Understated layout with a large cover photo.
        sections:
          type: array
          items:
            $ref: "#/components/schemas/Section"
    Section:
      type: string
      description: Content block of the listing.
      enum:
        - location
        - features
        - energy
        - floor_plan
        - commission
        - neighborhood
        - history
    Error:
      type: object
      description: Uniform error format across all Real Estate Agency APIs.
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: mandatory_disclosure_missing
        message:
          type: string
          example: Mandatory disclosures from the energy certificate are missing for
            publication.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: energy_certificate.final_energy_demand_kwh
        reason:
          type: string
          example: missing
  responses:
    NotAuthenticated:
      description: Key is missing, revoked or invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: not_authenticated
            message: The API key is invalid or has been revoked.
            details: []
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Real Estate portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
