Skip to content

Write one locale of a content item

PUT
/v1/content/{source}/items/{sourceId}
curl --request PUT \
--url https://your-tenant-host/v1/content/custom/items/post-123 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "language": "en", "contentType": "article", "contentSubtype": "example", "status": "draft", "headline": "example", "description": "example", "promoImage": { "id": "example", "url": "https://images.example.com/dress.jpg", "alt": "example", "caption": "example", "credit": "example", "width": 1, "height": 1 }, "authors": [ { "id": "example", "name": "example", "url": "example", "imageUrl": "example", "bio": "example" } ], "sections": [ { "id": "example", "key": "example", "label": "example", "parentId": "example", "siteId": "example", "primary": true } ], "tags": [ { "id": "example", "key": "example", "label": "example" } ], "body": [ { "additionalProperty": "example" } ], "raw": "example", "firstPublishedAt": "2026-04-15T12:00:00Z", "displayDate": "2026-04-15T12:00:00Z", "scheduledAt": "2026-04-15T12:00:00Z", "sourceUpdatedAt": "2026-04-15T12:00:00Z", "sites": [ { "siteId": "example", "url": "example" } ] }'

Writes one locale of one item of a pushed content source, its whole state: every field is required and null clears it. Never touches the item’s other locales. Needs a key holding content:write; its site pin is not read. At most 2 MiB. 200 answers stored, or stale when sourceUpdatedAt is older than the stored one, and nothing changed. A refused item is a 422 whose error.code says why: invalid_language, unknown_content_type, scheduled_without_scheduled_at, unknown_site, duplicate_site, invalid_site_url, section_without_id, tag_without_id, author_without_id, invalid_image_url, invalid_block or invalid_value (a NUL character in text). Safe to retry, 503 included: the write is whole, and an equal sourceUpdatedAt applies again.

source
required

The content source’s source key, as shown on its page in the console; custom for an organization’s first. It must be pushed: a pulled source, Arc XP or WordPress, answers 409.

string

Example

custom

The content source’s source key, as shown on its page in the console; custom for an organization’s first. It must be pushed: a pulled source, Arc XP or WordPress, answers 409.

sourceId
required

The CMS’s id of the item.

string
>= 1 characters <= 256 characters

Example

post-123

The CMS’s id of the item.

Media typeapplication/json
object
language
required

BCP 47, canonicalised (en_gb is en-GB). Null: the source’s default language. Each language is its own locale of the item.

string | null
>= 1 characters <= 35 characters

Example

en
contentType
required

The CMS’s own content type, verbatim. One the source does not list is refused as unknown_content_type; a source listing none takes any.

string
>= 1 characters <= 128 characters

Example

article
contentSubtype
required

The CMS’s subtype, verbatim.

string | null
status
required

Only published is searchable. scheduled needs scheduledAt, and goes live when a published write arrives. A delete is the DELETE route.

string
Allowed values: draft scheduled published
headline
required

The headline.

string | null
description
required

The standfirst or summary.

string | null
promoImage
required
object
id
required

The CMS’s image id.

string | null
url
required

Absolute https, served verbatim.

string

Example

https://images.example.com/dress.jpg
alt
required

Alt text.

string | null
caption
required

Caption.

string | null
credit
required

Photo credit.

string | null
width
required
integer | null
> 0
height
required
integer | null
> 0
authors
required

Bylines, in credit order. Ids are this source’s own, and EdgeKit keeps them apart from another source’s.

Array<object>
object
id
required

The CMS’s author id. Null: the byline is keyed on its name, shared with every source crediting that name.

string | null
name
required

The byline. Null with an id: a reference, which never blanks a byline already stored.

string | null
url
required

The author’s page.

string | null
imageUrl
required

The author’s photo.

string | null
bio
required

A short bio.

string | null
sections
required
Array<object>
object
id
required

Required: null is refused as section_without_id.

string | null
key
required

A slug.

string | null
label
required

The section’s name.

string | null
parentId
required

The parent section’s id; null at the top.

string | null
siteId
required

An EdgeKit site id the section belongs to; null for every site.

string | null
primary
required

The item’s primary section on its site; null when unknown.

boolean | null
tags
required
Array<object>
object
id
required

Required: null is refused as tag_without_id.

string | null
key
required

A slug.

string | null
label
required
string
>= 1 characters
body
required

Portable Text. block and image blocks are checked (invalid_block, invalid_image_url); any other _type is stored as it is.

Array<object>
object
key
additional properties
raw
required

The CMS payload, if wanted. Null: {}.

object | null
firstPublishedAt
required

When the item was first published.

string | null format: date-time
displayDate
required

The date the item shows.

string | null format: date-time
scheduledAt
required

When the CMS will publish it. Required with scheduled.

string | null format: date-time
sourceUpdatedAt
required

When the CMS last changed it. An older value than the stored one makes the write stale, and it is skipped. Null: the last write wins.

string | null format: date-time
sites
required

The sites it appears on, each once.

Array<object>
object
siteId
required

An EdgeKit site id. Unknown: the item is refused as unknown_site.

string
>= 1 characters
url
required

The item’s path on that site, or an absolute http(s) URL. Anything else is refused as invalid_site_url.

string | null

Stored, or skipped as stale.

Media typeapplication/json
object
result
required

Open: accept a member not listed. Known: stored, stale.

string

Example

{
"result": "stored"
}

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Missing or invalid credential.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Conflicts with an existing record.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request body too large.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

With Retry-After, briefly unavailable; without it, not configured.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

edgekit.ai