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.
نص الأمر
انسخ النص والصقه في محادثة وكيلك، وعوّض المتغيرات بقيمك.
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.
المعاينة
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
- Heading
## METHOD /path, then a one-sentence description of what it does and when to use it. - Authentication: the header or token format, with a placeholder such as
YOUR_API_KEY. - Parameters table: Name · In (path, query, header, body) · Type · Required · Description. Add constraints (max length, enum values, default) in the description.
- Request body schema table for nested fields, using dotted names such as
address.city. - Example request as a
curlcommand with realistic values. - Response: a
200JSON example plus a fields table (Field · Type · Description). - Errors table: Status · Error code · Meaning · How to fix.
- 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.