PUT and PATCH update an existing document by ID. You only need to send the fields you want to change — unmentioned fields are left unchanged.
PUT /api/data/:collectionName/:id
Typically used for full logical updates. Send only the fields you intend to change; fields you omit are left unchanged.
PATCH /api/data/:collectionName/:id
Explicitly signals a partial update. Semantically equivalent to PUT in urBackend — both merge changes into the existing document without replacing unmentioned fields.
Nested field updates using dot notation are supported.
For example, sending
"meta.views": 105 updates only the views key inside the meta object
without affecting any other keys in meta.Required header
x-api-key: sk_live_… by default. pk_live_… is accepted only when the collection has RLS enabled and the request includes Authorization: Bearer <accessToken>.
Path parameters
string
required
The name of the collection containing the document.
string
required
The MongoDB ObjectId string of the document to update.
Request body
A JSON object containing the fields to update and their new values.RLS behavior
When usingpk_live with RLS enabled, urBackend fetches the existing document and compares its owner field against the authenticated user’s ID. If they don’t match, the request is rejected with 403.
Response fields
string
Confirmation message, returns
"Updated" on success.object
The updated document with all current field values.
