The "Update Blog Post" API allows you update blog post for any given blog site. Please use blogs/post-update.write

http
PUT https://services.leadconnectorhq.com/blogs/posts/{postId}

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
titlestringYesYour blog title
locationIdstringYesAccount ID
blogIdstringYesBlog IDYou can find the blog id from blog site dashboard link
imageUrlstringYesImage URl
descriptionstringYesA short description
rawHTMLstringYes<h1>Your blog content</h1>
statusstringYesPUBLISHEDPossible values: 'DRAFT', 'PUBLISHED', 'SCHEDULED', 'ARCHIVED'
imageAltTextstringYesAlt text for your blog image
categoriesstring[]YesThis needs to be array of category ids, which you can get from the category get api call.
tagsstring[]No
authorstringYes6683abde331c041f32c07aeaThis needs to be author id, which you can get from the author get api call.
urlSlugstringYesany-blog-post-url
canonicalLinkstringNohttps://tryghl.blog/post/testing-unsplash
publishedAtstringYes2025-02-05T18:30:47.000ZProvide ISO timestamp

Responses

200 - Successful response
  • updatedBlogPost (object, required)

    • categories (string[], required): Array of category IDs associated with the blog post

    • tags (string[]): Array of tags associated with the blog post

    • archived (boolean, required): Indicates whether the blog post is archived Example: False

    • _id (string, required): Unique identifier of the blog post Example: 66c381b38be80858b9af62b6

    • title (string, required): Title of the blog post Example: Banana is good source of energy

    • description (string, required): Description of the blog post Example: Description

    • imageUrl (string, required): URL of the image associated with the blog post Example: https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg

    • status (string, required): Publication status of the blog post Example: PUBLISHED

    • imageAltText (string, required): Alternative text for the blog post image Example: alt

    • urlSlug (string, required): URL slug for the blog post Example: banana-good-energy

    • canonicalLink (string): Canonical link of the blog post Example: https://blog.chatgpts.agency/post/test-8384

    • author (string): Identifier of the author of the blog post Example: 659ec9634a3796e4e47cc360

    • publishedAt (string, required): Timestamp when the blog post was published Example: 2024-08-19T17:14:57.000Z

    • updatedAt (string, required): Timestamp when the blog post was last updated Example: 2024-08-19T17:32:36.182Z

json
{
  "updatedBlogPost": {
    "categories": [
      "659ecabc4a37969a2b7cc370",
      "6683abde331c041f32c07aee"
    ],
    "tags": [
      "Apple",
      "Banana"
    ],
    "archived": false,
    "_id": "66c381b38be80858b9af62b6",
    "title": "Banana is good source of energy",
    "description": "Description",
    "imageUrl": "https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg",
    "status": "PUBLISHED",
    "imageAltText": "alt",
    "urlSlug": "banana-good-energy",
    "canonicalLink": "https://blog.chatgpts.agency/post/test-8384",
    "author": "659ec9634a3796e4e47cc360",
    "publishedAt": "2024-08-19T17:14:57.000Z",
    "updatedAt": "2024-08-19T17:32:36.182Z"
  }
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
422 - Unprocessable Entity
json
{}

Example

curl -X PUT 'https://services.leadconnectorhq.com/blogs/posts/YOUR_postId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "Your blog title",
  "locationId": "Account ID",
  "blogId": "Blog ID",
  "imageUrl": "Image URl",
  "description": "A short description",
  "rawHTML": "<h1>Your blog content</h1>",
  "status": "PUBLISHED",
  "imageAltText": "Alt text for your blog image",
  "categories": [
    "9c48df2694a849b6089f9d0d3513efe",
    "6683abde331c041f32c07aee"
  ],
  "tags": [
    "blog",
    "seo"
  ],
  "author": "6683abde331c041f32c07aea",
  "urlSlug": "any-blog-post-url",
  "canonicalLink": "https://tryghl.blog/post/testing-unsplash",
  "publishedAt": "2025-02-05T18:30:47.000Z"
}'

Last updated October 26, 2026

Was this page helpful?