Wispr AI Notes API
The Notes API from Wispr AI — 1 operation(s) for notes.
The Notes API from Wispr AI — 1 operation(s) for notes.
openapi: 3.0.3
info:
title: Wispr Backend Analytics Notes API
description: Wispr Backend API
version: 0.5.2
tags:
- name: Notes
paths:
/api/v1/notes/sync:
post:
tags:
- Notes
summary: Sync Notes
description: Sync notes with the server.
operationId: sync_notes
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NoteSyncRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/NoteSyncResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- ApiKeyHeaderPatched: []
components:
schemas:
NoteSyncRequest:
properties:
last_sync_time:
anyOf:
- type: string
- type: 'null'
title: Last Sync Time
description: Unix timestamp in ms of the most recent server change the client has seen
hard_refresh:
type: boolean
title: Hard Refresh
description: When true, ignore last_sync_time and return up to 1000 notes from server regardless of modified_at
default: false
cursor:
anyOf:
- type: string
- type: 'null'
title: Cursor
description: Opaque pagination cursor from the previous response's next_cursor. Refetch with the same last_sync_time and this cursor until next_cursor is null.
notes:
items:
$ref: '#/components/schemas/SyncNoteRequest'
type: array
title: Notes
image_uploads:
items:
$ref: '#/components/schemas/ImageUpload'
type: array
maxItems: 100
title: Image Uploads
refresh_image_ids:
items:
type: string
format: uuid
type: array
maxItems: 200
title: Refresh Image Ids
description: Image ids the client wants fresh presigned GETs for (e.g. opened note with expired URLs).
type: object
required:
- notes
title: NoteSyncRequest
description: Request model for note synchronization.
SyncNote:
properties:
id:
type: string
format: uuid
title: Id
title:
type: string
title: Title
created_at:
type: string
title: Created At
modified_at:
type: string
title: Modified At
content:
type: string
title: Content
is_deleted:
type: boolean
title: Is Deleted
default: false
image_keys:
items:
$ref: '#/components/schemas/NoteImageKey'
type: array
maxItems: 100
title: Image Keys
type: object
required:
- id
- title
- created_at
- modified_at
- content
title: SyncNote
description: Model for note data in sync responses.
ImageUpload:
properties:
key:
type: string
pattern: ^users/[0-9a-f-]{36}/scratchpad/images/[a-f0-9]{64}$
title: Key
size_bytes:
type: integer
maximum: 5242880.0
exclusiveMinimum: 0.0
title: Size Bytes
content_type:
type: string
enum:
- image/webp
- image/png
- image/jpeg
- image/gif
title: Content Type
type: object
required:
- key
- size_bytes
- content_type
title: ImageUpload
description: Image the client wants to upload, declared inline with /notes/sync.
NoteSyncResponse:
properties:
acked:
items:
type: string
format: uuid
type: array
title: Acked
pull:
items:
$ref: '#/components/schemas/SyncNote'
type: array
title: Pull
sync_time:
type: string
title: Sync Time
upload_urls:
items:
$ref: '#/components/schemas/ImageUploadUrl'
type: array
title: Upload Urls
refreshed_images:
items:
$ref: '#/components/schemas/NoteImagePayload'
type: array
title: Refreshed Images
description: Fresh presigned GETs for the subset of refresh_image_ids the caller owns.
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
description: Non-null when more changed notes remain; refetch with it and the same last_sync_time.
type: object
required:
- acked
- pull
- sync_time
title: NoteSyncResponse
description: Response model for note synchronization.
ImageUploadUrl:
properties:
key:
type: string
pattern: ^users/[0-9a-f-]{36}/scratchpad/images/[a-f0-9]{64}$
title: Key
url:
type: string
pattern: ^https?://
format: uri
title: Url
fields:
additionalProperties:
type: string
type: object
title: Fields
type: object
required:
- key
- url
- fields
title: ImageUploadUrl
description: Presigned POST for a pending key whose blob is not yet in S3.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
NoteImageKey:
properties:
id:
type: string
format: uuid
title: Id
key:
type: string
pattern: ^users/[0-9a-f-]{36}/scratchpad/images/[a-f0-9]{64}$
title: Key
width:
type: integer
maximum: 4096.0
exclusiveMinimum: 0.0
title: Width
height:
type: integer
maximum: 4096.0
exclusiveMinimum: 0.0
title: Height
size_bytes:
type: integer
maximum: 5242880.0
exclusiveMinimum: 0.0
title: Size Bytes
type: object
required:
- id
- key
- width
- height
- size_bytes
title: NoteImageKey
description: Image reference attached to a note (sync request side).
SyncNoteRequest:
properties:
id:
type: string
format: uuid
title: Id
title:
type: string
title: Title
created_at:
type: string
title: Created At
modified_at:
type: string
title: Modified At
content:
type: string
title: Content
is_deleted:
type: boolean
title: Is Deleted
default: false
image_keys:
anyOf:
- items:
$ref: '#/components/schemas/NoteImageKey'
type: array
maxItems: 100
- type: 'null'
title: Image Keys
type: object
required:
- id
- title
- created_at
- modified_at
- content
title: SyncNoteRequest
description: 'Model for note data in sync requests.
``image_keys=None`` means preserve the server''s existing image metadata.
An explicit empty list means replace with no images and clean up removed blobs.'
NoteImagePayload:
properties:
id:
type: string
format: uuid
title: Id
key:
type: string
pattern: ^users/[0-9a-f-]{36}/scratchpad/images/[a-f0-9]{64}$
title: Key
width:
type: integer
maximum: 4096.0
exclusiveMinimum: 0.0
title: Width
height:
type: integer
maximum: 4096.0
exclusiveMinimum: 0.0
title: Height
size_bytes:
type: integer
maximum: 5242880.0
exclusiveMinimum: 0.0
title: Size Bytes
url:
type: string
pattern: ^https?://
format: uri
title: Url
expires_at:
type: string
format: date-time
title: Expires At
type: object
required:
- id
- key
- width
- height
- size_bytes
- url
- expires_at
title: NoteImagePayload
description: Image reference with a presigned GET URL (sync response side).
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
ApiKeyHeaderPatched:
type: apiKey
in: header
name: Authorization
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key