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
| Field | Type | Description |
|---|---|---|
| name | string | A readable project name |
| locale | string | Example values: en or ja |
| metadata | object | Optional 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_0123456789Related guide
Return to the writing guide to adapt this page to your own API.