Endpoints
Four operations — push one item, push a batch, delete one, delete a batch.
All paths below are relative to:
https://app.getembrin.comOne base URL for every publisher — your key identifies the team, so there is no per-company subdomain and no account ID in the path.
The curl examples are written for Postman and use its {{EMBRIN_URL}} and
{{API_KEY}} environment variables — see
Set your credentials. Pointing them at a local
or staging instance is then a matter of switching environment. Outside Postman,
substitute the values directly.
Every request needs Authorization: Bearer emb_live_…, and every request with
a body needs Content-Type: application/json.
| Method | Path | What it does |
|---|---|---|
PUT | /api/v1/content/{id} | Create or replace one item |
POST | /api/v1/content | Create or replace up to 100 |
DELETE | /api/v1/content/{id} | Delete one item |
DELETE | /api/v1/content | Delete up to 100 |
{id} is your identifier for the item — the one your CMS already uses.
See Content schema for the
characters it may contain.
Push one item
Use this for event-driven pushes: fire it from your CMS when something is
published or updated. PUT is idempotent by definition, so it is safe for your
webhook handler to retry.
curl -X PUT "{{EMBRIN_URL}}/api/v1/content/cms-1041" \
-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.",
"url": "https://example.com/story/1041",
"type": { "type_id": "article", "title": "Article" },
"source": { "source_id": "arc-xp", "title": "Arc XP (Main site)" },
"category": { "category_id": "sites/environment", "title": "Environment" },
"parameters": {
"region": { "type": "string", "value": "EU" },
"featured": { "type": "boolean", "value": true }
},
"tags": ["flooding", "climate", "Millbank"],
"lang": "en-GB",
"state": "published",
"published_at": "2026-07-30T08:00:00Z"
}'await fetch(`${process.env.EMBRIN_URL}/api/v1/content/cms-1041`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.EMBRIN_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Lakeshore flood defences hold through record rainfall',
summary: 'Three days of sustained rain tested the new barriers.',
url: 'https://example.com/story/1041',
type: { type_id: 'article', title: 'Article' },
source: { source_id: 'arc-xp', title: 'Arc XP (Main site)' },
category: { category_id: 'sites/environment', title: 'Environment' },
parameters: {
region: { type: 'string', value: 'EU' },
featured: { type: 'boolean', value: true },
},
tags: ['flooding', 'climate', 'Millbank'],
lang: 'en-GB',
state: 'published',
published_at: '2026-07-30T08:00:00Z',
}),
});type, parameters and tags are all optional — the example carries them so
you can see the shape. Omitting type files the item under article; omitting
tags leaves the item with none.
Responds 201 when the item is new, 200 when it replaced an existing one:
{
"request_id": "0f3b8e2a-…",
"external_id": "cms-1041",
"status": "created",
"id": "9c2f…"
}A 2xx always means the item was written. When it was not, the answer is
400: either a request-level error (the body failed validation), or the same
single-item shape with "status": "failed" and the item's error, as in a
batch result:
{
"request_id": "0f3b8e2a-…",
"external_id": "cms-1041",
"status": "failed",
"error": { "code": "invalid_published_at", "message": "published_at is not a valid ISO 8601 date." }
}So a webhook handler that only checks for 2xx never records a refused item as
delivered. See Errors for the codes.
Do not put your content ID in the body — it belongs in the path. Sending both would mean inventing a rule for when
they disagree, so a body containing external_id is rejected outright.
Push a batch
Use this for imports and backfills. Up to 100 items per request, and up to
1 MiB of body. The array is called content.
curl -X POST "{{EMBRIN_URL}}/api/v1/content" \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"content": [
{ "external_id": "cms-1041", "title": "…", "summary": "…", "state": "draft",
"source": { "source_id": "arc-xp", "title": "Arc XP (Main site)" },
"category": { "category_id": "sites/environment", "title": "Environment" },
"tags": ["flooding", "climate"] },
{ "external_id": "cms-1042", "title": "…", "summary": "…", "state": "draft",
"type": { "type_id": "travel", "title": "Travel" },
"source": { "source_id": "arc-xp", "title": "Arc XP (Main site)" },
"category": { "category_id": "sites/business", "title": "Business" },
"tags": ["City-Breaks", "Climate"] }
]
}'A batch may mix types freely — the first item above has none and lands under
article, the second is a travel piece.
Repeating the same source, category, type or tag on every item is
expected — we deduplicate them, and a batch that declares one site a hundred
times touches that site's record once. Tags ignore case, so climate and
Climate above are one tag, shown as Climate, the spelling that came last.
Always responds 207 Multi-Status with a result for each item, even when
every one succeeded — see Errors.
{
"request_id": "0f3b8e2a-…",
"results": [
{ "external_id": "cms-1041", "status": "created", "id": "9c2f…" },
{ "external_id": "cms-1042", "status": "updated", "id": "1ab7…" }
],
"summary": { "total": 2, "succeeded": 2, "failed": 0 }
}An item may appear only once per batch. Sending the same external_id twice is
rejected with 400 — we cannot know which of the two you meant.
Delete one item
curl -X DELETE "{{EMBRIN_URL}}/api/v1/content/cms-1041" \
-H "Authorization: Bearer {{API_KEY}}"{ "request_id": "…", "external_id": "cms-1041", "status": "deleted" }Deleting something that is already gone returns 200 with
"status": "not_found", not an error. The end state you wanted is the end state
you have, so a retried delete is safe.
Delete a batch
curl -X DELETE "{{EMBRIN_URL}}/api/v1/content" \
-H "Authorization: Bearer {{API_KEY}}" \
-H "Content-Type: application/json" \
-d '{ "external_ids": ["cms-1041", "cms-1042"] }'Responds 207 with a per-item result, the same shape as a batch push.
Other methods
Any other method on these paths (GET, PATCH, POST to a single item, PUT
to the batch path) is answered 405 with the method_not_allowed error and an
Allow header listing the methods the path does serve.
Every response carries a request ID
X-Request-Id is on every response, and request_id is in every body. It is
the same ID you will see in API keys → Logs — quote it when you get in touch
about a specific call.