Create a blog post (admin only)
POST
/blog
Authentication
Bearer Token
Request Body required
application/jsonunknown
Responses
201
Post created
No response body
400
Missing required fields
401
Unauthorized
403
Admin access required
409
Slug already exists
curl -X POST 'https://shopsniffer.com/api/blog' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d 'null'
const response = await fetch('https://shopsniffer.com/api/blog', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify(null)});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://shopsniffer.com/api/blog', headers=headers, json=null)print(response.json())
API Playground
Try this endpoint
POST
/blog