Docs

Endpoint

2 min readUpdated September 19, 2026

Endpoint documents a single API route: its method, path, a short summary, and optional details like a version badge, auth requirement, or deprecation notice. It is the block most other API blocks (Parameters, Request/Response, Response Body) are meant to sit under on the page.

Adding the block#

  1. In the block editor, open the block inserter and search for Endpoint.
  2. Add it to the page.
  3. Fill in the method and path in the block settings, then add a summary.
  4. Add any Parameters, Request/Response, or Response Body blocks underneath it to document the rest of the route.

Settings#

SettingWhat it does
MethodGET, POST, PUT, PATCH, or DELETE. Shown as a colored badge.
PathThe route itself, e.g. /customers/{id}.
SummaryA short, one-line description shown under the method and path.
Description (optional)A longer explanation, shown below the summary.
Version badge (optional)A small label such as v2, shown next to the path.
Operation ID (optional)Used as this endpoint’s deep-link anchor instead of the method and path, so links to it keep working even if the path is later renamed.
Mark as deprecatedAdds a deprecated notice to the block. Reveals a Deprecation note field to explain why or what to use instead.
Requires authenticationAdds an auth-required badge next to the path.
Related EndpointsAn optional list of other Endpoint blocks on the same page to link to, each with its own method, path, and optional label, e.g. for a “see also” list.

Example#

An endpoint for creating a customer: Method set to POST, Path set to /customers, Summary set to Create a new customer, and Requires authentication on.

POST /customers 🔗 🔒 Auth Required

Create a new customer

The block#

In the editor, this is just the Endpoint block’s settings panel filled in as above, no code required.

The shortcode#

The same block, added as a shortcode instead, for a widget, classic-editor content, or a page builder that only accepts shortcodes:

[nahnu_code_block block="endpoint" method="POST" path="/customers" summary="Create a new customer" authRequired="true"]

The block attribute picks which block to render (endpoint here); every other attribute maps to that block’s own setting by name.

How it renders#

A POST badge, the path /customers, a lock icon with “Auth Required” next to it, and the summary line underneath.

Tips#

  • Set an Operation ID if you plan to link to this endpoint from elsewhere. It keeps the anchor stable even if you later rename the path.
  • Stack a Parameters, Request/Response, and Response Body block directly under an Endpoint block to build out a full route reference.
  • Use Related Endpoints to cross-link a handful of endpoints readers commonly move between, like a create/read/update/delete set for the same resource.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only