Create a blog post
curl --request POST \
--url https://api.salesive.com/api/v1/blogs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Summer Sale Tips",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"tags": [
"sales",
"summer"
],
"published": true
}
'import requests
url = "https://api.salesive.com/api/v1/blogs"
payload = {
"title": "Summer Sale Tips",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"tags": ["sales", "summer"],
"published": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Summer Sale Tips',
description: 'How to make the most of our summer promotions.',
content: '<p>Full HTML content...</p>',
image: 'https://cdn.salesive.com/blog/summer.jpg',
tags: ['sales', 'summer'],
published: true
})
};
fetch('https://api.salesive.com/api/v1/blogs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Summer Sale Tips',
'description' => 'How to make the most of our summer promotions.',
'content' => '<p>Full HTML content...</p>',
'image' => 'https://cdn.salesive.com/blog/summer.jpg',
'tags' => [
'sales',
'summer'
],
'published' => true
]),
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"
payload := strings.NewReader("{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.salesive.com/api/v1/blogs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/blogs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Blog created successfully",
"data": {
"_id": "66c2a1b2c3d4e5f6a7b8c9d0",
"title": "Summer Sale Tips",
"slug": "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": true,
"publishedAt": "2026-06-28T12:00:00.000Z",
"views": 0,
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-06-28T12:00:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Blogs
Create a blog post
Create a new blog post for the store. Requires the WRITE_BLOGS scope.
POST
/
blogs
Create a blog post
curl --request POST \
--url https://api.salesive.com/api/v1/blogs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Summer Sale Tips",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"tags": [
"sales",
"summer"
],
"published": true
}
'import requests
url = "https://api.salesive.com/api/v1/blogs"
payload = {
"title": "Summer Sale Tips",
"description": "How to make the most of our summer promotions.",
"content": "<p>Full HTML content...</p>",
"image": "https://cdn.salesive.com/blog/summer.jpg",
"tags": ["sales", "summer"],
"published": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Summer Sale Tips',
description: 'How to make the most of our summer promotions.',
content: '<p>Full HTML content...</p>',
image: 'https://cdn.salesive.com/blog/summer.jpg',
tags: ['sales', 'summer'],
published: true
})
};
fetch('https://api.salesive.com/api/v1/blogs', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Summer Sale Tips',
'description' => 'How to make the most of our summer promotions.',
'content' => '<p>Full HTML content...</p>',
'image' => 'https://cdn.salesive.com/blog/summer.jpg',
'tags' => [
'sales',
'summer'
],
'published' => true
]),
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"
payload := strings.NewReader("{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.salesive.com/api/v1/blogs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/blogs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Summer Sale Tips\",\n \"description\": \"How to make the most of our summer promotions.\",\n \"content\": \"<p>Full HTML content...</p>\",\n \"image\": \"https://cdn.salesive.com/blog/summer.jpg\",\n \"tags\": [\n \"sales\",\n \"summer\"\n ],\n \"published\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Blog created successfully",
"data": {
"_id": "66c2a1b2c3d4e5f6a7b8c9d0",
"title": "Summer Sale Tips",
"slug": "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": true,
"publishedAt": "2026-06-28T12:00:00.000Z",
"views": 0,
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-06-28T12:00:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Creates a blog post; a unique slug is generated from the title and publishedAt is set when the post is created as published. The owning store and author are set 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.
Body
application/json
Fields accepted when creating a blog post.
Post title (max 200 characters). Used to generate the slug.
Maximum string length:
200Post body (HTML or rich text).
Short summary/excerpt (max 500 characters). Defaults to empty string.
Maximum string length:
500Cover image URL. Defaults to empty string.
Array of tag strings. Defaults to empty array.
Whether the post is published. Defaults to false (draft).
Response
The created blog post.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?
⌘I

