Skip to content

Write content items in bulk

POST
/v1/content/{source}/items
curl --request POST \
--url https://your-tenant-host/v1/content/custom/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "sourceId": "post-123", "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 up to 100 items, each as PUT takes it plus its sourceId, at most 10 MiB in all. One refused item stores the rest. 200 answers one result per item, in request order: stored, stale or rejected with its reason. 422 is only for a malformed request. Safe to retry, 503 included: each write is whole.

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.

Media typeapplication/json
object
items
required

At most 100; over is a 413.

Array<object>

One item, as PUT takes it, plus its sourceId.

object
sourceId
required

The CMS’s id of the item.

string
>= 1 characters <= 256 characters

Example

post-123
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

One result per item.

Media typeapplication/json
object
results
required
Array<object>
object
sourceId
required
string
language
required

The locale as stored.

string
result
required

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

string
reason

Open: accept a member not listed. Known: 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, invalid_value, unknown_item.

string

Example

{
"results": [
{
"result": "stored",
"reason": "invalid_language"
}
]
}

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