Skip to main content
POST
/
api
/
v1
/
blogs.json
Create Blog
curl --request POST \
  --url https://api.launchmystore.io/api/v1/blogs.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "handle": "<string>",
  "commentable": "<string>",
  "template_suffix": "<string>",
  "metafields": [
    {
      "namespace": "<string>",
      "key": "<string>",
      "value": "<string>",
      "type": "<string>"
    }
  ]
}
'
{
  "success": true,
  "data": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Create Blog

Creates a new blog in the store.

Request

curl -X POST "https://api.launchmystore.io/api/v1/blogs.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Company News",
    "commentable": "moderate"
  }'

Body Parameters

title
string
required
The blog title
handle
string
URL-safe handle. Auto-generated from title if not provided.
commentable
string
default:"no"
Comment setting:
  • no - Comments disabled
  • moderate - Comments require approval
  • yes - Comments auto-approved
template_suffix
string
Custom template suffix for theming (e.g., news for blog.news.liquid)
metafields
array
Array of metafields to attach to the blog

Response

success
boolean
Whether the request succeeded
data
object
The created blog object

Example Response

{
  "success": true,
  "data": {
    "id": "blog_new789",
    "title": "Company News",
    "handle": "company-news",
    "commentable": "moderate",
    "articles_count": 0,
    "feedburner": null,
    "feedburner_location": null,
    "template_suffix": null,
    "tags": [],
    "created_at": "2024-03-20T10:00:00Z",
    "updated_at": "2024-03-20T10:00:00Z"
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_content scope
VALIDATION_ERRORInvalid request body (see error details)
DUPLICATE_HANDLEA blog with this handle already exists