API referenceSync
Pull
POST
/sync/pullAuthorization
session AuthorizationBearer <token>
A Kratos session tokenized as a JWT.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/sync/pull" \ -H "Content-Type: application/json" \ -d '{ "streams": [ { "key": "string", "cursor": 0 } ] }'{ "lends": [ { "deck_id": "9a69d1f4-7dd8-49b6-bc74-49de70b854da", "role": 0, "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "owner_name": "string" } ], "streams": [ { "key": "string", "rows": { "decks": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef", "name": "string", "position": "string", "icon": "string", "color": 0, "description": "string", "language": "string", "new_per_day": 0, "reviews_per_day": 0, "retention": 70, "gated": true, "unlock_at": 50, "v": 0, "deleted_at": 0 } ], "templates": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "name": "string", "kind": 0, "def": { "fields": [ { "id": 0, "name": "string", "kind": "text", "tts": true } ], "cards": [ { "id": 0, "name": "string", "front": [ { "field": 0, "size": "small", "align": "start", "divider": true, "label": "string", "typein": 0 } ], "back": [ { "field": 0, "size": "small", "align": "start", "divider": true, "label": "string", "typein": 0 } ], "each": 0, "anki_front": "string", "anki_back": "string" } ], "css": "string" }, "v": 0, "deleted_at": 0 } ], "notes": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "deck_id": "9a69d1f4-7dd8-49b6-bc74-49de70b854da", "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc", "fields": { "property1": "string", "property2": "string" }, "v": 0, "deleted_at": 0 } ], "events": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9", "card": 0, "kind": 0, "value": 0, "at": 0, "duration_ms": 0, "due": 0, "stability": 0, "difficulty": 0, "reps": 0, "lapses": 0 } ], "settings": [ { "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "grading": 0, "theme": 0, "text_size": 0, "timezone": "string", "fsrs_weights": "string", "reminder_at": 0, "reminder_email": true, "v": 0 } ] }, "cursor": 0, "more": true, "fingerprint": "string", "deck_ids": [ "bbd7099e-bd57-44b5-8a96-a96b97133844" ], "resync": true } ]}