Wispr AI Platform API
The Platform API from Wispr AI — 12 operation(s) for platform.
The Platform API from Wispr AI — 12 operation(s) for platform.
openapi: 3.0.3
info:
title: Wispr Backend Analytics Platform API
description: Wispr Backend API
version: 0.5.2
tags:
- name: Platform
paths:
/api/v1/platform/organizations:
get:
tags:
- Platform
summary: List Organizations
operationId: list_organizations
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
security:
- ApiKeyHeaderPatched: []
post:
tags:
- Platform
summary: Create Organization
operationId: create_organization
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrgRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- ApiKeyHeaderPatched: []
/api/v1/platform/organizations/{organization_id}:
get:
tags:
- Platform
summary: Get Organization
operationId: get_organization
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Platform
summary: Update Organization
operationId: update_organization
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOrgRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/api_keys:
get:
tags:
- Platform
summary: List Api Keys
operationId: list_api_keys
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Platform
summary: Create Api Key
operationId: create_api_key
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAPIKeyRequest'
description: Name of the API key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/api_keys/{api_key_id}:
delete:
tags:
- Platform
summary: Delete Api Key
operationId: delete_api_key
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
- name: api_key_id
in: path
required: true
schema:
type: string
format: uuid
title: Api Key Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Platform
summary: Update Api Key
operationId: update_api_key
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
- name: api_key_id
in: path
required: true
schema:
type: string
format: uuid
title: Api Key Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAPIKeyRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/invitations:
post:
tags:
- Platform
summary: Create User Invitation
operationId: create_user_invitation
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserInviteRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Platform
summary: Get User Invitations
operationId: get_user_invitations
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/invitations/{email}:
delete:
tags:
- Platform
summary: Delete User Invitation
operationId: delete_user_invitation
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
- name: email
in: path
required: true
schema:
type: string
title: Email
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/users:
get:
tags:
- Platform
summary: List Users
operationId: list_users
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/users/{email}:
patch:
tags:
- Platform
summary: Update User Role
operationId: update_user_role
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
- name: email
in: path
required: true
schema:
type: string
title: Email
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateRoleRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Platform
summary: Remove User
operationId: remove_user
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
- name: email
in: path
required: true
schema:
type: string
title: Email
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/billing/credits:
get:
tags:
- Platform
summary: Get Credits
operationId: get_credits
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/billing/usage:
get:
tags:
- Platform
summary: Get Usage
operationId: get_usage
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/billing/invoice/current:
get:
tags:
- Platform
summary: Get Active Invoice
operationId: get_active_invoice
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/platform/organizations/{organization_id}/playground:
post:
tags:
- Platform
summary: Playground
operationId: playground
security:
- ApiKeyHeaderPatched: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
format: uuid
title: Organization Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Body_playground_api_v1_platform_organizations__organization_id__playground_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ChatRole:
type: string
enum:
- user
- human
- assistant
title: ChatRole
App:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: Name of the app
bundle_id:
anyOf:
- type: string
- type: 'null'
title: Bundle Id
description: Bundle ID of the app
type:
$ref: '#/components/schemas/AppType'
description: Category to which the app belongs
default: other
url:
anyOf:
- type: string
- type: 'null'
title: Url
description: URL within the app
type: object
title: App
UpdateRoleRequest:
properties:
role:
$ref: '#/components/schemas/Role'
type: object
required:
- role
title: UpdateRoleRequest
Context:
properties:
app:
anyOf:
- $ref: '#/components/schemas/App'
- type: 'null'
description: Information on the app the user is trying to paste in
ax_context:
items:
type: string
type: array
title: Ax Context
description: List of words from accessibility context
variable_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Variable Names
description: Variable names extracted from the app context. These get backticked
file_names:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: File Names
description: File names extracted from the app context, usually VS Code file names.
ocr_context:
items:
type: string
type: array
title: Ocr Context
description: List of names extracted from user screen content
dictionary_context:
items:
type: string
type: array
title: Dictionary Context
description: List of names in the user's dictionary
dictionary_replacements:
additionalProperties:
type: string
type: object
title: Dictionary Replacements
description: Mapping for replacing phrases/snippets in the user's dictionary
dictionary_snippets:
additionalProperties:
items:
type: string
type: array
type: object
title: Dictionary Snippets
description: Mapping of stripped snippet triggers to full triggers
user_identifier:
anyOf:
- type: string
- type: 'null'
title: User Identifier
description: Identifier of the user within the foreground app (e.g., X username, email, etc.)
user_first_name:
anyOf:
- type: string
- type: 'null'
title: User First Name
description: First name of the user making the request
user_last_name:
anyOf:
- type: string
- type: 'null'
title: User Last Name
description: Last name of the user making the request
textbox_contents:
anyOf:
- $ref: '#/components/schemas/TextboxContents'
- type: 'null'
description: Selected and surrounding text in the textbox that is being dictated into
screenshot:
anyOf:
- type: string
contentMediaType: application/octet-stream
- type: 'null'
title: Screenshot
description: Screenshot of the user's screen at time of dictation
content_text:
anyOf:
- type: string
- type: 'null'
title: Content Text
description: Text content of the foreground app at time of dictation
content_html:
anyOf:
- type: string
- type: 'null'
title: Content Html
description: HTML content of the foreground app at time of dictation
conversation:
anyOf:
- $ref: '#/components/schemas/Conversation'
- type: 'null'
description: Conversation history for a dictation
session_dictation_apps:
items:
type: string
type: array
title: Session Dictation Apps
description: List of all applications (names, bundle IDs, URLs) used for dictation in this session
type: object
title: Context
UpdateOrgRequest:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
logo:
anyOf:
- type: string
- type: 'null'
title: Logo
type: object
title: UpdateOrgRequest
UpdateAPIKeyRequest:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
type: object
title: UpdateAPIKeyRequest
Body_playground_api_v1_platform_organizations__organization_id__playground_post:
properties:
audio:
type: string
title: Audio
description: Base64 encoded audio
language:
anyOf:
- items:
type: string
type: array
- type: string
- type: 'null'
title: Language
description: List of languages the user speaks
context:
anyOf:
- $ref: '#/components/schemas/Context'
- type: 'null'
description: Full context surrounding the dictation
properties:
anyOf:
- $ref: '#/components/schemas/APIProperties'
- type: 'null'
description: Additional properties
type: object
required:
- audio
title: Body_playground_api_v1_platform_organizations__organization_id__playground_post
CreateOrgRequest:
properties:
name:
type: string
title: Name
type: object
required:
- name
title: CreateOrgRequest
Conversation:
properties:
id:
type: string
title: Id
description: Identifier of the conversation
participants:
items:
type: string
type: array
title: Participants
description: List of participants in the conversation
messages:
items:
$ref: '#/components/schemas/ChatMessage'
type: array
title: Messages
description: List of messages in the conversation
type: object
required:
- id
title: Conversation
TextboxContents:
properties:
beforeText:
type: string
title: Beforetext
description: Text right before the cursor position or start of selected text
default: ''
selectedText:
type: string
title: Selectedtext
description: Highlited text in the textbox
default: ''
afterText:
type: string
title: Aftertext
description: Text right after the cursor position or end of selected text
default: ''
contents:
type: string
title: Contents
description: All of the text in the textbox
default: ''
type: object
title: TextboxContents
AppType:
type: string
enum:
- email
- ai
- word
- terminal
- other
title: AppType
description: Represents the type of app the user is trying to paste in.
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
APIProperties:
properties:
language:
anyOf:
- type: string
enum:
- ''
- en
- engb
- enca
- zh
- zhcn
- de
- dech
- es
- ru
- ko
- fr
- ja
- pt
- tr
- pl
- ca
- nl
- ar
- sv
- it
- id
- hi
- hien
- fi
- vi
- he
- uk
- el
- ms
- cs
- ro
- da
- hu
- ta
- 'no'
- th
- ur
- hr
- bg
- lt
- la
- mi
- ml
- cy
- sk
- te
- fa
- lv
- bn
- sr
- az
- sl
- kn
- et
- mk
- br
- eu
- is
- hy
- ne
- mn
- bs
- kk
- sq
- sw
- gl
- mr
- pa
- si
- km
- sn
- yo
- so
- af
- oc
- ka
- be
- tg
- sd
- gu
- am
- yi
- lo
- uz
- fo
- ht
- ps
- tk
- nn
- mt
- sa
- lb
- my
- bo
- tl
- mg
- as
- tt
- haw
- ln
- ha
- ba
- jv
- su
- yue
- type: 'null'
title: Language
description: Language of the audio
before_text:
anyOf:
- type: string
- type: 'null'
title: Before Text
description: Text before the audio
after_text:
anyOf:
- type: string
- type: 'null'
title: After Text
description: Text after the audio
selected_text:
anyOf:
- type: string
- type: 'null'
title: Selected Text
description: Selected text
app_type:
anyOf:
- type: string
enum:
- ai
- email
- other
- type: 'null'
title: App Type
description: Type of application
dictionary:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Dictionary
description: Dictionary words
type: object
title: APIProperties
CreateUserInviteRequest:
properties:
emails:
items:
type: string
type: array
title: Emails
role:
$ref: '#/components/schemas/Role'
type: object
required:
- emails
- role
title: CreateUserInviteRequest
ChatMessage:
properties:
role:
$ref: '#/components/schemas/ChatRole'
description: Role of the message sender
content:
type: string
title: Content
description: Content of the message
sender_id:
anyOf:
- type: string
- type: 'null'
title: Sender Id
description: Identifier of the message sender
type: object
required:
- role
- content
title: ChatMessage
Role:
type: string
enum:
- admin
- member
title: Role
description: A platform team member's role.
CreateAPIKeyRequest:
properties:
name:
type: string
title: Name
type: object
required:
- name
title: CreateAPIKeyRequest
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