{"openapi":"3.0.3","info":{"title":"WizWrite API","description":"Public API for WizWrite transcription and AI services. Transcribe audio, run AI actions, and automate your workflows.","version":"1.0.0","contact":{"name":"WizWrite Support","url":"https://wizwrite.io"}},"servers":[{"url":"https://api.wizwrite.io/api/v1","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Authentication","description":"User authentication endpoints"},{"name":"Transcription","description":"Audio and text transcription"},{"name":"AI Actions","description":"AI-powered text transformations"},{"name":"Sessions","description":"Transcription session management"},{"name":"Objects","description":"Transcript and result objects"},{"name":"Folders","description":"Organize sessions into folders"},{"name":"Webhooks","description":"Webhook configuration and triggers"}],"paths":{"/auth/me":{"get":{"summary":"Get current user","description":"Retrieve details about the authenticated user including plan and usage.","tags":["Authentication"],"responses":{"200":{"description":"User details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"},"example":{"success":true,"data":{"id":12345,"email":"user@example.com","plan":"premium","usage":{"transcriptions":150,"limit":1000}}}}}}}}},"/transcribe/audio":{"post":{"summary":"Transcribe audio","description":"Upload and transcribe audio data. Supports MP3, WAV, M4A, WEBM, and OGG formats.","tags":["Transcription"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["audio"],"properties":{"audio":{"type":"string","description":"Base64-encoded audio data"},"language":{"type":"string","description":"Language code (e.g., \"en\", \"es\") or \"auto\"","default":"auto"}}},"example":{"audio":"UklGRiQAAABXQVZFZm10IBAAAAABAAEA...","language":"auto"}}}},"responses":{"200":{"description":"Transcription result","content":{"application/json":{"example":{"success":true,"data":{"sessionId":12345,"transcriptId":67890,"text":"Hello, this is the transcribed text..."}}}}}}}},"/transcribe/text":{"post":{"summary":"Analyze text","description":"Process text with optional AI actions like summarization or task extraction.","tags":["Transcription"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text to analyze"},"aiActions":{"type":"array","items":{"type":"integer"},"description":"Array of AI action IDs to apply"}}},"example":{"text":"Meeting notes: We discussed the Q1 roadmap...","aiActions":[1,2]}}}},"responses":{"200":{"description":"Analysis result","content":{"application/json":{"example":{"success":true,"data":{"sessionId":12345,"objectId":67890}}}}}}}},"/transcribe/image":{"post":{"summary":"Extract text from image (OCR)","description":"Extract text from an image using OCR. Supports PNG, JPG, JPEG, and WEBP.","tags":["Transcription"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64-encoded image data"}}}}}},"responses":{"200":{"description":"Extraction result","content":{"application/json":{"example":{"success":true,"data":{"sessionId":12345,"objectId":67890,"extractedText":"Text from image..."}}}}}}}},"/actions":{"get":{"summary":"List AI actions","description":"Get all available AI actions. Filter by type (all, default, custom).","tags":["AI Actions"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"perPage","in":"query","schema":{"type":"integer","default":20}},{"name":"type","in":"query","schema":{"type":"string","enum":["all","default","custom"],"default":"all"}}],"responses":{"200":{"description":"List of AI actions","content":{"application/json":{"example":{"success":true,"data":{"items":[{"id":1,"title":"Summarize","instruction":"Summarize the text...","isDefault":true},{"id":2,"title":"Extract Tasks","instruction":"Extract action items...","isDefault":true}],"pagination":{"page":1,"perPage":20,"total":52,"totalPages":3}}}}}}}}},"/actions/run":{"post":{"summary":"Run AI actions","description":"Execute AI actions on an existing session. Actions run asynchronously.","tags":["AI Actions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionId","aiActions"],"properties":{"sessionId":{"type":"integer","description":"Session to process"},"aiActions":{"type":"array","items":{"type":"integer"},"description":"Array of AI action IDs"}}},"example":{"sessionId":12345,"aiActions":[1,2,5]}}}},"responses":{"200":{"description":"Actions queued","content":{"application/json":{"example":{"success":true,"data":{"message":"AI actions queued for processing","jobId":"job_abc123"}}}}}}}},"/sessions":{"get":{"summary":"List sessions","description":"Get all transcription sessions with pagination.","tags":["Sessions"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"perPage","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"example":{"success":true,"data":{"items":[{"id":12345,"createdAt":"2024-01-20T14:30:00Z","recordingCount":1,"transcriptCount":3}],"pagination":{"page":1,"perPage":20,"total":150,"totalPages":8}}}}}}}}},"/sessions/{id}":{"get":{"summary":"Get session details","description":"Get a specific session with all its objects (transcripts, AI results).","tags":["Sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Session details","content":{"application/json":{"example":{"success":true,"data":{"sessionId":12345,"objects":[{"id":67890,"title":"Transcript","text":"The transcribed text...","createdAt":"2024-01-20T14:30:00Z"}],"totalObjects":1}}}}}}},"delete":{"summary":"Delete session","description":"Permanently delete a session and all of its objects (transcripts, AI results, recordings).","tags":["Sessions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Session deleted","content":{"application/json":{"example":{"success":true,"data":{"message":"Session deleted successfully","sessionId":12345}}}}},"404":{"description":"Session not found"}}}},"/objects":{"get":{"summary":"List objects","description":"Get all objects (transcripts, AI results). Optionally filter by session.","tags":["Objects"],"parameters":[{"name":"sessionId","in":"query","schema":{"type":"integer"},"description":"Filter by session ID"},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"perPage","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"List of objects"}}}},"/objects/{id}":{"get":{"summary":"Get object","description":"Get a specific object by ID.","tags":["Objects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Object details"}}},"delete":{"summary":"Delete object","description":"Permanently delete an individual object (transcript or AI action result).","tags":["Objects"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Object deleted","content":{"application/json":{"example":{"success":true,"data":{"message":"Object deleted successfully","objectId":67890}}}}},"404":{"description":"Object not found"}}}},"/folders":{"get":{"summary":"List folders","description":"List all folders for the authenticated user, with the sessions inside each folder embedded in the response.","tags":["Folders"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"perPage","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"List of folders with embedded sessions","content":{"application/json":{"example":{"success":true,"data":{"items":[{"id":101,"name":"Client Work","icon":"💼","createdAt":1736078505254,"modifiedAt":1768219904465,"sessions":[{"id":9001,"title":"Discovery call with Acme","createdAt":1736090000000,"modifiedAt":1736090500000,"transcriptObjectId":50001},{"id":9002,"title":"Design review notes","createdAt":1736180000000,"modifiedAt":1736180400000,"transcriptObjectId":50012}]},{"id":102,"name":"Personal","icon":"🌸","createdAt":1736200000000,"modifiedAt":1737000000000,"sessions":[]}],"pagination":{"page":1,"perPage":50,"total":2,"totalPages":1}}}}}}}},"post":{"summary":"Create folder","description":"Create a new folder. Both name and icon are required.","tags":["Folders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","icon"],"properties":{"name":{"type":"string","description":"Folder name"},"icon":{"type":"string","description":"Emoji icon for the folder (required)"}}},"example":{"name":"Q1 Meetings","icon":"📅"}}}},"responses":{"201":{"description":"Folder created","content":{"application/json":{"example":{"success":true,"data":{"id":105,"name":"Q1 Meetings","icon":"📅","createdAt":1742025600000,"modifiedAt":1742025600000}}}}}}}},"/folders/{id}":{"get":{"summary":"Get folder","description":"Get a single folder by id.","tags":["Folders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Folder details","content":{"application/json":{"example":{"success":true,"data":{"id":105,"name":"Q1 Meetings","icon":"📅"}}}}},"404":{"description":"Folder not found"}}},"patch":{"summary":"Update folder","description":"Rename a folder and/or change its icon.","tags":["Folders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New folder name"},"icon":{"type":"string","description":"New emoji icon"}}},"example":{"name":"Q1 Meetings (Archive)","icon":"🗄️"}}}},"responses":{"200":{"description":"Folder updated","content":{"application/json":{"example":{"success":true,"data":{"id":105,"name":"Q1 Meetings (Archive)","icon":"🗄️","modifiedAt":1742112000000}}}}}}},"delete":{"summary":"Delete folder","description":"Delete a folder. Sessions inside the folder are moved to the root (no folder); they are NOT deleted.","tags":["Folders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Folder deleted","content":{"application/json":{"example":{"success":true,"data":{"message":"Folder deleted successfully","folderId":105}}}}},"404":{"description":"Folder not found"}}}},"/webhooks":{"get":{"summary":"List webhooks","description":"Get all configured webhooks.","tags":["Webhooks"],"responses":{"200":{"description":"List of webhooks","content":{"application/json":{"example":{"success":true,"data":{"items":[{"id":1,"title":"Notion Sync","url":"https://hooks.zapier.com/...","slug":"notion-sync"}],"total":1}}}}}}},"post":{"summary":"Create webhook","description":"Register a new webhook endpoint to receive notifications.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","title"],"properties":{"url":{"type":"string","format":"uri","description":"Webhook URL"},"title":{"type":"string","description":"Display name"},"firstInput":{"type":"string","description":"Custom field 1 label"},"secondInput":{"type":"string","description":"Custom field 2 label"},"thirdInput":{"type":"string","description":"Custom field 3 label"}}},"example":{"url":"https://hooks.zapier.com/hooks/catch/123/abc","title":"My Webhook"}}}},"responses":{"201":{"description":"Webhook created"}}}},"/webhooks/{id}/trigger":{"post":{"summary":"Trigger webhook","description":"Send data to a webhook.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["objectId"],"properties":{"objectId":{"type":"integer","description":"Object to send"},"customFields":{"type":"object","description":"Additional key-value data"}}}}}},"responses":{"200":{"description":"Webhook triggered"}}}},"/webhooks/{id}":{"delete":{"summary":"Delete webhook","description":"Remove a webhook.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Webhook deleted"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key from your WizWrite dashboard (Settings > Developer)"}},"schemas":{"UserResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"plan":{"type":"string"},"usage":{"type":"object","properties":{"transcriptions":{"type":"integer"},"limit":{"type":"integer"}}}}}}}}}}