Success responses
The
id you return on create is permanent. Castro stores it verbatim and
uses it in the path of every later call about that entity. Any string up to 191
characters works: a database id, a UUID, a slug. Just never change it.List endpoints return a bare array
{ "items": [...] } wrapper is also accepted, but the bare array is the
documented shape: prefer it.
Error responses
Any non-2xx response should carry a message:"Post not found" is useful. "Error" is not.
What Castro does with each status
Every request and response, including your error body, is recorded in the
integration logs, so a user can always see the raw exchange.
Idempotency
Every payload for the same piece of Castro content carries the samesource_id.
Use it to recognise a re-publish instead of creating a duplicate:
source_id on create and index it. Networks retry; users double-click.
The partial update rule
It’s worth stating once more, because it’s the rule that costs real content: Nested objects follow the same rule: mergeseo, don’t replace it.
The conformance script asserts this, and the
troubleshooting guide shows the two-line fix.
