Wispr AI User Context API
The User Context API from Wispr AI — 1 operation(s) for user context.
The User Context API from Wispr AI — 1 operation(s) for user context.
openapi: 3.0.3
info:
title: Wispr Backend Analytics User Context API
description: Wispr Backend API
version: 0.5.2
tags:
- name: User Context
paths:
/api/v1/user_context:
get:
tags:
- User Context
summary: Get User Context
description: Get the current user's context.
operationId: get_user_context
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserContextResponse'
security:
- ApiKeyHeaderPatched: []
put:
tags:
- User Context
summary: Update User Context
description: Create or update the current user's context.
operationId: update_user_context
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserContextRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UserContextResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- ApiKeyHeaderPatched: []
delete:
tags:
- User Context
summary: Delete User Context
description: Delete the current user's context.
operationId: delete_user_context
responses:
'204':
description: Successful Response
security:
- ApiKeyHeaderPatched: []
components:
schemas:
PolishPrompt:
properties:
prompt:
type: string
title: Prompt
shortcut:
items:
type: integer
type: array
title: Shortcut
prompt_name:
type: string
title: Prompt Name
type: object
required:
- prompt
- shortcut
- prompt_name
title: PolishPrompt
description: A single polish prompt provided by the user for polish.
UpdateUserContextRequest:
properties:
writing_samples:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/WritingSample'
type: object
- type: 'null'
title: Writing Samples
polish_prompts:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/PolishPrompt'
type: object
- type: 'null'
title: Polish Prompts
type: object
title: UpdateUserContextRequest
description: 'Request model for updating user context. All fields are optional for partial updates.
This will sync across all clients and will be useful for user context for things like actions'
UserContextResponse:
properties:
id:
type: string
format: uuid
title: Id
user_id:
type: string
title: User Id
writing_samples:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/WritingSample'
type: object
- type: 'null'
title: Writing Samples
polish_prompts:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/PolishPrompt'
type: object
- type: 'null'
title: Polish Prompts
modified_at:
type: string
format: date-time
title: Modified At
type: object
required:
- id
- user_id
- modified_at
title: UserContextResponse
description: Response model for user context.
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
WritingSample:
properties:
text:
type: string
title: Text
prompt_name:
anyOf:
- type: string
- type: 'null'
title: Prompt Name
type: object
required:
- text
title: WritingSample
description: A single writing sample provided by the user for voice/style matching.
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