How to draft API examples from the supplied documentation
API examples help a reader connect an endpoint's description with a concrete request and response shape. Accuracy depends on the actual method, fields and authentication requirements provided.
Start with the right material.
- What you provide
- one API reference page with visible method, path and schema.
- The intended result
- Save request examples using placeholder credentials and only documented fields.
How the workflow works.
Use the documented schema and clearly fictional sample values. Preserve required and optional fields, and keep credentials as placeholders rather than including real secrets.
What to check in the result.
Validate the example in the relevant environment before publishing it as tested. A plausible request or response does not prove that the endpoint exists or behaves as shown.
Read the text as an editable result and check it against the source. Keep important references, names and conditions intact when you copy it into another document or message.
Learn from the worked example.
Use the downloadable example to understand the shape of the result. Compare it with the source example, then apply the same factual checks to the material you provide for your own task.
The supplied example is illustrative. It is not a recorded run on your data.
Download the example ↓Use it with your own material.
- Open the source you want to work with and activate WebAct on that tab.
- Copy the task from the hero, add any required fields or preferences, and review the proposed actions.
- Compare the first result with your source. Ask for a specific correction or refinement where needed.