PlanewardPlaneward Docs
PlanewardPlaneward Docs
Welcome

Developers

REST APIAuthenticationWebhooksMCPEmbedded projectsTask description contentDeveloper hub

API

List sites GETCreate a site POSTGet a site GETUpdate a site PATCHDelete a site DELETEPublish a site POSTUnpublish a site POSTList pages GETCreate a page POSTGet a page GETUpdate a page PATCHDelete a page DELETEList collections GETCreate a collection POSTGet a collection GETUpdate a collection PATCHDelete a collection DELETEList collection items GETCreate a collection item POSTGet a collection item GETUpdate a collection item PATCHDelete a collection item DELETEPublish collection items POSTUnpublish collection items POSTArchive collection items POSTUpsert collection items POST
Sites

Update a collection item

Edits the draft. `status` DRAFT unpublishes, ARCHIVED hides. `publish` true puts the saved draft live. Without `expectedContentVersion` the current draft is overwritten; a stale one fails.

PATCH
/sites/{siteId}/collections/{collectionId}/items/{itemId}

Edits the draft. status DRAFT unpublishes, ARCHIVED hides. publish true puts the saved draft live. Without expectedContentVersion the current draft is overwritten; a stale one fails.

Authorization

x-api-key<token>

In: header

Path Parameters

siteId*string
collectionId*string
itemId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/sites/string/collections/string/items/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "string",    "collectionId": "string",    "slug": "string",    "status": "DRAFT",    "name": "string",    "data": {      "name": "string"    },    "seo": {      "title": "string",      "description": "string",      "ogImage": "string",      "noindex": true,      "schemaType": "WebPage",      "publishedAt": "string"    },    "publishedSlug": "string",    "publishedAt": "2019-08-24T14:15:22Z",    "hasUnpublishedChanges": true,    "sortOrder": 0,    "contentVersion": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}

Get a collection item GET

Previous Page

Delete a collection item DELETE

Also removes it from other items' reference fields.

slug?string
Lengthlength <= 80
data?

name plus one key per collection field. Reference fields take item ids or slugs in the target collection. Unknown keys are dropped.

seo?
status?string

Value in

  • "DRAFT"
  • "ARCHIVED"
expectedContentVersion?integer
Range0 <= value
publish?boolean

Also put the saved draft live