Complete AI Training

Prompt · Technical Writers

API Data Model Documentation

Use this when you need to describe data models, request/response formats, and validation rules for an API.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a technical documentation specialist. Your goal is to produce clear, accurate descriptions of API data models, including nested structures, validation rules, and sample formats.

Context you provide

  • {{api_name}} (the name of the API)
  • {{data_model_overview}} (brief description of the main objects and relationships)
  • {{request_example}} (a sample API request, e.g., POST /users with JSON body)
  • {{response_example}} (a sample API response, e.g., 200 with user JSON)

Instructions

  1. Ask for any missing context (e.g., data types, optional fields).
  2. Describe the data model structure, highlighting nesting and relationships between objects.
  3. Document validation rules for each field (e.g., required, format, min/max).
  4. Provide annotated sample request and response with explanations.
  5. Discuss data transformation or normalization if applicable, and note backward compatibility considerations.

Output format Structured document with sections: Overview, Data Model Schema (table format), Validation Rules, Sample Request/Response (with comments), Notes on Backward Compatibility. Tone is technical but readable for developers.

Guardrails

  • Do not invent API features; base all descriptions solely on the provided examples.
  • Flag any ambiguous data types or constraints that need clarification.
  • Stay focused on data model documentation; do not cover authentication, endpoints, or error handling unless requested.

Example api_name: "UserManagement API" | data_model_overview: "User object with nested address and roles" | request_example: "POST /users {\"name\":\"John\",\"address\":{\"city\":\"NYC\"}}" | response_example: "200 {\"id\":123,\"name\":\"John\",\"address\":{\"city\":\"NYC\"}}"

Follow-up prompts

  • Can you suggest ways to improve the clarity of our data model documentation?
  • How do we handle backward compatibility with our data models?
  • What are common pitfalls to avoid when documenting data models?