> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shopsniffer.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a blog post (admin only)

` POST /blog `

Create a blog post (admin only)

## Servers

- ` https://shopsniffer.com/api `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` BearerAuth `: ` http `

  - HTTP scheme: ` bearer `

  - Clerk JWT token

## Request body (required)

Content type: ` application/json `

- ` value `: type ` unknown `

## Responses

### ` 201 ` — Post created

### ` 400 ` — Missing required fields

### ` 401 ` — Unauthorized

### ` 403 ` — Admin access required

### ` 409 ` — Slug already exists

## Request examples

### cURL

```curl
curl -X POST 'https://shopsniffer.com/api/blog' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d 'null'
```

### JavaScript

```javascript
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);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://shopsniffer.com/api/blog', headers=headers, json=null)
print(response.json())
```