Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

POST · APIs

Direct answer

Submission of a representation or command that commonly creates a subordinate resource or triggers a non-idempotent action.

When to use this

Use it when configuring, checking or troubleshooting POST in APIs.

First 30 seconds

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.

Operational verification

POST body → server creates → 201 + Location

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
HTTP API automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformHTTP API automation · Automation → APIs owns generic POST semantics. Provider/platform-specific endpoint behavior remains in the owning Domain, while Security owns credential policy and secret handling.
Scope / prerequisiteUse it when configuring, checking or troubleshooting POST in APIs.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • 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.
Key checks
  • 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docHTTP API automation current

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%
Terminology layer

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.

Aliases that resolve here
api posthttp postrest postcreate resource api
Embedded reference data

Quick lookup tables

POST API boundary map

Fast request/delivery, trust, processing and verification boundaries for POST.

BoundaryHealthy evidenceSuspicious evidence
Caller / requestEnvironment/version, identity and exact request contract are attributableHidden defaults, wrong endpoint/version, leaked or mismatched credentials
Server / responseStatus, headers, structured body and request ID are interpreted togetherStatus-only handling, ignored error body, ambiguous async result or unsafe retry
State / proofWrite result is reconciled with resource read-back or acceptance testResponse success treated as final target success without verification
TroubleshootingFirst failed boundary is preserved, changed minimally and retestedBlind retries, credential rotation, replay or payload edits before evidence is captured
Depth when you need it

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.

Confirmation

Confirm action

Continue?