# Retrieve the page template by ID

Retrieves the details of a specific page template, including its fields and settings. Use this endpoint to understand the structure and available fields of a template before creating a page.

Endpoint: GET /api/v1/pages/template-by-id
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Query parameters:

  - `templateId` (string, required)
    The unique identifier of the page template. To get this ID, you can use the [List templates of a site](#operation/sites-get_all_templates_by_site) endpoint.

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `templateId` (string)
    The unique identifier of the template.
    Example: 3f2504e0-4f89-11d3-9a0c-0305e82c3301

  - `name` (string)
    The name of the template.
    Example: Full Width Page

  - `fields` (array)
    A list of fields associated with the template.

  - `fields.name` (string)
    The name of the field.
    Example: Content

  - `fields.type` (string)
    The field type.
    Example: single-line text

  - `fields.validation` (boolean)
    Whether the field has validation rules.
    Example: false

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

