LanzaTech template-parts API
The template-parts API from LanzaTech — 7 operation(s) for template-parts.
The template-parts API from LanzaTech — 7 operation(s) for template-parts.
openapi: 3.0.3
info:
title: LanzaTech WordPress REST block-directory template-parts API
version: wp/v2
description: 'The public WordPress REST API served by lanzatech.com. Derived faithfully from the provider''s own live discovery document at https://lanzatech.com/wp-json/ on 2026-07-19. Alongside the standard WordPress content types (posts, pages, media, categories, tags), LanzaTech publishes five custom content types that model the company itself: news (external news coverage), employee, board-member, download (published reports and life-cycle assessments) and testimonial. Read operations are publicly accessible without authentication; write operations require a WordPress application password.'
contact:
name: LanzaTech
url: https://lanzatech.com/contact/
termsOfService: https://lanzatech.com/terms-of-use/
x-generated: '2026-07-19'
x-method: derived
x-source: https://lanzatech.com/wp-json/
servers:
- url: https://lanzatech.com/wp-json
description: Production
tags:
- name: template-parts
paths:
/wp/v2/template-parts:
get:
operationId: listTemplateParts
summary: GET /wp/v2/template-parts
tags:
- template-parts
parameters:
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
- name: wp_id
in: query
required: false
description: Limit to the specified post id.
schema:
type: integer
- name: area
in: query
required: false
description: Limit to the specified template part area.
schema:
type: string
- name: post_type
in: query
required: false
description: Post type to get the templates for.
schema:
type: string
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
headers:
X-WP-Total:
description: Total items in the collection.
schema:
type: integer
X-WP-TotalPages:
description: Total pages in the collection.
schema:
type: integer
Link:
description: RFC 8288 pagination links (rel=next / rel=prev).
schema:
type: string
'400': &id001
$ref: '#/components/responses/Error'
'404': *id001
post:
operationId: createTemplateParts
summary: POST /wp/v2/template-parts
tags:
- template-parts
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
slug:
type: string
description: Unique slug identifying the template.
theme:
type: string
description: Theme identifier for the template.
type:
type: string
description: Type of template.
content:
type: object
default: ''
description: Content of template.
title:
type: object
default: ''
description: Title of template.
description:
type: string
default: ''
description: Description of template.
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
default: publish
description: Status of template.
author:
type: integer
description: The ID for the author of the template.
area:
type: string
description: Where the template part is intended for use (header, footer, etc.)
required:
- slug
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id002
$ref: '#/components/responses/Error'
'401': *id002
'403': *id002
'404': *id002
/wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+):
parameters:
- name: id
in: path
required: true
description: 'Route-matched value (WordPress route pattern: (?P<id>([^\).'
schema:
type: string
get:
operationId: getTemplateParts:<>\*\?"\|]+(?:\[^\:<>\*\?"\|]+)?)[\\w]+)ById
summary: GET /wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+)
tags:
- template-parts
parameters:
- name: id
in: query
required: false
description: The id of a template
schema:
type: string
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'404':
$ref: '#/components/responses/Error'
post:
operationId: createTemplateParts:<>\*\?"\|]+(?:\[^\:<>\*\?"\|]+)?)[\\w]+)ById
summary: POST /wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+)
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The id of a template
slug:
type: string
description: Unique slug identifying the template.
theme:
type: string
description: Theme identifier for the template.
type:
type: string
description: Type of template.
content:
type: object
description: Content of template.
title:
type: object
description: Title of template.
description:
type: string
description: Description of template.
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
description: Status of template.
author:
type: integer
description: The ID for the author of the template.
area:
type: string
description: Where the template part is intended for use (header, footer, etc.)
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id003
$ref: '#/components/responses/Error'
'401': *id003
'403': *id003
'404': *id003
put:
operationId: replaceTemplateParts:<>\*\?"\|]+(?:\[^\:<>\*\?"\|]+)?)[\\w]+)ById
summary: PUT /wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+)
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The id of a template
slug:
type: string
description: Unique slug identifying the template.
theme:
type: string
description: Theme identifier for the template.
type:
type: string
description: Type of template.
content:
type: object
description: Content of template.
title:
type: object
description: Title of template.
description:
type: string
description: Description of template.
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
description: Status of template.
author:
type: integer
description: The ID for the author of the template.
area:
type: string
description: Where the template part is intended for use (header, footer, etc.)
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id004
$ref: '#/components/responses/Error'
'401': *id004
'403': *id004
'404': *id004
patch:
operationId: updateTemplateParts:<>\*\?"\|]+(?:\[^\:<>\*\?"\|]+)?)[\\w]+)ById
summary: PATCH /wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+)
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The id of a template
slug:
type: string
description: Unique slug identifying the template.
theme:
type: string
description: Theme identifier for the template.
type:
type: string
description: Type of template.
content:
type: object
description: Content of template.
title:
type: object
description: Title of template.
description:
type: string
description: Description of template.
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
description: Status of template.
author:
type: integer
description: The ID for the author of the template.
area:
type: string
description: Where the template part is intended for use (header, footer, etc.)
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id005
$ref: '#/components/responses/Error'
'401': *id005
'403': *id005
'404': *id005
delete:
operationId: deleteTemplateParts:<>\*\?"\|]+(?:\[^\:<>\*\?"\|]+)?)[\\w]+)ById
summary: DELETE /wp/v2/template-parts/{id}/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)[\/\w-]+)
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The id of a template
force:
type: boolean
default: false
description: Whether to bypass Trash and force deletion.
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id006
$ref: '#/components/responses/Error'
'401': *id006
'403': *id006
'404': *id006
/wp/v2/template-parts/{id}/autosaves:
parameters:
- name: id
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
get:
operationId: getTemplatePartsAutosavesById
summary: GET /wp/v2/template-parts/{id}/autosaves
tags:
- template-parts
parameters:
- name: parent
in: query
required: false
description: The ID for the parent of the autosave.
schema:
type: integer
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'404':
$ref: '#/components/responses/Error'
post:
operationId: createTemplatePartsAutosavesById
summary: POST /wp/v2/template-parts/{id}/autosaves
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
parent:
type: integer
description: The ID for the parent of the autosave.
slug:
type: string
description: Unique slug identifying the template.
theme:
type: string
description: Theme identifier for the template.
type:
type: string
description: Type of template.
content:
type: object
description: Content of template.
title:
type: object
description: Title of template.
description:
type: string
description: Description of template.
status:
type: string
enum:
- publish
- future
- draft
- pending
- private
description: Status of template.
author:
type: integer
description: The ID for the author of the template.
area:
type: string
description: Where the template part is intended for use (header, footer, etc.)
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id007
$ref: '#/components/responses/Error'
'401': *id007
'403': *id007
'404': *id007
/wp/v2/template-parts/{parent}/autosaves/{id}:
parameters:
- name: parent
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
- name: id
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
get:
operationId: getTemplatePartsAutosavesByParentById
summary: GET /wp/v2/template-parts/{parent}/autosaves/{id}
tags:
- template-parts
parameters:
- name: parent
in: query
required: false
description: The ID for the parent of the autosave.
schema:
type: integer
- name: id
in: query
required: false
description: The ID for the autosave.
schema:
type: integer
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'404':
$ref: '#/components/responses/Error'
/wp/v2/template-parts/{parent}/revisions:
parameters:
- name: parent
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
get:
operationId: getTemplatePartsRevisionsByParent
summary: GET /wp/v2/template-parts/{parent}/revisions
tags:
- template-parts
parameters:
- name: parent
in: query
required: false
description: The ID for the parent of the revision.
schema:
type: integer
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
- name: page
in: query
required: false
description: Current page of the collection.
schema:
type: integer
default: 1
minimum: 1
- name: per_page
in: query
required: false
description: Maximum number of items to be returned in result set.
schema:
type: integer
minimum: 1
maximum: 100
- name: search
in: query
required: false
description: Limit results to those matching a string.
schema:
type: string
- name: exclude
in: query
required: false
description: Ensure result set excludes specific IDs.
schema:
type: array
default: []
items:
type: integer
- name: include
in: query
required: false
description: Limit result set to specific IDs.
schema:
type: array
default: []
items:
type: integer
- name: offset
in: query
required: false
description: Offset the result set by a specific number of items.
schema:
type: integer
- name: order
in: query
required: false
description: Order sort attribute ascending or descending.
schema:
type: string
enum:
- asc
- desc
default: desc
- name: orderby
in: query
required: false
description: Sort collection by object attribute.
schema:
type: string
enum:
- date
- id
- include
- relevance
- slug
- include_slugs
- title
default: date
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'404':
$ref: '#/components/responses/Error'
/wp/v2/template-parts/{parent}/revisions/{id}:
parameters:
- name: parent
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
- name: id
in: path
required: true
description: 'Route-matched value (WordPress route pattern: [\d]+).'
schema:
type: integer
get:
operationId: getTemplatePartsRevisionsByParentById
summary: GET /wp/v2/template-parts/{parent}/revisions/{id}
tags:
- template-parts
parameters:
- name: parent
in: query
required: false
description: The ID for the parent of the revision.
schema:
type: integer
- name: id
in: query
required: false
description: Unique identifier for the revision.
schema:
type: integer
- name: context
in: query
required: false
description: Scope under which the request is made; determines fields present in response.
schema:
type: string
enum:
- view
- embed
- edit
default: view
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'404':
$ref: '#/components/responses/Error'
delete:
operationId: deleteTemplatePartsRevisionsByParentById
summary: DELETE /wp/v2/template-parts/{parent}/revisions/{id}
tags:
- template-parts
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
parent:
type: integer
description: The ID for the parent of the revision.
id:
type: integer
description: Unique identifier for the revision.
force:
type: boolean
default: false
description: Required to be true, as revisions do not support trashing.
security:
- applicationPassword: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
'400': &id008
$ref: '#/components/responses/Error'
'401': *id008
'403': *id008
'404': *id008
/wp/v2/template-parts/lookup:
get:
operationId: listTemplatePartsLookup
summary: GET /wp/v2/template-parts/lookup
tags:
- template-parts
parameters:
- name: slug
in: query
required: true
description: The slug of the template to get the fallback for
schema:
type: string
- name: is_custom
in: query
required: false
description: Indicates if a template is custom or part of the template hierarchy
schema:
type: boolean
- name: template_prefix
in: query
required: false
description: The template prefix for the created template. This is used to extract the main template type, e.g. in `taxonomy-books` extracts the `taxonomy`
schema:
type: string
responses:
'200':
description: Successful response.
content:
application/json:
schema:
type: object
headers:
X-WP-Total:
description: Total items in the collection.
schema:
type: integer
X-WP-TotalPages:
description: Total pages in the collection.
schema:
type: integer
Link:
description: RFC 8288 pagination links (rel=next / rel=prev).
schema:
type: string
'400': &id009
$ref: '#/components/responses/Error'
'404': *id009
components:
responses:
Error:
description: WordPress REST API error envelope.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
description: The WordPress REST API error envelope, captured verbatim from live responses.
properties:
code:
type: string
description: Machine-readable error code, e.g. rest_post_invalid_id.
message:
type: string
description: Human-readable error message.
data:
type: object
properties:
status:
type: integer
description: HTTP status code.
params:
type: object
description: Per-parameter validation messages (rest_invalid_param).
details:
type: object
description: Per-parameter structured error details.
securitySchemes:
applicationPassword:
type: http
scheme: basic
description: WordPress application passwords, advertised by the API root document at https://lanzatech.com/wp-json/ (authentication.application-passwords.endpoints.authorization = https://lanzatech.com/wp-admin/authorize-application.php). Sent as HTTP Basic credentials. Only required for write operations; all read operations captured here are public.