Create Article
curl --request POST \
--url https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"content": "<string>",
"handle": "<string>",
"tags": [
{}
],
"image": "<string>",
"template_suffix": "<string>",
"seo_title": "<string>",
"seo_desc": "<string>",
"seo_image": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json"
payload = {
"name": "<string>",
"title": "<string>",
"content": "<string>",
"handle": "<string>",
"tags": [{}],
"image": "<string>",
"template_suffix": "<string>",
"seo_title": "<string>",
"seo_desc": "<string>",
"seo_image": "<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({
name: '<string>',
title: '<string>',
content: '<string>',
handle: '<string>',
tags: [{}],
image: '<string>',
template_suffix: '<string>',
seo_title: '<string>',
seo_desc: '<string>',
seo_image: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.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/:blog_id/articles.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([
'name' => '<string>',
'title' => '<string>',
'content' => '<string>',
'handle' => '<string>',
'tags' => [
[
]
],
'image' => '<string>',
'template_suffix' => '<string>',
'seo_title' => '<string>',
'seo_desc' => '<string>',
'seo_image' => '<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/:blog_id/articles.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<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/blogs/:blog_id/articles.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"data.article": {}
}Blogs
Create Article
Create a new article in a blog
POST
/
api
/
v1
/
blogs
/
:blog_id
/
articles.json
Create Article
curl --request POST \
--url https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"content": "<string>",
"handle": "<string>",
"tags": [
{}
],
"image": "<string>",
"template_suffix": "<string>",
"seo_title": "<string>",
"seo_desc": "<string>",
"seo_image": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json"
payload = {
"name": "<string>",
"title": "<string>",
"content": "<string>",
"handle": "<string>",
"tags": [{}],
"image": "<string>",
"template_suffix": "<string>",
"seo_title": "<string>",
"seo_desc": "<string>",
"seo_image": "<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({
name: '<string>',
title: '<string>',
content: '<string>',
handle: '<string>',
tags: [{}],
image: '<string>',
template_suffix: '<string>',
seo_title: '<string>',
seo_desc: '<string>',
seo_image: '<string>'
})
};
fetch('https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.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/:blog_id/articles.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([
'name' => '<string>',
'title' => '<string>',
'content' => '<string>',
'handle' => '<string>',
'tags' => [
[
]
],
'image' => '<string>',
'template_suffix' => '<string>',
'seo_title' => '<string>',
'seo_desc' => '<string>',
'seo_image' => '<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/:blog_id/articles.json"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<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/blogs/:blog_id/articles.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"handle\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"image\": \"<string>\",\n \"template_suffix\": \"<string>\",\n \"seo_title\": \"<string>\",\n \"seo_desc\": \"<string>\",\n \"seo_image\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"data.article": {}
}Create Article
Creates a new article in the specified blog.Request
curl -X POST "https://api.launchmystore.io/api/v1/blogs/blog_abc123/articles.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Product Launch",
"title": "Summer Product Launch",
"content": "<p>We are excited to announce our summer collection...</p>",
"tags": ["summer", "announcements"],
"image": "https://example.com/summer-launch.jpg"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/blogs/blog_abc123/articles.json', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Summer Product Launch',
title: 'Summer Product Launch',
content: '<p>We are excited to announce our summer collection...</p>',
tags: ['summer', 'announcements'],
image: 'https://example.com/summer-launch.jpg'
})
});
Path Parameters
The unique blog ID to create the article in
Body Parameters
Fields may be sent at the top level, or nested under anarticle object.
Internal article name
The article title
Article body content (HTML)
URL-safe handle. Auto-generated from the title if not provided.
Array of tag strings (e.g.,
["summer", "sale", "featured"])Featured image URL
Custom template suffix (e.g.,
featured for article.featured.liquid)Custom page title for search engines
Meta description for search engines
Social/share image URL for search engines
Response
The response uses the standard{ status, state, message, data } envelope.
On success state is "success" and the created article is returned under
data.article.
HTTP status code (
201 on success)"success" or "error"The created article object
Example Response
{
"status": 201,
"state": "success",
"message": null,
"data": {
"article": {
"blogId": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
"id": "418273",
"name": "Summer Product Launch",
"title": "Summer Product Launch",
"handle": "summer-product-launch",
"content": "<p>We are excited to announce our summer collection...</p>",
"image": "https://example.com/summer-launch.jpg",
"tags": ["summer", "announcements"],
"templateSuffix": null,
"seoTitle": null,
"seoDesc": null,
"seoImage": null,
"blogsPageId": "blog_abc123",
"storeId": "f73049dc-b4d4-4f85-99c2-681a5e351a8a",
"createdAt": "2024-03-20T10:00:00.000Z",
"updatedAt": "2024-03-20T10:00:00.000Z"
}
},
"count": null,
"pagination": null
}
Error Codes
Errors return the same envelope withstate: "error" and a message.
| Status | message | When |
|---|---|---|
400 | Missing required fields: name, title, content | A required field is missing or blank |
401 | — | Invalid or missing access token |
403 | — | App doesn’t have the write_content scope |
500 | error detail | Unexpected server error |
⌘I