How it connects
This page is for a blog that runs on its own system, with no API yet. If your blog system is already listed in the Custom blog API card, pick it there instead: nothing on this page needs building.
- Build the endpoints below under one address on your server, for example https://www.example.com/api/proofsource.
- Create a key for Proofsource: a long random string your API accepts. Keep it on your server.
- In Proofsource, open Integrations, choose Custom blog API, and pick Proofsource blog API as the blog system.
- Paste your API address and the key. Proofsource reads one page of your posts to confirm both work.
Proofsource changes your blog only for a fix you approved, and only through these endpoints.
Authentication
Every request sends the key as a Bearer token. Requests and responses are JSON in UTF-8, except image uploads, which are multipart/form-data. Times are ISO 8601 in UTC. Serve the API over https only.
Authorization: Bearer {key}- A missing or wrong key returns 401 (403 also works).
- One key belongs to Proofsource only, so you can turn it off without touching anything else.
- To change the key, create a new one, paste it in the card, then retire the old one.
Endpoints at a glance
Paths are relative to your API address and end with a slash. A method not listed here may return 405.
| Method | Path | What it does |
|---|---|---|
| GET | /posts/ | List posts, newest first; find one by slug |
| POST | /posts/ | Create a post |
| GET | /posts/{id}/ | Get one post |
| PATCH | /posts/{id}/ | Change only the fields sent |
| POST | /images/ | Upload an image used in a post |
| GET | /metadata/{slug}/ | Get a post page's title, description and structured data |
| PUT | /metadata/{slug}/ | Set them |
| GET | /tags/ | List tags |
The post object
| Field | Type | Rules |
|---|---|---|
| id | string | Read-only. Set by your blog; never changes |
| title | string | Required on create. Accept at least 200 characters |
| slug | string | Required on create. Lowercase letters, numbers and hyphens; unique. Accept at least 200 characters |
| url | string | Read-only. The post's full public https address. Return it on every post, whatever its status |
| content | string (HTML) | The post body. See HTML your blog keeps |
| excerpt | string | Summary for cards and lists. Accept at least 300 characters |
| status | string | draft, published, unpublished or deleted. See Statuses |
| author | string | Display name. Optional |
| tags | array of strings | Tag names. Each must exist; see Tags |
| updated_at | string (date-time) | Read-only. When the post last changed |
Your blog builds the public address, so return it in url. Proofsource links to that address in its reports and checks the live page there. Extra fields of your own are fine: Proofsource ignores what it does not know.
{
"id": "6b1d3c0e-58f4-4a7e-9a51-2f0c9d7e4b12",
"title": "How to plan a spring vegetable garden",
"slug": "plan-a-spring-vegetable-garden",
"url": "https://www.example.com/blog/plan-a-spring-vegetable-garden",
"content": "<h2 id=\"when-to-start\">When to start</h2><p>Six weeks before the last frost.</p>",
"excerpt": "What to sow, when, and how much space each crop needs.",
"status": "published",
"author": "Example Garden Team",
"tags": ["vegetables", "spring"],
"updated_at": "2026-12-03T10:33:56Z"
}List and find posts
GET /posts/ returns posts newest first, in pages. Proofsource asks for up to 50 at a time.
| Parameter | Example | Effect |
|---|---|---|
| slug | slug=plan-a-spring-vegetable-garden | Only the post with this slug: one result or none |
| mine | mine=true | Only posts created with this key |
| limit | limit=50 | Page size |
| offset | offset=50 | Where the page starts |
curl "https://www.example.com/api/proofsource/posts/?slug=plan-a-spring-vegetable-garden" \
-H "Authorization: Bearer $KEY"{
"count": 1,
"results": [ { "id": "6b1d3c0e-...", "slug": "plan-a-spring-vegetable-garden", "...": "every post field" } ]
}count is the number of matching posts across all pages. A slug with no post returns 200 with an empty results list, not 404. GET /posts/{id}/ returns one post, or 404.
Create a post
POST /posts/ creates a post. With no status it starts as a draft, so nothing is public until it is published. It returns 201 with the full post, including its id and url.
curl -X POST "https://www.example.com/api/proofsource/posts/" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "How to plan a spring vegetable garden",
"slug": "plan-a-spring-vegetable-garden",
"excerpt": "What to sow, when, and how much space each crop needs.",
"content": "<h2>When to start</h2><p>Six weeks before the last frost.</p>",
"tags": ["vegetables"]
}'A slug already in use returns 400 with a slug error. Return content as you saved it: Proofsource compares it with what it sent to see what your blog removed.
Update, publish or remove a post
PATCH /posts/{id}/ changes only the fields sent and returns 200 with the full post. Arrays such as tags are replaced, not merged. Publishing is a PATCH of status.
curl -X PATCH "https://www.example.com/api/proofsource/posts/{id}/" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"status": "published"}'Posts are never deleted for good through the API. Setting status to deleted takes a post off your site; setting another status brings it back.
Statuses
| status | Meaning |
|---|---|
| draft | Saved, not on your site yet. New posts start here |
| published | On your site at url |
| unpublished | Taken off your site; can be published again |
| deleted | Removed from your site, but kept so it can be restored |
Images
POST /images/ takes one image as multipart/form-data in the field file, stores it where your blog serves images, and returns 201 with its public https address. Accept JPEG, PNG and WebP. Every upload gets its own address.
curl -X POST "https://www.example.com/api/proofsource/images/" \
-H "Authorization: Bearer $KEY" \
-F "file=@raised-beds.jpg"{"url": "https://www.example.com/images/raised-beds-20261203.jpg"}A file that is not an image returns 400 with a file error.
Page metadata
Each post page has its own search title, meta description, share image and structured data (JSON-LD), stored by slug. Your blog writes them into the page head.
| Field | Type | Rules |
|---|---|---|
| title | string or null | Page title for search results. Accept at least 100 characters |
| description | string or null | Meta description. Accept at least 300 characters |
| image | string or null | Read-only. The share image's address |
| data | object | Structured data as {"json_ld": [ ... ]}, a list of schema.org objects. Refuse any < in it with 400 |
GET /metadata/{slug}/ returns them; a post with none set returns nulls and an empty data object. PUT /metadata/{slug}/ changes only the fields sent and returns 200 with the saved metadata; data, when sent, replaces the whole object. A slug with no post returns 404.
curl -X PUT "https://www.example.com/api/proofsource/metadata/plan-a-spring-vegetable-garden/" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "What to sow in spring, when to start, and how much space each crop needs.",
"data": {"json_ld": [{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": []}]}
}'Tags
GET /tags/ lists your blog's tags, alphabetically, in the same pages as posts. search narrows the list to names that contain it. Proofsource only uses tags that already exist; it never creates one.
{
"count": 1,
"results": [ { "name": "vegetables" } ]
}HTML your blog keeps
Keep at least these tags and attributes when you save content. Proofsource sends nothing else, and shows you the post exactly as your blog will keep it before you approve it. Remove anything else on save, especially scripts, styles, iframes and on* attributes.
| Use | Tags | Attributes |
|---|---|---|
| Headings | <h1>, <h2>, <h3>, <h4>, <h5>, <h6> | id, for in-page links |
| Text | <p>, <br>, <hr>, <span>, <strong>, <b>, <em>, <i>, <u>, <s>, <sup>, <sub> | None |
| Lists | <ul>, <ol>, <li> | None |
| Links | <a> | href, title, target, rel |
| Images | <img> | src, alt, title, width, height |
| Quotes and code | <blockquote>, <pre>, <code> | None |
| Tables | <table>, <caption>, <thead>, <tbody>, <tfoot>, <tr>, <th>, <td> | colspan and rowspan on th and td; scope on th |
| Figures | <figure>, <figcaption> | None |
| Expandable sections | <details>, <summary> | open on details |
HTML comments may be removed. Proofsource never relies on them.
Errors
| Code | When | Body |
|---|---|---|
| 400 | A field is wrong; nothing is saved | {"slug": ["This slug is already in use"]}: one list of messages per field |
| 401 or 403 | The key is missing or wrong | {"detail": "..."} |
| 404 | No such post, or no post at that slug | {"detail": "..."} |
| 405 | The method is not offered | Any |
| 429 | Too many requests | Send Retry-After in seconds |
| 500 to 504 | Your server could not answer | Any |
Allow at least 60 requests a minute from one key. Do not redirect API requests: Proofsource does not follow redirects, so serve the API at the exact address you connect.
Checklist before you connect
- Every path answers under one https address, with the trailing slash.
- A wrong key gets 401 or 403; the right key gets 200.
- GET /posts/?slug=... finds one post; an unknown slug gives an empty results list.
- POST /posts/ with no status saves a draft that is not on your site.
- Every post carries its public https address in url.
- PATCH changes only the fields sent, and status published puts the post live.
- Saved content keeps the tags above and drops everything else.
- POST /images/ returns an image address that loads in a browser.
- PUT /metadata/{slug}/ writes the title, description and JSON-LD into the post page's head.
- 400 answers name the field that is wrong.