EmbrinDocs
Content API

Content API

Push content from your own systems into Embrin, so editors can curate it into newsletters.

The Content API is how your content reaches Embrin. Your CMS pushes items to it; editors browse and curate what arrives.

Content is a mirror. Your systems own it, and nothing inside Embrin edits it — a team owner can remove an item from the Content tab, but the next push that includes it will bring it back. That means you never have to reconcile two versions of a story.

Before you start

Switch the Content API on first

The Content API is off by default for every team. A team owner turns it on in the team's Settings → Content API. Until then the team's Content and API keys pages are hidden, and every push is refused with 403 content_api_disabled.

Once it is on, you need an API key. A team owner creates one on the team's API keys page under Create key. The key is shown once and never again; store it in your secrets manager straight away.

Give each system its own key — your CMS, a backfill script, a partner feed. Keys are revoked independently, and the ingestion logs name the key that made each call, so when something breaks you can tell which system did it.

Quickstart

Enable the Content API

A team owner opens the team's Settings page and switches on Content API. Content and API keys appear in the team's navigation straight away — Content for every member, API keys for owners only. Skip this step if they are already there.

Then create a key on the API keys page, as described in Before you start.

Set your credentials

Every example here is written for Postman. Create an environment with two variables:

VariableValue
EMBRIN_URLhttps://app.getembrin.com
API_KEYemb_live_…

That base URL is the same for every publisher — there is no per-company subdomain to look up. Your key is what identifies your team, which is also why no account or workspace ID appears anywhere in these requests.

{{ EMBRIN_URL }} and {{ API_KEY }} are substituted by Postman, not by your shell. To run these from a terminal instead, export them and swap the braces for $EMBRIN_URL and $API_KEY.

Push your first item

curl -X PUT "{{EMBRIN_URL}}/api/v1/content/my-first-item" \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Lakeshore flood defences hold through record rainfall",
    "summary": "Three days of sustained rain tested the new barriers at Millbank.",
    "url": "https://example.com/story/1041",
    "source": { "source_id": "arc-xp", "title": "Arc XP (Main site)" },
    "category": { "category_id": "sites/environment", "title": "Environment" },
    "state": "published",
    "published_at": "2026-07-30T08:00:00Z"
  }'

source is the site or platform you are syncing from — it earns its keep when you push from more than one, since editors can then curate each into its own newsletter. category is the section the story is filed under. Both are how you will filter this item later, and you do not register either up front: the first push creates them, and later pushes keep their titles current. See Sources and categories.

There is no type in that request, so the item is filed under article — the default. Push a type when you start sending more than one kind of thing; see Content types.

A 201 means it was created; 200 means it replaced an item you had already pushed under that ID.

Check it arrived

Open your team's Content tab in Embrin. Your story is there.

If it is not, a team owner can open API keys → Logs. Every authenticated call is recorded, and failed calls keep what we received (up to the first 64 KiB) along with the reason it was rejected.

Authentication

Send your key as a bearer token on every request:

Authorization: Bearer emb_live_…

That is the only credential you need. The key identifies your team by itself, so there is no account ID or workspace ID to send.

Embrin stores only a hash of your key, so a lost key cannot be recovered — only replaced. Never put it in client-side code, a public repository, or a URL.

The one rule worth knowing

Every push replaces the whole item. A push declares what the item is right now, so any field you leave out is cleared — not preserved.

// First push
{ "title": "Council budget", "summary": "…", "url": "https://example.com/1", "state": "draft", "source": {…}, "category": {…} }

// Later push, url omitted → the url is now empty
{ "title": "Council budget", "summary": "…", "state": "draft", "source": {…}, "category": {…} }

Always send the complete item. Your CMS has all of it anyway.

The rule covers the optional fields too, and this is where it surprises people:

  • Omitting parameters clears every custom parameter on that item.
  • Omitting tags removes every tag from that item.
  • Omitting type files the item back under article. If it was a travel piece, it stops being one.
  • Omitting a url inside source or category clears it for that section everywhere, not just on this item.

Where to go next