Skip to content
BolderBolder Developers
Esc
↑↓navigate↵open⌘Jpreview

Update a post

PUT/posts/{id}
Authorization
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstringrequired

Post ID or slug

Request body
requiredapplication/json
titlestring
bodystring
slugstring
descriptionstring
short_descriptionstring
publishedboolean
published_onstring<date-time>
formatstring

markdown is stored as is and rendered by the storefront.

Allowed:htmlblocksmarkdown
blog_idinteger

Move the post to another blog of this shop. A translation takes its translation_lang from the new blog.

translation_ofinteger | null

Make this post a translation of another one (same rules as when creating), or send null to detach it and make it an original post again.

Responses
200

Post updated

_linksHalLinks
idinteger
shop_idinteger
titlestring
slugstring
bodystring
descriptionstring
short_descriptionstring
publishedboolean

There is no status field — this is a boolean.

published_onstring<date-time>
formatstring

blocks means body is an EditorJS JSON document (as a string).

Allowed:htmlblocks
blog_idinteger

The blog this post lives in. A shop can have several blogs, each with its own language; new posts go to the shop's default blog unless blog_id is given.

translation_ofinteger | null

ID of the original post when this post is a translation of it; null for an original post.

translation_langstring | null

Language of this translation (the language of its blog, e.g. es); null for an original post.

user_idinteger
created_onstring<date-time>
updated_onstring<date-time>
pathstring

Path of the post on the storefront, e.g. /blog/2024/3/15/hello (/es/blog/... for a blog in another language than the shop's).

urlstring | null

Full storefront URL of the post. Unpublished posts end in ?preview=1.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://api.onbolder.com/v2/posts/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "string",
  "body": "string",
  "slug": "string",
  "description": "string",
  "short_description": "string",
  "published": true,
  "published_on": "2019-08-24T14:15:22Z",
  "format": "html",
  "blog_id": 0,
  "translation_of": 0
}'
Response
{
  "_links": {
    "property1": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    },
    "property2": {
      "href": "string",
      "templated": true,
      "method": "get",
      "title": "string",
      "type": "string"
    }
  },
  "id": 0,
  "shop_id": 0,
  "title": "string",
  "slug": "string",
  "body": "string",
  "description": "string",
  "short_description": "string",
  "published": true,
  "published_on": "2019-08-24T14:15:22Z",
  "format": "html",
  "blog_id": 0,
  "translation_of": 0,
  "translation_lang": "string",
  "user_id": 0,
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z",
  "path": "string",
  "url": "string"
}

Was this page helpful?