Use it when configuring, checking or troubleshooting POST in APIs.
POST · APIs
Submission of a representation or command that commonly creates a subordinate resource or triggers a non-idempotent action.
1. POST creates resources or triggers actions.
2. Not idempotent — duplicates on retry.
3. Use idempotency keys if supported.
4. Check 201/202.
5. Validate payload first.
POST body → server creates → 201 + Location
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
submission intent → endpoint → auth → payload/idempotency key → acceptance/create → operation/resource identifier → completion → read-back
Healthy evidence: idempotency expectations are explicit, created/operation identifiers are captured and asynchronous effects are verified to completion.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: blind POST retries, duplicate resources, ignored 202 workflow, missing Location/job ID or client success before target completion.
Step 3 Common mistakes Narrow the fault
- Retrying POST without an idempotency key, creating duplicates.
- Expecting 200 instead of 201 Created.
Step 4 Where it fails Narrow the fault
Where POST usually goes wrong: creation/action semantics, idempotency strategy, duplicate suppression and resource-location/read-back.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- POST accepted ≠ action completed; 202 or asynchronous workflows can defer the real outcome.
- POST retry ≠ safe automatically; duplicate creates or repeated side effects are common without an idempotency key.
- 201 Created ≠ representation validated by the caller; Location and body still need checking.
- Same payload ≠ same operation; server-generated identity or current state can change the result.
curl -sS -X POST -H 'Content-Type: application/json' -d @payload.json https://<api>/v1/items— create- 201 Created + Location header — result
- Idempotency-Key header (if supported) — safe retry
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
POST success shows only that the server accepted or processed that submission path; it may not show a unique or completed side effect.
Worked example
POST sends data to create a new resource or trigger an action. The server decides the new resource's ID and usually returns 201 Created with the object and a Location header. Because POST is not idempotent, repeating it can create duplicates.
Worked example — creating a prefix and handling the result:
r = requests.post(f"{nb}/api/ipam/prefixes/", headers=h, timeout=30,
json={"prefix": "10.20.30.0/24", "site": site_id, "status": "active"})
if r.status_code == 201:
prefix_id = r.json()["id"]
elif r.status_code == 400:
raise ValueError(r.json()) # field-level validation errors
else:
r.raise_for_status()
If a POST times out, the server may still have created the object — look it up by a natural key before retrying. Some APIs support an Idempotency-Key header to make POST retries safe.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in APIs > POST. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9110 · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
POST API boundary map
Fast request/delivery, trust, processing and verification boundaries for POST.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Deep reference
Healthy vs suspicious evidence
Output interpretation
For POST, rely on structured fields and stable IDs (creation/action semantics, idempotency strategy, duplicate suppression and resource-location/read-back) rather than text formatted for display.