Update Blog
curl --request PUT \
--url https://api.launchmystore.io/api/v1/blogs/:id.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:id.json"
payload = {
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
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({
name: '<string>',
title: '<string>',
handle: '<string>',
templateSuffix: '<string>',
seoTitle: '<string>',
seoDesc: '<string>',
seoImage: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/blogs/:id.json', 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.launchmystore.io/api/v1/blogs/:id.json",
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([
'name' => '<string>',
'title' => '<string>',
'handle' => '<string>',
'templateSuffix' => '<string>',
'seoTitle' => '<string>',
'seoDesc' => '<string>',
'seoImage' => '<string>'
]),
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.launchmystore.io/api/v1/blogs/:id.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\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.launchmystore.io/api/v1/blogs/:id.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:id.json")
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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {}
}Blogs
Update Blog
Update an existing blog
PUT
/
api
/
v1
/
blogs
/
:id.json
Update Blog
curl --request PUT \
--url https://api.launchmystore.io/api/v1/blogs/:id.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:id.json"
payload = {
"name": "<string>",
"title": "<string>",
"handle": "<string>",
"templateSuffix": "<string>",
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
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({
name: '<string>',
title: '<string>',
handle: '<string>',
templateSuffix: '<string>',
seoTitle: '<string>',
seoDesc: '<string>',
seoImage: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/blogs/:id.json', 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.launchmystore.io/api/v1/blogs/:id.json",
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([
'name' => '<string>',
'title' => '<string>',
'handle' => '<string>',
'templateSuffix' => '<string>',
'seoTitle' => '<string>',
'seoDesc' => '<string>',
'seoImage' => '<string>'
]),
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.launchmystore.io/api/v1/blogs/:id.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\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.launchmystore.io/api/v1/blogs/:id.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:id.json")
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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {}
}Update Blog
Updates an existing blog. Only provided fields will be updated.Request
curl -X PUT "https://api.launchmystore.io/api/v1/blogs/blog_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Latest News",
"handle": "news"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/blogs/blog_abc123.json', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Latest News',
handle: 'news'
})
});
Path Parameters
string
required
The unique blog ID to update
Body Parameters
All parameters are optional. Only provided fields will be updated.string
Internal name of the blog
string
The blog title
string
URL-safe handle
string
Custom template suffix
string
SEO meta title
string
SEO meta description
string
SEO/social share image URL
Response
Returns the standard response envelope with the updated blog underdata.blog.
integer
HTTP status code
string
Result state, e.g.
successstring
Human-readable message (may be
null)object
Wrapper containing the updated
blogExample Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"blog": {
"blogsPageId": "blog_abc123",
"id": "482913",
"name": "Latest News",
"title": "Latest News",
"handle": "news",
"templateSuffix": null,
"seoTitle": null,
"seoDesc": null,
"seoImage": null,
"storeId": "store_abc123",
"createdAt": "2024-01-01T10:00:00.000Z",
"updatedAt": "2024-03-20T15:30:00.000Z"
}
}
}
Notes
- Changing the handle will break existing links to the blog
Errors
On failure the same envelope is returned withstate: "error" and a message:
{
"status": 404,
"state": "error",
"message": "Blog not found",
"data": null
}
| Status | Condition |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have write_content scope |
404 | Blog with the specified ID does not exist |