Skip to main content

User-related API environment

Pre-live user-related API docs

These pages describe the Pre-live user-related API stack.

Use pre-live OAuth credentials, pre-live API base URLs, and pre-live app URLs when following this documentation. Keep your OAuth flow, API requests, callback URLs, and manual testing within the pre-live environment.

Sync local mutations

An endpoint to sync local mutations to the server.

Query Parameters
    lastMutationAt float required

    The timestamp of the last mutation that was applied on the server. The value needs to match the latest value from get mutations endpoint, otherwise, the request will be rejected.

Request Body
    mutations object[] required
  • Array [
  • type string required

    Possible values: [CREATE, UPDATE, DELETE]

    The type of the mutation

    resource string required

    Possible values: [BOOKMARK, COLLECTION, COLLECTION_BOOKMARK, NOTE, READING_SESSION]

    Resource the mutation applies to.

    resourceId string

    Server's ID for finding the resource during update/delete operations.

    data object

    Resource data. Format depends on resource type.

  • ]
Responses

Request has been handled successfully.

Response Headers
  • X-Mutation-At string

    Unix timestamp (milliseconds) of the latest mutation for the user. Clients should store this value and include it in subsequent mutation requests for optimistic concurrency control.


Schema
    success boolean
    data object

    Response schema for post mutations endpoint

    mutations object[] required

    Array of mutations that were successfully applied on the server.

  • Array [
  • type string required

    Possible values: [CREATE, UPDATE, DELETE]

    The type of the mutation

    resource string required

    Possible values: [BOOKMARK, COLLECTION, COLLECTION_BOOKMARK, NOTE, READING_SESSION]

    The resource the mutation was applied to.

    resourceId string

    The id of the resource the mutation was applied to. In GET /sync responses, this will be omitted for composite-key resources (e.g. COLLECTION_BOOKMARK). In POST /sync responses, the server may return a composite id (e.g. "collectionId-bookmarkId") for such resources.

    data object

    The latest version of the data of the resource that was mutated. Delete mutations usually return empty data; composite-key resources can return identifier fields such as collectionId and bookmarkId. For create/update mutations, clientCreatedAt and clientUpdatedAt represent the client-local action timestamps, while timestamp represents the server sync mutation timestamp.

    timestamp float required

    Unix timestamp when the latest mutation of the resource occurred

  • ]
  • lastMutationAt float required

    Timestamp of the latest mutation that was applied on the server. This should be used for subsequent sync requests.

Loading...