Trigger a notes sync
POST
/sync
const url = 'https://my-instance.example.com/sync';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”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"}