Markdown Editor

REST Endpoint Reference Template

One REST endpoint: auth, parameter tables, request example, responses per status, RFC 9457 errors, limits, idempotency, paging, deprecation headers

Software & EngineeringStandardOpenAPI 3.2.1 (or 3.1.x), Arazzo 1.1.0, Overlay 1.2.0, RFC 9457, RFC 9745, RFC 8594apireference

How to use: Use one page per endpoint; for a whole API use the REST API specification template. Generate parameter tables from OpenAPI, keep added prose in an Overlay, then add side effects, limits and real captured examples. The main pitfall is docs that drift from the OpenAPI document.

Preview

Endpoint Reference: [METHOD] [/path]

Reference page for a single REST endpoint: summary, authentication, path, query, header and body parameters, request example, responses for every status with examples, the RFC 9457 error format, rate limits, idempotency, pagination, versioning and changelog. Write one page per endpoint. For a whole API specification, use the REST API specification template instead. Replace every [bracketed] value and every line marked Example. The examples document POST /items and GET /items.

FieldValue
EndpointPOST /v1/items
Operation IDcreateItem
Base URLhttps://api.example.com/v1
API version[v1]
OpenAPI document[openapi.yaml], OpenAPI [3.2.1 / 3.1.x]
Used in workflows[Arazzo workflow IDs, for example createAndShareItem, or "None"]
Stability[Stable / Beta / Deprecated]
Required scopeitems:write
Owner team[@team]
Last updatedYYYY-MM-DD

Revision history

VersionDateAuthorChange
1.0YYYY-MM-DD[@name][First published version]
1.12026-10-24[@name]Updated to state the OpenAPI version (3.2.1 or 3.1.x), keep prose in an Overlay 1.2.0 document, link Arazzo 1.1.0 workflows and cite RFC 9745 and RFC 8594 for deprecation headers

1. Summary

Creates an item in the caller's workspace and returns it. The item is visible to other workspace members immediately. Creating an item emits an item.created webhook event and counts towards the workspace's item quota ([10,000] items on the standard plan).

2. Authentication

Send an OAuth 2.0 access token or API key in the Authorization header:

Authorization: Bearer <token>

The token needs the items:write scope. A missing or expired token returns 401; a valid token without the scope returns 403. See [Authentication guide] for obtaining tokens.

3. Request

3.1 Path parameters

This endpoint has no path parameters. For endpoints that do, use this table:

NameTypeRequiredDescription
Example: item_idstring, pattern ^it_[A-Za-z0-9]{12}$YesIdentifier of the item, as returned on creation

3.2 Query parameters

NameTypeRequiredDefaultDescription
expandstring, enum owner, tagsNononeEmbeds related objects in the response; repeatable
[name][type and constraints][Yes / No][default][description]

3.3 Header parameters

NameRequiredDescription
AuthorizationYesBearer <token>, see section 2
Content-TypeYesMust be application/json
Idempotency-KeyRecommendedUnique key, 1 to 255 characters, see section 7
Accept-LanguageNoLanguage for human-readable error detail text

3.4 Body parameters

FieldTypeRequiredConstraintsDescription
namestringYes1 to 120 characters, trimmedDisplay name, unique within the workspace
descriptionstringNoUp to 2,000 charactersPlain-text description
priceintegerNo0 to 100,000,000Price in minor currency units, for example cents
currencystringWhen price is setISO 4217 codeCurrency of price
tagsarray of stringNoUp to 10 items, each 1 to 32 charactersFree-form labels

Unknown fields are rejected with 400 so that typos are not silently ignored.

4. Request example

The following request creates a priced item with two tags:

curl -X POST https://api.example.com/v1/items \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c2a8e-3b44-4c1e-9a7d-2f0b5d8e1c90" \
  -d '{
    "name": "Standing desk",
    "description": "Electric, 120 x 60 cm",
    "price": 49900,
    "currency": "EUR",
    "tags": ["furniture", "office"]
  }'

5. Responses

5.1 201 Created

The item was created. The Location header holds its URL.

HTTP/1.1 201 Created
Location: https://api.example.com/v1/items/it_8Hk2LmQ9xT4a
ETag: "a1b2c3"
Content-Type: application/json
{
  "id": "it_8Hk2LmQ9xT4a",
  "name": "Standing desk",
  "description": "Electric, 120 x 60 cm",
  "price": 49900,
  "currency": "EUR",
  "tags": ["furniture", "office"],
  "created_at": "2026-10-21T09:14:03Z",
  "updated_at": "2026-10-21T09:14:03Z"
}

5.2 Error responses

Every error uses the problem details format in section 6.

Statustype suffixWhen it happensClient action
400/validation-errorBody fails validation or contains unknown fieldsFix the fields listed in errors
401/unauthenticatedToken missing, malformed or expiredRefresh the token and retry
403/forbiddenToken lacks items:writeRequest the scope; do not retry
409/conflictAn item with the same name existsChoose another name or update the existing item
413/payload-too-largeBody larger than 64 KBReduce the payload
422/quota-exceededWorkspace item quota reachedDelete items or upgrade the plan
429/rate-limitedRate limit exceededWait for Retry-After seconds
500/internal-errorUnexpected server errorRetry with backoff using the same Idempotency-Key
503/unavailablePlanned maintenance or overloadRetry after Retry-After

6. Error format (RFC 9457)

Errors are returned as application/problem+json following RFC 9457, Problem Details for HTTP APIs. The standard members are type, title, status, detail and instance. This API adds errors for field-level problems and request_id for support.

{
  "type": "https://api.example.com/problems/validation-error",
  "title": "Request body is invalid",
  "status": 400,
  "detail": "2 fields failed validation.",
  "instance": "/v1/items",
  "request_id": "req_01JB7Z3K9QW",
  "errors": [
    { "pointer": "/name", "detail": "Must be between 1 and 120 characters." },
    { "pointer": "/currency", "detail": "Required when price is set." }
  ]
}

Clients should branch on type, never on title or detail, which may be reworded or translated.

7. Rate limits and idempotency

Write requests are limited to [100] per minute per token and [1,000] per minute per workspace. Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. When the limit is exceeded, the API returns 429 with a Retry-After header in seconds.

Send an Idempotency-Key header, for example a UUID v4, to make retries safe. The server stores the first response for a key for [24 hours]. A retry with the same key and the same body returns the stored response; a retry with the same key and a different body returns 409. Clients should retry 429, 500 and 503 with exponential backoff, for example waiting t=min⁡(2n,60)t = \min(2^n, 60) seconds plus random jitter before attempt nn.

8. Pagination

POST /items returns one object and is not paginated. The related list endpoint GET /items uses cursor pagination:

ParameterTypeDefaultDescription
limitinteger, 1 to 10020Maximum results per page
cursorstringnoneOpaque cursor from next_cursor of the previous page
filterstringnoneFilter expression, for example tag:office
{
  "items": [{ "id": "it_8Hk2LmQ9xT4a", "name": "Standing desk" }],
  "next_cursor": "eyJpZCI6Iml0XzhIazJMbVE5eFQ0YSJ9"
}

Results are ordered by created_at descending. next_cursor is null on the last page. Cursors expire after [24 hours].

9. Versioning and deprecation

The major version is part of the path (/v1). Within a major version the API only adds optional fields, new endpoints and new error type values; clients must ignore unknown response fields. Removing or renaming a field, or making an optional field required, is a breaking change and ships only in a new major version. Deprecated endpoints return Deprecation and Sunset headers at least [6 months] before removal, and are listed in the changelog below. The Deprecation header (RFC 9745) carries the date the endpoint was deprecated; the Sunset header (RFC 8594) carries the date it stops responding. Mark the operation deprecated: true in the OpenAPI document at the same time, so generated SDKs and reference pages show it. Minimum notice periods come from the API Versioning and Deprecation Policy (architecture/api-deprecation-policy); announce each deprecation to customers with the Deprecation Notice (docs/deprecation-notice) and record it in the API Changelog (docs/api-changelog).

10. Changelog

DateVersionChange
YYYY-MM-DDv1.3Example: Added optional tags field (up to 10 labels)
YYYY-MM-DDv1.2Example: 409 returned for duplicate names instead of 400
2026-01-01v1Initial release

Standard and licence note

Based on common industry practice for REST endpoint references, the OpenAPI Specification 3.2.1 (2026-09-10; 3.1.x also widely used) for parameter and response structure, the Arazzo Specification 1.1.0 and the Overlay Specification 1.2.0 (OpenAPI Initiative, Apache License 2.0, https://spec.openapis.org/), RFC 9745 and RFC 8594 for deprecation headers, RFC 9457 Problem Details for HTTP APIs for the error format and RFC 9110 for HTTP semantics. Original text written for this collection; the example API is fictional. Template licence: MIT.

Related templates