You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add CMS write endpoints to REST API reference
Document POST, PUT, PATCH, and DELETE endpoints for collection items
that were missing from the API reference. Also expand GET list items
query parameters (sort_by, order_by, limit, filter) and fix the
response format example to match the actual API shape. Update API key
permissions to reflect full CRUD access.
Made-with: Cursor
The `id`, `created_at`, and `updated_at` fields are generated automatically and cannot be set manually.
166
+
167
+
Returns the created item with status `201`.
168
+
169
+
### Update Item (Full)
170
+
171
+
```
172
+
PUT /ycode/api/v1/collections/:id/items/:itemId
173
+
```
174
+
175
+
Replaces all field values on an item. Fields not included in the request body are cleared to `null`. Use this when you want to overwrite the entire item.
176
+
177
+
```bash
178
+
curl -X PUT \
179
+
-H "Authorization: Bearer YOUR_API_KEY" \
180
+
-H "Content-Type: application/json" \
181
+
-d '{"name": "Updated Title", "slug": "updated-title", "content": "New content"}' \
The `id`, `created_at`, and `updated_at` fields are protected and cannot be overwritten. The `updated_at` timestamp is set automatically.
186
+
187
+
Returns the updated item.
188
+
189
+
### Update Item (Partial)
190
+
191
+
```
192
+
PATCH /ycode/api/v1/collections/:id/items/:itemId
193
+
```
194
+
195
+
Updates only the fields included in the request body. All other fields remain unchanged. Use this when you want to modify specific fields without affecting the rest.
0 commit comments