Update a blog post
curl --request PUT \
--url https://api.salesive.com/api/v1/blogs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Summer Sale Tips",
"published": false
}
'import requests
url = "https://api.salesive.com/api/v1/blogs/{id}"
payload = {
"title": "Updated Summer Sale Tips",
"published": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Updated Summer Sale Tips', published: false})
};
fetch('https://api.salesive.com/api/v1/blogs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesive.com/api/v1/blogs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Updated Summer Sale Tips',
'published' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/blogs/{id}"
payload := strings.NewReader("{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.salesive.com/api/v1/blogs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/blogs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Blog updated successfully",
"data": {
"_id": "66c2a1b2c3d4e5f6a7b8c9d0",
"title": "Updated Summer Sale Tips",
"slug": "updated-summer-sale-tips",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"tags": [
"sales",
"summer"
],
"shop": "66a0d1c2b3a4958677564738",
"author": {
"_id": "66a0e1b2c3d4e5f6a7b8c9d0",
"name": "Jane Merchant",
"email": "jane@example.com",
"avatar": "https://cdn.salesive.com/avatars/jane.png"
},
"published": false,
"publishedAt": null,
"views": 342,
"createdAt": "2026-06-14T19:00:00.000Z",
"updatedAt": "2026-06-28T12:30:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Blog not found",
"data": null
}Blogs
Update a blog post
Update an existing blog post in the store. Requires the WRITE_BLOGS scope.
PUT
/
blogs
/
{id}
Update a blog post
curl --request PUT \
--url https://api.salesive.com/api/v1/blogs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Summer Sale Tips",
"published": false
}
'import requests
url = "https://api.salesive.com/api/v1/blogs/{id}"
payload = {
"title": "Updated Summer Sale Tips",
"published": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Updated Summer Sale Tips', published: false})
};
fetch('https://api.salesive.com/api/v1/blogs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salesive.com/api/v1/blogs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Updated Summer Sale Tips',
'published' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/blogs/{id}"
payload := strings.NewReader("{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.salesive.com/api/v1/blogs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/blogs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Updated Summer Sale Tips\",\n \"published\": false\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Blog updated successfully",
"data": {
"_id": "66c2a1b2c3d4e5f6a7b8c9d0",
"title": "Updated Summer Sale Tips",
"slug": "updated-summer-sale-tips",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"tags": [
"sales",
"summer"
],
"shop": "66a0d1c2b3a4958677564738",
"author": {
"_id": "66a0e1b2c3d4e5f6a7b8c9d0",
"name": "Jane Merchant",
"email": "jane@example.com",
"avatar": "https://cdn.salesive.com/avatars/jane.png"
},
"published": false,
"publishedAt": null,
"views": 342,
"createdAt": "2026-06-14T19:00:00.000Z",
"updatedAt": "2026-06-28T12:30:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Blog not found",
"data": null
}Updates a blog post; send only the fields to change (at least one required). Changing the title regenerates the slug and toggling published updates publishedAt accordingly. The store is bound to your app token server-side — never send a shop id.
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Path Parameters
The blog post's unique id.
Body
application/json
Fields accepted when updating a blog post. At least one field must be supplied.
New post title (max 200 characters). Regenerates the slug.
Maximum string length:
200Post body (HTML or rich text).
Short summary/excerpt (max 500 characters).
Maximum string length:
500Cover image URL.
Array of tag strings.
Publish (true) or unpublish (false). Updates publishedAt accordingly.
Response
The updated blog post.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?

