Quickstart

Copper CMS is the back end for a content site.

v1Stable

Get a delivery key

Open Delivery keys in the console. Pick a site. Issue a key. The key is displayed then and never again.

ck_a41f9c2e77b1.8f2c4e1d9a03b7c6e5f4a2d1c0b9a8e7.k3Rd…

A key reads the site it was issued for. The site is fixed at that point. No site name appears in any url below.

Read the articles

With the SDK:

import { createClient } from '@coppercms/sdk'

const copper = createClient({ apiKey: process.env.COPPER_KEY })

const { data, nextCursor } = await copper.listPosts({ limit: 20 })
const post = await copper.getPost('a-new-office-in-lisbon')

Or over HTTP:

GET https://api.coppercms.com/v1/wire/posts?limit=20
authorization: Bearer ck_a41f…

200 OK
cache-control: private, max-age=60, stale-while-revalidate=3600

Every field and filter is on Delivery API.

Get told when an article is ready

Add an endpoint under Outbound webhooks. Copper CMS posts to it when an article changes.

POST https://example.com/hooks/copper
x-copper-event: post.published
x-copper-signature: 4f1c…

{ "id": "5c0f…", "event": "post.published", "data": { "slug": "a-new-office-in-lisbon" } }

The message names the article. It does not carry the article. Fetch the body with the delivery key.

See Outbound webhooks.

Let a partner send articles in

Create a source. Copper CMS issues a url. Hand it over unchanged.

POST https://api.coppercms.com/v1/hook/8f2c…c1a9.k3Rd…
content-type: application/json

{ "title": "…", "body": "…" }

See Ingest webhook.

Next