Snapps Blog API Documentation

Authentication

All requests require an Api-Key header.
You can view your API key here.

Api-Key: YOUR_API_KEY

Base URL

https://api.snapps.ai/v1

Example API Call (Postman / cURL)

GET https://api.snapps.ai/v1/posts/your-site-id-here

Headers:
Api-Key: YOUR_API_KEY
Accept: application/json

How to Get Your site_id

To retrieve your site_id, follow these steps:

  1. Log in to your Snapps dashboard and go to the My Sites page.
  2. You'll see a list of all your websites. Each site has a three-dot icon (⋮) next to the site status.
  3. Click the three-dot icon to open a dropdown menu.
  4. Select Copy Site ID from the dropdown. This will copy the site_id to your clipboard.

1. Get All Blog Posts

GET /posts/{site_id}
Sample Response:
{
  "data": {
    "results": [
      {
        "id": "abc123postid001",
        "title": "First Blog Title",
        "status": "PUBLISHED",
        "path": "first-blog-post",
        "creation_date": "2025-03-27T10:00:00",
        "publish_date": "2025-03-27T10:00:00",
        "thumbnail": {"url": "https://example.com/thumb.jpg"},
        "main_image": {"url": "https://example.com/main.jpg"}
      }
    ],
    "limit": 10,
    "offset": 0,
    "total_responses": 1
  }
}

2. Get Single Blog Post

GET /posts/{site_id}/{post_id}
Sample Response:
{
  "id": "abc123postid001",
  "title": "First Blog Title",
  "status": "PUBLISHED",
  "path": "first-blog-post",
  "creation_date": "2025-03-27T10:00:00",
  "publish_date": "2025-03-27T10:00:00",
  "thumbnail": {"url": "https://example.com/thumb.jpg"},
  "main_image": {"url": "https://example.com/main.jpg"}
}

3. Save Draft Blog Post

POST /posts/{site_id}/draft
Sample Response:
{
  "id": "draft123postid001",
  "title": "Updated - My Awesome Blog Post",
  "description": "This is a short summary of the post.",
  "author": "John Doe",
  "thumbnail": {"url": "https://example.com/thumb.jpg"},
  "main_image": {"url": "https://example.com/cover.jpg"}
}

4. Update Blog Post Meta

PATCH /posts/{site_id}/{post_id}
Sample Response:
{
  "message": "Post updated successfully.",
  "site_id": "site987xyz",
  "post_id": "update123postid001"
}

5. Publish Blog Post

POST /posts/{site_id}/{post_id}/publish
Sample Response:
{
  "message": "Post published successfully.",
  "site_id": "site987xyz",
  "post_id": "pub123postid001"
}

6. Unpublish Blog Post

POST /posts/{site_id}/{post_id}/unpublish
Sample Response:
{
  "message": "Post unpublished successfully.",
  "site_id": "site987xyz",
  "post_id": "unpub123postid001"
}

7. Delete Blog Post

DELETE /posts/{site_id}/{post_id}
Sample Response:
{
  "message": "Post deleted successfully.",
  "site_id": "site987xyz",
  "post_id": "del123postid001"
}

Notes

Powered by Snappssnapps.ai