Skip to content

Send your first request

This guide demonstrates a complete create → read → delete loop against the example API. Follow it end-to-end, then swap the URLs and resource for whatever your own product exposes.

  1. Create a widget.

    Terminal window
    curl https://api.example.com/v1/widgets \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"name": "Demo widget"}'

    Save the returned id — you’ll use it in the next step.

  2. Read it back.

    Terminal window
    curl https://api.example.com/v1/widgets/$WIDGET_ID \
    -H "Authorization: Bearer $API_KEY"
  3. Clean up.

    Terminal window
    curl -X DELETE https://api.example.com/v1/widgets/$WIDGET_ID \
    -H "Authorization: Bearer $API_KEY"

Maintained by EkLine