Getting Started
QuickstartConceptsRecommended SetupsAuthenticationAPIs
Delivery APIOutbound WebhooksLogsIngest WebhookImagesErrorsLibraries
TypeScript SDKReference
Plans and LimitsQuickstart
Copper CMS is the back end for a content site.
v1Stable
Get an API Key
Open API keys in the console. Pick a site. Issue a key. The key is shown once.
ck_a41f9c2e77b1.8f2c4e1d9a03b7c6e5f4a2d1c0b9a8e7.k3Rd…
A key reads and deletes articles on the site it was issued for. 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 API 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.
