Skip to content

Trigger a notes sync

POST
/sync
curl --request POST \
--url https://my-instance.example.com/sync \
--header 'Authorization: Bearer <token>'

Trigger a notes sync now. When the notes source declares a sync binding, the request is forwarded to that sync Durable Object; otherwise the sync runs inline. Returns the sync result as JSON.

The sync result.

Media type application/json
object
key
additional properties
any
Example generated
{}

The bearer token is missing or wrong.

Media type application/json
object
error
required
string
code
string
Example
{
"error": "Unauthorized"
}

Returned for any method other than POST.

Media type application/json
object
error
required
string
code
string
Example
{
"error": "Not found"
}

The declared sync Durable Object binding is not configured in env.

Media type application/json
object
error
required
string
code
string
Example
{
"error": "sync DO binding \"NOTES_SYNC\" is not configured in env",
"code": "sync_binding_missing"
}