Skip to content
NamiDocs
Reference

Requests, responses, and errors

A reference-page example with parameters, code, and actionable error descriptions.

Request shape

This page demonstrates a documentation layout, not a live service.

javascript
const project = {
  name: "Documentation preview",
  locale: "en",
  metadata: { source: "example" }
}
console.log(JSON.stringify(project, null, 2))

Parameters

FieldTypeDescription
namestringA readable project name
localestringExample values: en or ja
metadataobjectOptional demonstration values

Error handling

Missing input

If a required field is empty, tell the reader which value is missing and how to supply it. Avoid presenting a raw stack trace as a user-facing explanation.

json
{
  "error": "missing_name",
  "message": "Provide a project name."
}

Temporary failure

Describe whether retrying is safe. If an action can create a duplicate transaction, explain how the application avoids duplication before recommending a retry.

Long identifiers

Long lines stay inside the code container:

text
example_request_identifier_abcdefghijklmnopqrstuvwxyz_0123456789_abcdefghijklmnopqrstuvwxyz_0123456789

Return to the writing guide to adapt this page to your own API.

Create a free website with Framer, the website builder loved by startups, designers and agencies.