Skip to content

Re-read changed items from the CMS

POST
/v1/content/sync
curl --request POST \
--url 'https://your-tenant-host/v1/content/sync?source=wordpress' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source": "wordpress", "events": [ { "id": "example", "type": "example" } ] }'

Enqueues one re-read per id from one of the organization’s pulled content sources, named by its source key as source in the body or the query. The body names ids and never content, so a caller can cause a refetch and nothing else. 200 means enqueued. 422: no source, or it names no pulled source. Safe to retry: re-reads of one id within seconds are debounced into one.

source

The source key, for a caller that cannot put source in the body. The body’s wins.

string
>= 1 characters <= 64 characters

Example

wordpress

The source key, for a caller that cannot put source in the body. The body’s wins.

Media typeapplication/json
object
source

The source key of the content source the ids belong to, as shown on its page in the console. It must be pulled. Required here or as the source query parameter.

string
>= 1 characters <= 64 characters

Example

wordpress
events
required
Array<object>
>= 1 items <= 100 items
object
id
required

The CMS id of the item that changed. Arc XP: the story or author _id. WordPress: the post or user id, as a string.

string
>= 1 characters <= 256 characters
type

The CMS content type, when known. author re-reads one author. Arc XP: absent is story, and any other type is accepted and ignored. WordPress: any other value or none re-reads a post, whatever its post type.

string
>= 1 characters <= 64 characters

Enqueued.

Media typeapplication/json
object
success
required
boolean

Example

{
"success": true
}

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."
}
}

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