Scaup Developers scaup.io

Scaup Custom API

Scaup improves your website every day: page titles, descriptions, text, links and new articles. If your site runs on a platform we do not connect to yet, build the endpoints on this page and Scaup will work through them.

General rules

Required endpoints

These endpoints cover page titles, descriptions, text edits and new articles.

GET/pages?page=1&per_page=100

Lists every published page and post. Returns id, type (page or post), url, title, status and updated_at.

GET/pages/{id}

Returns one page with the fields Scaup can edit.

{
  "id": "abc123",
  "type": "post",
  "url": "https://yoursite.com/blog/my-post",
  "status": "published",
  "version": 17,
  "seo_title": "...",
  "meta_description": "...",
  "body_html": "<p>...</p>",
  "updated_at": "2026-11-04T10:00:00Z"
}
PATCH/pages/{id}

Changes only the fields that Scaup sends, then publishes the page.

{ "version": 17, "seo_title": "New title" }
  1. version is required. It is the version Scaup read in the GET call.
  2. If the page changed since then, return 409 Conflict and save nothing. This protects edits that your team made.
  3. Do not change any field that Scaup did not send.
POST/posts

Creates a new article and publishes it. Also accept "status": "draft". Return the new id and url.

{
  "title": "...",
  "slug": "my-new-article",
  "body_html": "<h2>...</h2><p>...</p>",
  "seo_title": "...",
  "meta_description": "...",
  "featured_image_url": "https://...",
  "status": "published"
}
PATCH/pages/{id} with { "status": "draft" }

Unpublishes a page. Scaup uses this to undo an article it created. Scaup does not need a delete endpoint.

Add these fields to GET and PATCH /pages/{id}:

Add these site files:

Optional: POST /media (multipart upload, returns a public URL). Without it, Scaup links only to images that already exist on your site.

Rules for your site

Security rules

Treat every request as untrusted, even when it comes from Scaup. If the key ever leaks, these checks keep your site safe. How Scaup handles your key is on the Security page.

Allow only the HTML that Scaup sends

Check body_html on your server before you save it. Reject the request if it has anything outside this list. Do not try to clean it; return 400 instead.

Check the other fields

Protect the key

Test your API

Your API is ready only when an acceptance check passes. The check is a small script that tests the API from the outside, over HTTP. Section 6 of the agent prompt lists every check it must run.

  1. Build the check script, or let your coding agent build it from the prompt.
  2. On staging, create one published test page. The script changes it and then puts it back.
  3. Run the script on staging. Fix every line marked FAIL. SKIP is fine for recommended parts you did not build.
  4. When the last line says RESULT: READY, send us the full output and tell us how to run the script.

We run our own checks on staging before we connect your site.

Checklist

  1. Build the required endpoints.
  2. Build the recommended endpoints if you can.
  3. Add the security rules.
  4. Run the acceptance check until it says RESULT: READY.
  5. Send Scaup the base URL, the API key, the check output and a list of any field names that differ from this page.

Agent prompt

If you use an AI coding agent (Claude Code, Cursor, Copilot), paste this prompt into it. It asks the agent to build everything on this page, with the security checks and the acceptance check.

Open as Markdown
Loading the prompt. If it does not show, use "Open as Markdown".