Starfish Space Templates API

Block theme templates.

OpenAPI Specification

starfish-space-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Starfish Space Website Content API (WordPress REST v2) Templates API
  version: '2'
  description: 'The public WordPress REST API served by Starfish Space at https://www.starfishspace.com/wp-json/wp/v2. Starfish Space is a Tukwila, Washington satellite-servicing company building the Otter spacecraft; this API is the content interface behind starfishspace.com (news/press releases, pages, media, taxonomies), not a spacecraft, telemetry or mission-data API. Read operations are available anonymously; write operations require an authenticated WordPress user.


    This document was DERIVED by API Evangelist from documents the API itself publishes: the machine-readable route index at /wp-json/wp/v2 and the item JSON Schemas returned by HTTP OPTIONS on each collection route. No paths, parameters or schema properties were invented.'
  contact:
    name: Starfish Space
    url: https://www.starfishspace.com/contact/
  x-derived-from:
  - https://www.starfishspace.com/wp-json/wp/v2
  - https://www.starfishspace.com/wp-json/wp/v2/{resource} (HTTP OPTIONS)
servers:
- url: https://www.starfishspace.com/wp-json
  description: Production
tags:
- name: templates
  description: Block theme templates.
paths:
  /wp/v2/templates:
    get:
      operationId: listTemplates
      tags:
      - templates
      summary: List templates
      description: Retrieve a collection of templates from the Starfish Space WordPress REST API.
      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
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
    post:
      operationId: createTemplates
      tags:
      - templates
      summary: Create or update templates
      description: Create or update a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters: []
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 1
                  pattern: '[a-zA-Z0-9_\%-]+'
                  description: Unique slug identifying the template.
                theme:
                  type: string
                  description: Theme identifier for the template.
                type:
                  type: string
                  description: Type of template.
                content:
                  default: ''
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Content for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                    block_version:
                      description: Version of the content block format used by the template.
                      type: integer
                      context:
                      - edit
                      readonly: true
                  description: Content of template.
                title:
                  default: ''
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Title for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                    rendered:
                      description: HTML title for the template, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: Title of template.
                description:
                  default: ''
                  type: string
                  description: Description of template.
                status:
                  default: publish
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: Status of template.
                author:
                  type: integer
                  description: The ID for the author of the template.
              required:
              - slug
      security:
      - basicAuth: []
      - cookieNonce: []
  /wp/v2/templates/lookup:
    get:
      operationId: listTemplatesLookup
      tags:
      - templates
      summary: List templates
      description: Retrieve a collection of templates from the Starfish Space WordPress REST API.
      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
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
  /wp/v2/templates/{id}:
    get:
      operationId: getTemplatesById
      tags:
      - templates
      summary: Retrieve a single template
      description: Retrieve a single template by route parameter from the Starfish Space WordPress REST API.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        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
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
    post:
      operationId: createTemplatesById
      tags:
      - templates
      summary: Create or update template
      description: Create or update a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 1
                  pattern: '[a-zA-Z0-9_\%-]+'
                  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
                  - string
                  properties:
                    raw:
                      description: Content for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                    block_version:
                      description: Version of the content block format used by the template.
                      type: integer
                      context:
                      - edit
                      readonly: true
                  description: Content of template.
                title:
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Title for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                    rendered:
                      description: HTML title for the template, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: Title of template.
                description:
                  type: string
                  description: Description of template.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: Status of template.
                author:
                  type: integer
                  description: The ID for the author of the template.
      security:
      - basicAuth: []
      - cookieNonce: []
    put:
      operationId: updateTemplatesById
      tags:
      - templates
      summary: Update template
      description: Update a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 1
                  pattern: '[a-zA-Z0-9_\%-]+'
                  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
                  - string
                  properties:
                    raw:
                      description: Content for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                    block_version:
                      description: Version of the content block format used by the template.
                      type: integer
                      context:
                      - edit
                      readonly: true
                  description: Content of template.
                title:
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Title for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                    rendered:
                      description: HTML title for the template, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: Title of template.
                description:
                  type: string
                  description: Description of template.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: Status of template.
                author:
                  type: integer
                  description: The ID for the author of the template.
      security:
      - basicAuth: []
      - cookieNonce: []
    patch:
      operationId: updateTemplatesById2
      tags:
      - templates
      summary: Update template
      description: Update a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 1
                  pattern: '[a-zA-Z0-9_\%-]+'
                  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
                  - string
                  properties:
                    raw:
                      description: Content for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                    block_version:
                      description: Version of the content block format used by the template.
                      type: integer
                      context:
                      - edit
                      readonly: true
                  description: Content of template.
                title:
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Title for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                    rendered:
                      description: HTML title for the template, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: Title of template.
                description:
                  type: string
                  description: Description of template.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: Status of template.
                author:
                  type: integer
                  description: The ID for the author of the template.
      security:
      - basicAuth: []
      - cookieNonce: []
    delete:
      operationId: deleteTemplatesById
      tags:
      - templates
      summary: Delete template
      description: Delete a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      - name: force
        in: query
        required: false
        description: Whether to bypass Trash and force deletion.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      security:
      - basicAuth: []
      - cookieNonce: []
  /wp/v2/templates/{id}/autosaves:
    get:
      operationId: getTemplatesByIdAutosaves
      tags:
      - templates
      summary: Retrieve a single template
      description: Retrieve a single template by route parameter from the Starfish Space WordPress REST API.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        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
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
    post:
      operationId: createTemplatesByIdAutosaves
      tags:
      - templates
      summary: Create or update template
      description: Create or update a template via the Starfish Space WordPress REST API. Requires an authenticated WordPress user with sufficient capabilities.
      parameters:
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  minLength: 1
                  pattern: '[a-zA-Z0-9_\%-]+'
                  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
                  - string
                  properties:
                    raw:
                      description: Content for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                    block_version:
                      description: Version of the content block format used by the template.
                      type: integer
                      context:
                      - edit
                      readonly: true
                  description: Content of template.
                title:
                  type:
                  - object
                  - string
                  properties:
                    raw:
                      description: Title for the template, as it exists in the database.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                    rendered:
                      description: HTML title for the template, transformed for display.
                      type: string
                      context:
                      - view
                      - edit
                      - embed
                      readonly: true
                  description: Title of template.
                description:
                  type: string
                  description: Description of template.
                status:
                  type: string
                  enum:
                  - publish
                  - future
                  - draft
                  - pending
                  - private
                  - acf-disabled
                  description: Status of template.
                author:
                  type: integer
                  description: The ID for the author of the template.
      security:
      - basicAuth: []
      - cookieNonce: []
  /wp/v2/templates/{parent}/autosaves/{id}:
    get:
      operationId: getTemplatesByParentAutosavesById
      tags:
      - templates
      summary: Retrieve a single template
      description: Retrieve a single template by route parameter from the Starfish Space WordPress REST API.
      parameters:
      - name: parent
        in: path
        required: true
        description: WordPress route parameter parent.
        schema:
          type: integer
      - name: id
        in: path
        required: true
        description: WordPress route parameter id.
        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
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '403':
          description: Not allowed for the current user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
        '404':
          description: No route or resource matched the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestError'
  /wp/v2/templates/{parent}/revisions:
    get:
      operationId: getTemplatesByParentRevisions
      tags:
      - templates
      summary: Retrieve a single template
      description: Retrieve a single template by route parameter from the Starfish Space WordPress REST API.
      parameters:
      - name: parent
        in: path
        required: true
        description: WordPress route parameter parent.
        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

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/starfish-space/refs/heads/main/openapi/starfish-space-templates-api-openapi.yml