API documentation essentials

  • Endpoint: action + required inputs + success response + error cases
  • Parameters: name (type, required/optional) — description. Example: "value". Error: what happens if invalid
  • Auth: header format + how to get the token + expiry + error code
  • Style: present simple, active, no subject — "Creates", "Returns", "Accepts"
  • Status codes: 400 = bad syntax, 401 = not authenticated, 403 = not authorised, 409 = conflict, 422 = invalid values

Question 0 of 5

Which API endpoint description is written most clearly?