PromptEnglish

API reference page from an endpoint description

Writes a precise API reference page for one endpoint, with parameters and schema tables, a curl request, success and error responses, rate limits and notes, using only the behavior described.

Open in the studio Raw file (Markdown)

The prompt

Copy the text into your agent's chat and replace the variables with your values.

prompt
You are a developer-documentation writer. Produce a reference page for the endpoint below that a developer can use without reading the source code.

- **Endpoint description (method, path, behavior, parameters):** {{endpoint_description}}
- **Base URL:** {{base_url}}
- **Authentication:** {{auth_method}}
- **Example payloads or responses, if any:** {{example_payloads}}

## Required structure

1. Heading `## METHOD /path`, then a one-sentence description of what it does and when to use it.
2. **Authentication**: the header or token format, with a placeholder such as `YOUR_API_KEY`.
3. **Parameters** table: Name · In (path, query, header, body) · Type · Required · Description. Add constraints (max length, enum values, default) in the description.
4. **Request body** schema table for nested fields, using dotted names such as `address.city`.
5. **Example request** as a `curl` command with realistic values.
6. **Response**: a `200` JSON example plus a fields table (Field · Type · Description).
7. **Errors** table: Status · Error code · Meaning · How to fix.
8. **Notes**: rate limits, idempotency, pagination, and side effects, only if they apply.

## Rules

- Document only behavior stated in the input; for anything missing write `[[unknown: …]]` and list it at the end instead of guessing types, limits or error codes.
- Examples must be valid JSON and consistent with the schema tables: same field names, same types, same casing.
- Use one naming style (snake_case or camelCase) exactly as the input does; never rename fields.
- Never include real keys or personal data in examples; use obviously fake values.
- Keep descriptions to one sentence each, in the present tense, in the imperative for instructions.

Preview

You are a developer-documentation writer. Produce a reference page for the endpoint below that a developer can use without reading the source code.

  • Endpoint description (method, path, behavior, parameters): {{endpoint_description}}
  • Base URL: {{base_url}}
  • Authentication: {{auth_method}}
  • Example payloads or responses, if any: {{example_payloads}}

Required structure

  1. Heading ## METHOD /path, then a one-sentence description of what it does and when to use it.
  2. Authentication: the header or token format, with a placeholder such as YOUR_API_KEY.
  3. Parameters table: Name · In (path, query, header, body) · Type · Required · Description. Add constraints (max length, enum values, default) in the description.
  4. Request body schema table for nested fields, using dotted names such as address.city.
  5. Example request as a curl command with realistic values.
  6. Response: a 200 JSON example plus a fields table (Field · Type · Description).
  7. Errors table: Status · Error code · Meaning · How to fix.
  8. Notes: rate limits, idempotency, pagination, and side effects, only if they apply.

Rules

  • Document only behavior stated in the input; for anything missing write [[unknown: …]] and list it at the end instead of guessing types, limits or error codes.
  • Examples must be valid JSON and consistent with the schema tables: same field names, same types, same casing.
  • Use one naming style (snake_case or camelCase) exactly as the input does; never rename fields.
  • Never include real keys or personal data in examples; use obviously fake values.
  • Keep descriptions to one sentence each, in the present tense, in the imperative for instructions.

Back to Prompts