Create Page
curl --request POST \
--url https://api.launchmystore.io/api/v1/pages.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"templateSuffix": "<string>",
"link": "<string>",
"showtitle": true,
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/pages.json"
payload = {
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"templateSuffix": "<string>",
"link": "<string>",
"showtitle": True,
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
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: '<string>',
handle: '<string>',
content: '<string>',
templateSuffix: '<string>',
link: '<string>',
showtitle: true,
seoTitle: '<string>',
seoDesc: '<string>',
seoImage: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/pages.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/pages.json",
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' => '<string>',
'handle' => '<string>',
'content' => '<string>',
'templateSuffix' => '<string>',
'link' => '<string>',
'showtitle' => true,
'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/pages.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\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.launchmystore.io/api/v1/pages.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/pages.json")
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\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\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": {}
}Pages
Create Page
Create a new page
POST
/
api
/
v1
/
pages.json
Create Page
curl --request POST \
--url https://api.launchmystore.io/api/v1/pages.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"templateSuffix": "<string>",
"link": "<string>",
"showtitle": true,
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/pages.json"
payload = {
"title": "<string>",
"handle": "<string>",
"content": "<string>",
"templateSuffix": "<string>",
"link": "<string>",
"showtitle": True,
"seoTitle": "<string>",
"seoDesc": "<string>",
"seoImage": "<string>"
}
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: '<string>',
handle: '<string>',
content: '<string>',
templateSuffix: '<string>',
link: '<string>',
showtitle: true,
seoTitle: '<string>',
seoDesc: '<string>',
seoImage: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/pages.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/pages.json",
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' => '<string>',
'handle' => '<string>',
'content' => '<string>',
'templateSuffix' => '<string>',
'link' => '<string>',
'showtitle' => true,
'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/pages.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\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.launchmystore.io/api/v1/pages.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\n \"seoTitle\": \"<string>\",\n \"seoDesc\": \"<string>\",\n \"seoImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/pages.json")
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\": \"<string>\",\n \"handle\": \"<string>\",\n \"content\": \"<string>\",\n \"templateSuffix\": \"<string>\",\n \"link\": \"<string>\",\n \"showtitle\": true,\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": {}
}Create Page
Creates a new page in the store.Request
curl -X POST "https://api.launchmystore.io/api/v1/pages.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Shipping Policy",
"content": "<h2>Shipping Information</h2><p>We ship worldwide...</p>"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/pages.json', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Shipping Policy',
content: '<h2>Shipping Information</h2><p>We ship worldwide...</p>'
})
});
Body Parameters
Only the fields listed below are persisted. Any other keys in the body are ignored.string
required
The page title
string
URL-safe handle. Provide one — if omitted, the handle is stored as
null
(there is no auto-slugify from the title).string
Page content (HTML)
string
Custom template suffix (e.g.,
contact for page.contact.liquid)string
Optional external link for the page
boolean
default:"true"
Whether to display the page title on the storefront
string
Custom page title for search engines
string
Meta description for search engines
string
Open Graph / social share image URL
Response
integer
HTTP status code (
201 on success)string
Outcome state,
success on successstring
Human-readable message,
null on successobject
Wrapper containing the created
page objectExample Response
{
"status": 201,
"state": "success",
"message": null,
"data": {
"page": {
"pageId": "8f3c2a91-7d4e-4b6a-9c1f-2e5d8a0b3c7e",
"id": "473829",
"title": "Shipping Policy",
"handle": "shipping-policy",
"templateSuffix": null,
"link": null,
"content": "<h2>Shipping Information</h2><p>We ship worldwide...</p>",
"seoTitle": null,
"seoDesc": null,
"seoImage": null,
"showtitle": true,
"storeId": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"createdAt": "2024-03-20T10:00:00.000Z",
"updatedAt": "2024-03-20T10:00:00.000Z"
}
},
"pagination": null
}
Error Response
Whentitle is missing or blank, the request returns a 400 envelope:
{
"status": 400,
"state": "error",
"message": "Missing required field: title",
"data": null
}
Error Codes
| Status | State | Description |
|---|---|---|
401 | error | Invalid or missing access token |
403 | error | App doesn’t have write_content scope |
400 | error | Missing required field (e.g. title) |