{"openapi":"3.0.0","info":{"title":"AdMove API","version":"2026-02-02","description":"API for managing workspaces, products, and creative assets"},"servers":[{"url":"https://api.admove.ai/","description":"Production API Server"}],"security":[{"APIKeyAuth":[]}],"components":{"schemas":{},"parameters":{},"securitySchemes":{"APIKeyAuth":{"type":"apiKey","in":"header","name":"X-AdMove-Key","description":"API key authentication. Use your API key in the X-AdMove-Key header. Example: \"X-AdMove-Key: sk_test_...\""}}},"paths":{"/v1/workspaces":{"get":{"summary":"List workspaces","description":"List workspaces accessible to the authenticated user","security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"My Workspace"},"ownerId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"teamId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","description":"The team this workspace belongs to. Matches the API key's team."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"logo":{"type":"string","nullable":true,"example":"user-id/workspace-id/media/logo.png","description":"Storage path, not URL"},"productsSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string","example":"My Products Source"},"description":{"type":"string","example":"My Products Source Description"},"url":{"type":"string","example":"https://example.com/products-source"},"currency":{"type":"string","example":"USD"},"type":{"type":"string","enum":["shopify","product_page"]},"language":{"type":"object","properties":{"isoCode":{"type":"string","example":"en"},"name":{"type":"string","example":"English"}},"required":["isoCode","name"]}},"required":["name","description","url","currency","type","language"]},"onboarding":{"type":"object","nullable":true,"properties":{"step":{"type":"string","enum":["welcome","goal-selection","store-setup","review-brand","pick-product","review-product-intelligence","generate","adset","complete"],"example":"welcome"},"workflowRunId":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4","description":"Workflow run ID"},"hookTokens":{"type":"object","additionalProperties":{"type":"string"},"example":{"step1":"123e4567-e89b-12d3-a456-426614174000","step2":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["step","workflowRunId","hookTokens"]},"planName":{"type":"string","example":"Starter"}},"required":["id","name","ownerId","teamId","createdAt"],"description":"Workspace"}}},"required":["workspaces"],"description":"GetWorkspacesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"post":{"summary":"Create workspace","description":"Create a new workspace. Send as multipart/form-data with name (required) and optional logo (image file).","security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Workspace name"},"logo":{"type":"string","format":"binary","description":"Logo image file (PNG, SVG, JPG, or WebP)"}}}}}},"responses":{"201":{"description":"Workspace created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"My Workspace"},"ownerId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"teamId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","description":"The team this workspace belongs to. Matches the API key's team."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"logo":{"type":"string","nullable":true,"example":"user-id/workspace-id/media/logo.png","description":"Storage path, not URL"},"productsSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string","example":"My Products Source"},"description":{"type":"string","example":"My Products Source Description"},"url":{"type":"string","example":"https://example.com/products-source"},"currency":{"type":"string","example":"USD"},"type":{"type":"string","enum":["shopify","product_page"]},"language":{"type":"object","properties":{"isoCode":{"type":"string","example":"en"},"name":{"type":"string","example":"English"}},"required":["isoCode","name"]}},"required":["name","description","url","currency","type","language"]},"onboarding":{"type":"object","nullable":true,"properties":{"step":{"type":"string","enum":["welcome","goal-selection","store-setup","review-brand","pick-product","review-product-intelligence","generate","adset","complete"],"example":"welcome"},"workflowRunId":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4","description":"Workflow run ID"},"hookTokens":{"type":"object","additionalProperties":{"type":"string"},"example":{"step1":"123e4567-e89b-12d3-a456-426614174000","step2":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["step","workflowRunId","hookTokens"]},"planName":{"type":"string","example":"Starter"}},"required":["id","name","ownerId","teamId","createdAt"],"description":"Workspace"}},"required":["workspace"],"description":"CreateWorkspaceResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}":{"get":{"summary":"Get workspace","description":"Get a single workspace by ID (requires access)","security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workspace details","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"My Workspace"},"ownerId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"teamId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","description":"The team this workspace belongs to. Matches the API key's team."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"logo":{"type":"string","nullable":true,"example":"user-id/workspace-id/media/logo.png","description":"Storage path, not URL"},"productsSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string","example":"My Products Source"},"description":{"type":"string","example":"My Products Source Description"},"url":{"type":"string","example":"https://example.com/products-source"},"currency":{"type":"string","example":"USD"},"type":{"type":"string","enum":["shopify","product_page"]},"language":{"type":"object","properties":{"isoCode":{"type":"string","example":"en"},"name":{"type":"string","example":"English"}},"required":["isoCode","name"]}},"required":["name","description","url","currency","type","language"]},"onboarding":{"type":"object","nullable":true,"properties":{"step":{"type":"string","enum":["welcome","goal-selection","store-setup","review-brand","pick-product","review-product-intelligence","generate","adset","complete"],"example":"welcome"},"workflowRunId":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4","description":"Workflow run ID"},"hookTokens":{"type":"object","additionalProperties":{"type":"string"},"example":{"step1":"123e4567-e89b-12d3-a456-426614174000","step2":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["step","workflowRunId","hookTokens"]},"planName":{"type":"string","example":"Starter"}},"required":["id","name","ownerId","teamId","createdAt"],"description":"Workspace"}},"required":["workspace"],"description":"GetWorkspaceResponse"}}}},"400":{"description":"Invalid workspace ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"patch":{"summary":"Update workspace","description":"Update workspace name and/or logo. Send as multipart/form-data with optional name (string) and logo (image file).","security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Workspace name"},"logo":{"type":"string","format":"binary","description":"Logo image file (PNG, SVG, JPG, or WebP)"}}}}}},"responses":{"200":{"description":"Workspace updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"My Workspace"},"ownerId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"teamId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000","description":"The team this workspace belongs to. Matches the API key's team."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"logo":{"type":"string","nullable":true,"example":"user-id/workspace-id/media/logo.png","description":"Storage path, not URL"},"productsSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string","example":"My Products Source"},"description":{"type":"string","example":"My Products Source Description"},"url":{"type":"string","example":"https://example.com/products-source"},"currency":{"type":"string","example":"USD"},"type":{"type":"string","enum":["shopify","product_page"]},"language":{"type":"object","properties":{"isoCode":{"type":"string","example":"en"},"name":{"type":"string","example":"English"}},"required":["isoCode","name"]}},"required":["name","description","url","currency","type","language"]},"onboarding":{"type":"object","nullable":true,"properties":{"step":{"type":"string","enum":["welcome","goal-selection","store-setup","review-brand","pick-product","review-product-intelligence","generate","adset","complete"],"example":"welcome"},"workflowRunId":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4","description":"Workflow run ID"},"hookTokens":{"type":"object","additionalProperties":{"type":"string"},"example":{"step1":"123e4567-e89b-12d3-a456-426614174000","step2":"123e4567-e89b-12d3-a456-426614174000"}}},"required":["step","workflowRunId","hookTokens"]},"planName":{"type":"string","example":"Starter"}},"required":["id","name","ownerId","teamId","createdAt"],"description":"Workspace"}},"required":["workspace"],"description":"UpdateWorkspaceResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"delete":{"summary":"Delete workspace","description":"Delete a workspace (owner only). Fails if workspace has completed onboarding and an active subscription, or if it is the last workspace.","security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workspace deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"example":true}},"required":["success"],"description":"SuccessResponse"}}}},"400":{"description":"Bad request - cannot delete","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - not owner","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/brand":{"get":{"summary":"Get workspace brand","description":"Get brand information for a workspace (requires access)","security":[{"APIKeyAuth":[]}],"tags":["Brand"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Brand information (object or empty)","content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"description":"BrandInformation"}},"required":["brand"],"description":"GetWorkspaceBrandResponse"}}}},"400":{"description":"Invalid workspace ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"patch":{"summary":"Update workspace brand","description":"Partially update brand (requires access). JSON only. For logos, use POST brand-logos.","security":[{"APIKeyAuth":[]}],"tags":["Brand"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}}},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]}},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}}}}}},"description":"PatchWorkspaceBrandRequest"}}}},"responses":{"200":{"description":"Updated brand information","content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"description":"BrandInformation"}},"required":["brand"],"description":"GetWorkspaceBrandResponse"}}}},"400":{"description":"Invalid workspace ID or request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/brand-logos":{"post":{"summary":"Upload brand logos","description":"Upload logo files for workspace brand (requires access). Multipart with logos (files). Adds to existing logos. PNG, JPEG, SVG, WebP; max 5MB each.","security":[{"APIKeyAuth":[]}],"tags":["Brand"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"string","format":"binary"},"minItems":1,"description":"Logo image files (PNG, JPEG, SVG, WebP; max 5MB each). Send multiple with field name \"logos\"."}}}}}},"responses":{"200":{"description":"Brand with updated logos","content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"description":"BrandInformation"}},"required":["brand"],"description":"GetWorkspaceBrandResponse"}}}},"400":{"description":"Invalid workspace ID or request body","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/brand-fonts":{"post":{"summary":"Upload custom brand fonts","description":"Upload custom font files for a workspace brand role (requires access). Multipart with role (\"heading\" or \"body\") and one or more fonts (files). Weight/style/family are inferred from each filename and the faces are appended to the role. .otf/.ttf/.woff/.woff2; max 10MB each. To remove faces, PATCH the brand with the reduced fonts.{role}.faces array.","security":[{"APIKeyAuth":[]}],"tags":["Brand"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["role","fonts"],"properties":{"role":{"type":"string","enum":["heading","body"],"description":"Which brand font role the files apply to."},"fonts":{"type":"array","items":{"type":"string","format":"binary"},"minItems":1,"description":"Font files (.otf/.ttf/.woff/.woff2; max 10MB each). Send multiple with field name \"fonts\"."}}}}}},"responses":{"200":{"description":"Brand with updated fonts","content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"description":"BrandInformation"}},"required":["brand"],"description":"GetWorkspaceBrandResponse"}}}},"400":{"description":"Invalid workspace ID, role, or font file","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/brand-logos/{logoId}":{"delete":{"summary":"Delete brand logo","description":"Delete a logo by ID from workspace brand (requires access). Logo ID is the uuid returned when uploading.","security":[{"APIKeyAuth":[]}],"tags":["Brand"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"logoId","in":"path"}],"responses":{"200":{"description":"Brand with updated logos","content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"description":"BrandInformation"}},"required":["brand"],"description":"GetWorkspaceBrandResponse"}}}},"400":{"description":"Invalid workspace ID or logo ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Logo not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/source_products":{"get":{"summary":"Get source products","description":"[Deprecated] An internal step now handled by the `workspace.setup` workflow, which publishes candidate products as partial results on the run (poll GET /api/v1/runs/{runId}) and imports your choice via the pick-product gate. List Shopify source products. Requires productsSource.type === \"shopify\".","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Shopify products","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"handle":{"type":"string","example":"product-handle"},"body_html":{"type":"string"},"published_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"vendor":{"type":"string"},"product_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"images":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"options":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["id","title","handle"],"description":"ShopifyProduct"}}},"required":["products"],"description":"GetWorkspaceSourceProductsResponse"}}}},"400":{"description":"Products source must be Shopify","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/source_urls":{"get":{"summary":"Get source URLs","description":"[Deprecated] An internal step now handled by the `workspace.setup` workflow, which publishes candidate product-page URLs as partial results on the run (poll GET /api/v1/runs/{runId}); pick URLs at the pick-product gate and the workflow scrapes them for you. List source URLs via Firecrawl map. Requires productsSource.type === \"product_page\".","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Workspaces"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Array of { url }","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://example.com/page"}},"required":["url"],"description":"SourceUrlItem"},"description":"GetWorkspaceSourceUrlsResponse"}}}},"400":{"description":"Products source must be product_page","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/scrape-products":{"post":{"summary":"Start scrape products","description":"[Deprecated] Scraping is now performed inside the `workspace.setup` workflow after you pick product-page URLs at its pick-product gate — no separate scrape run needed. Start a product scraping workflow for the given URLs. Body: { workspaceId, urls }. Returns 202 with runId. Max 10 URLs.","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Scrape Products"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"urls":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10,"example":["https://example.com/product1","https://example.com/product2"]}},"required":["workspaceId","urls"],"description":"CreateScrapeProductsRequest"}}}},"responses":{"202":{"description":"Scrape job started","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4"},"status":{"type":"string","enum":["pending"],"example":"pending"},"createdAt":{"type":"string","example":"2026-02-12T12:00:00.000Z"}},"required":["id","status","createdAt"],"description":"CreateScrapeProductsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/scrape-products/{id}":{"get":{"summary":"Get scrape products status","description":"[Deprecated] Poll the `workspace.setup` run via GET /api/v1/runs/{runId} instead — scraped products surface there as the run progresses. Get scrape products workflow status and results (poll for completion). Looks up run by id.","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Scrape Products"],"parameters":[{"schema":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Scrape status and results","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"completed"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"price":{"type":"string"},"compareAtPrice":{"type":"string"},"vendor":{"type":"string"},"productType":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"src":{"type":"string"},"alt":{"type":"string","nullable":true},"position":{"type":"number"}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"src":{"type":"string"},"poster":{"type":"string","nullable":true},"alt":{"type":"string","nullable":true},"position":{"type":"number"}},"required":["id","src","position"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"sku":{"type":"string"},"price":{"type":"string"},"compareAtPrice":{"type":"string"},"available":{"type":"boolean"}},"required":["id","title","sku","price","available"]}},"available":{"type":"boolean"}},"required":["id","title","handle","description","price","tags","images","videos","variants","available"],"description":"ScrapedProduct"}},"createdAt":{"type":"string","example":"2026-02-12T12:00:00.000Z"},"completedAt":{"type":"string","example":"2026-02-12T12:00:00.000Z"}},"required":["id","status","createdAt"],"description":"GetScrapeProductsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspaces/{id}/products":{"get":{"summary":"Get workspace products","description":"Get all products for a workspace (requires access)","security":[{"APIKeyAuth":[]}],"tags":["Products"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of products","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"data":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"description":{"type":"string","example":"Product description"},"vendor":{"type":"string","example":"Vendor Name"},"productType":{"type":"string","example":"Product Type"},"tags":{"type":"array","items":{"type":"string"},"example":["Tag 1","Tag 2"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Variant Name"},"sku":{"type":"string","example":"SKU123"},"price":{"type":"string","example":"100.00"},"compareAtPrice":{"type":"string","example":"120.00"},"available":{"type":"boolean","example":true}},"required":["id","title","sku","price","available"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/image.jpg"},"alt":{"type":"string","nullable":true,"example":"Image alt text"},"position":{"type":"number","example":1}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/video.mp4"},"poster":{"type":"string","example":"https://example.com/video.jpg"},"alt":{"type":"string","example":"Video alt text"},"position":{"type":"number","example":1}},"required":["id","src","poster","alt","position"]}},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"handle":{"type":"string","example":"product-name"},"sourceType":{"type":"string","enum":["shopify","woocommerce","product_page"]},"publishedAt":{"type":"string","nullable":true}},"required":["id","title","description","vendor","productType","tags","variants","images","videos","createdAt","updatedAt","handle"],"example":{"title":"Product Name","description":"Product description","vendor":"Vendor Name","productType":"Product Type","tags":["Tag 1","Tag 2"],"variants":[{"id":1,"title":"Variant Name","sku":"SKU123","price":"100.00","compareAtPrice":"120.00","available":true}],"images":[{"id":1,"src":"https://example.com/image.jpg","alt":"Image alt text","position":1}],"videos":[{"id":1,"src":"https://example.com/video.mp4","poster":"https://example.com/video.jpg","alt":"Video alt text","position":1}],"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","handle":"product-name","sourceType":"shopify","publishedAt":"2024-01-01T00:00:00.000Z"}},"details":{"type":"object","nullable":true,"properties":{"research":{"type":"string","example":"## Product Description\\n\\n...\\n\\n## Key Selling Points\\n- ..."}},"required":["research"]},"researchStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"completed","description":"Status of the product research workflow, if one exists."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","workspaceId","data","createdAt","updatedAt"],"description":"Product"}}},"required":["products"],"description":"GetWorkspaceProductsResponse"}}}},"400":{"description":"Invalid workspace ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspace-analyses":{"post":{"summary":"Create workspace analysis","description":"[Deprecated] Use the `workspace.setup` workflow trigger instead (POST /api/v1/run/workspace.setup) — it creates the workspace, generates the brand, lets you pick products at a gate, and runs product research, leaving the workspace ready for ad.generate. See the Workflows API. Returns immediately with a 202 Accepted status.","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Workspace Analyses"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://example.com/product"}},"required":["url"],"description":"CreateWorkspaceAnalysisRequest"}}}},"responses":{"202":{"description":"Analysis job created","content":{"application/json":{"schema":{"type":"object","properties":{"analysis":{"type":"object","properties":{"id":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"pending"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"results":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"required":["overview","voiceAndTone","vocabulary","brandStyles"]},"storeType":{"type":"string","enum":["shopify","product_page"]}},"required":["brand","storeType"]}},"required":["id","status","workspaceId","createdAt"],"description":"WorkspaceAnalysis"}},"required":["analysis"],"description":"CreateWorkspaceAnalysisResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/workspace-analyses/{id}":{"get":{"summary":"Get workspace analysis","description":"[Deprecated] Poll the `workspace.setup` run via GET /api/v1/runs/{runId} instead (Workflows API). Get a workspace analysis job by ID (requires access to workspace).","deprecated":true,"security":[{"APIKeyAuth":[]}],"tags":["Workspace Analyses"],"parameters":[{"schema":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Analysis job details","content":{"application/json":{"schema":{"type":"object","properties":{"analysis":{"type":"object","properties":{"id":{"type":"string","example":"wrun_01KFZQVVR6RWZWW9R6X5CR2PP4"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"pending"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"results":{"type":"object","properties":{"brand":{"type":"object","properties":{"overview":{"type":"object","properties":{"id":{"type":"string"},"website":{"type":"string"},"name":{"type":"string","minLength":1},"industry":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"industryOther":{"type":"string"},"usp":{"type":"string","nullable":true},"competitors":{"type":"string","nullable":true},"personality":{"type":"string","nullable":true,"enum":["professional","friendly","bold","playful","visionary","warm","elegant","quirky","reliable","minimalist","high-energy","adaptive",null]},"archetype":{"type":"string","nullable":true,"enum":["Creator","Sage","Hero","Rebel","Caregiver","Ruler","Jester","Lover","Everyman","Explorer","Innocent","Magician",null]},"about":{"type":"string","nullable":true}},"required":["name"]},"voiceAndTone":{"type":"object","properties":{"voicePersona":{"type":"string","enum":["mentor","friend","expert","innovator","advocate","leader","coach","insider","guide","adaptive"]},"toneStyle":{"type":"string","enum":["confident","witty","warm","assertive","elegant","playful","inspirational","calm","bold","conversational"]},"vocabType":{"type":"string","enum":["conversational","corporate","industry-jargon","technical","evocative","plainspoken","luxury"]},"writingStyle":{"type":"string","enum":["short-punchy","balanced","long-form","varied"]},"ctaStyle":{"type":"string","enum":["direct","soft","inspirational","urgent","adaptive"]},"emotionalSignature":{"type":"string","enum":["trust","excitement","belonging","empowerment","clarity","curiosity","aspiration","safety"]}}},"vocabulary":{"type":"object","properties":{"preferredVocabulary":{"type":"string"},"bannedVocabulary":{"type":"string"},"copywritingReferences":{"type":"string"}}},"brandStyles":{"type":"object","properties":{"logos":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"default":[]},"colors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"type":"string"},"value":{"type":"string"}},"required":["id","name","usage","value"]},"default":[]},"fonts":{"type":"object","properties":{"heading":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"body":{"type":"object","properties":{"name":{"type":"string"},"custom":{"type":"boolean"},"weight":{"type":"integer","minimum":1,"maximum":1000},"style":{"type":"string","enum":["normal","italic","oblique"]},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]}}},"required":["name","custom"]},"uploaded":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"faces":{"type":"array","items":{"type":"object","properties":{"mediaId":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000,"default":400},"style":{"type":"string","enum":["normal","italic","oblique"],"default":"normal"},"format":{"type":"string","enum":["woff2","woff","ttf","otf"]}},"required":["mediaId","format"]},"default":[]}},"required":["family"]}}},"default":{}},"captionDefaults":{"type":"object","properties":{"style":{"type":"string"},"font":{"type":"string"},"decoration":{"type":"object","properties":{"bold":{"type":"boolean"},"italic":{"type":"boolean"}},"required":["bold","italic"]},"case":{"type":"string","enum":["as-written","uppercase"]},"color":{"type":"string"},"size":{"anyOf":[{"type":"number"},{"type":"string"}]},"position":{"type":"string","enum":["top","middle","bottom"]}},"required":["style","font","color","size"]}}}},"required":["overview","voiceAndTone","vocabulary","brandStyles"]},"storeType":{"type":"string","enum":["shopify","product_page"]}},"required":["brand","storeType"]}},"required":["id","status","workspaceId","createdAt"],"description":"WorkspaceAnalysis"}},"required":["analysis"],"description":"GetWorkspaceAnalysisResponse"}}}},"400":{"description":"Invalid analysis ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Analysis not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/signed-url":{"post":{"summary":"Get signed URL","description":"Get a signed URL for a media storage path. Body: { path: string, expiry?: number }. Default expiry 3600 seconds.","security":[{"APIKeyAuth":[]}],"tags":["Media"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","example":"userId/productId/media/file.jpeg","description":"Storage path: user-uploads media (userId/productId/media/...) or template references (templates/references/...)"},"expiry":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":3600,"description":"Expiry in seconds, default 3600"}},"required":["path"],"description":"SignedUrlRequest"}}}},"responses":{"200":{"description":"Signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://example.com/file.png?token=abc123","description":"Pre-signed URL for file access"}},"required":["url"],"description":"SignedUrlResponse"}}}},"400":{"description":"Missing path","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to path","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/products":{"post":{"summary":"Insert products","description":"Insert products (Shopify or ScrapedProduct). Triggers research and media analysis workflows.","security":[{"APIKeyAuth":[]}],"tags":["Products"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"products":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"handle":{"type":"string","example":"product-handle"},"body_html":{"type":"string"},"published_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"vendor":{"type":"string"},"product_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"images":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"options":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["id","title","handle"],"description":"ShopifyProduct"},{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"handle":{"type":"string"},"description":{"type":"string"},"price":{"type":"string"},"compareAtPrice":{"type":"string"},"vendor":{"type":"string"},"productType":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"src":{"type":"string"},"alt":{"type":"string","nullable":true},"position":{"type":"number"}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"src":{"type":"string"},"poster":{"type":"string","nullable":true},"alt":{"type":"string","nullable":true},"position":{"type":"number"}},"required":["id","src","position"]}},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"sku":{"type":"string"},"price":{"type":"string"},"compareAtPrice":{"type":"string"},"available":{"type":"boolean"}},"required":["id","title","sku","price","available"]}},"available":{"type":"boolean"}},"required":["id","title","handle","description","price","tags","images","videos","variants","available"],"description":"ScrapedProduct"}]},"minItems":1}},"required":["workspaceId","products"],"description":"CreateProductsRequest"}}}},"responses":{"200":{"description":"Products inserted","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"number","example":3},"mediaUploaded":{"type":"number","example":5},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"data":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"description":{"type":"string","example":"Product description"},"vendor":{"type":"string","example":"Vendor Name"},"productType":{"type":"string","example":"Product Type"},"tags":{"type":"array","items":{"type":"string"},"example":["Tag 1","Tag 2"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Variant Name"},"sku":{"type":"string","example":"SKU123"},"price":{"type":"string","example":"100.00"},"compareAtPrice":{"type":"string","example":"120.00"},"available":{"type":"boolean","example":true}},"required":["id","title","sku","price","available"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/image.jpg"},"alt":{"type":"string","nullable":true,"example":"Image alt text"},"position":{"type":"number","example":1}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/video.mp4"},"poster":{"type":"string","example":"https://example.com/video.jpg"},"alt":{"type":"string","example":"Video alt text"},"position":{"type":"number","example":1}},"required":["id","src","poster","alt","position"]}},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"handle":{"type":"string","example":"product-name"},"sourceType":{"type":"string","enum":["shopify","woocommerce","product_page"]},"publishedAt":{"type":"string","nullable":true}},"required":["id","title","description","vendor","productType","tags","variants","images","videos","createdAt","updatedAt","handle"],"example":{"title":"Product Name","description":"Product description","vendor":"Vendor Name","productType":"Product Type","tags":["Tag 1","Tag 2"],"variants":[{"id":1,"title":"Variant Name","sku":"SKU123","price":"100.00","compareAtPrice":"120.00","available":true}],"images":[{"id":1,"src":"https://example.com/image.jpg","alt":"Image alt text","position":1}],"videos":[{"id":1,"src":"https://example.com/video.mp4","poster":"https://example.com/video.jpg","alt":"Video alt text","position":1}],"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","handle":"product-name","sourceType":"shopify","publishedAt":"2024-01-01T00:00:00.000Z"}},"details":{"type":"object","nullable":true,"properties":{"research":{"type":"string","example":"## Product Description\\n\\n...\\n\\n## Key Selling Points\\n- ..."}},"required":["research"]},"researchStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"completed","description":"Status of the product research workflow, if one exists."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","workspaceId","data","createdAt","updatedAt"],"description":"Product"}}},"required":["inserted","mediaUploaded","products"],"description":"CreateProductsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/products/{id}":{"get":{"summary":"Get product","description":"Get a product by ID (requires workspace access)","security":[{"APIKeyAuth":[]}],"tags":["Products"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"data":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"description":{"type":"string","example":"Product description"},"vendor":{"type":"string","example":"Vendor Name"},"productType":{"type":"string","example":"Product Type"},"tags":{"type":"array","items":{"type":"string"},"example":["Tag 1","Tag 2"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Variant Name"},"sku":{"type":"string","example":"SKU123"},"price":{"type":"string","example":"100.00"},"compareAtPrice":{"type":"string","example":"120.00"},"available":{"type":"boolean","example":true}},"required":["id","title","sku","price","available"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/image.jpg"},"alt":{"type":"string","nullable":true,"example":"Image alt text"},"position":{"type":"number","example":1}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/video.mp4"},"poster":{"type":"string","example":"https://example.com/video.jpg"},"alt":{"type":"string","example":"Video alt text"},"position":{"type":"number","example":1}},"required":["id","src","poster","alt","position"]}},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"handle":{"type":"string","example":"product-name"},"sourceType":{"type":"string","enum":["shopify","woocommerce","product_page"]},"publishedAt":{"type":"string","nullable":true}},"required":["id","title","description","vendor","productType","tags","variants","images","videos","createdAt","updatedAt","handle"],"example":{"title":"Product Name","description":"Product description","vendor":"Vendor Name","productType":"Product Type","tags":["Tag 1","Tag 2"],"variants":[{"id":1,"title":"Variant Name","sku":"SKU123","price":"100.00","compareAtPrice":"120.00","available":true}],"images":[{"id":1,"src":"https://example.com/image.jpg","alt":"Image alt text","position":1}],"videos":[{"id":1,"src":"https://example.com/video.mp4","poster":"https://example.com/video.jpg","alt":"Video alt text","position":1}],"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","handle":"product-name","sourceType":"shopify","publishedAt":"2024-01-01T00:00:00.000Z"}},"details":{"type":"object","nullable":true,"properties":{"research":{"type":"string","example":"## Product Description\\n\\n...\\n\\n## Key Selling Points\\n- ..."}},"required":["research"]},"researchStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"completed","description":"Status of the product research workflow, if one exists."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","workspaceId","data","createdAt","updatedAt"],"description":"Product"}}}},"400":{"description":"Invalid product ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"patch":{"summary":"Update product","description":"Partially update a product. Only title, description, research, and tags are updatable.","security":[{"APIKeyAuth":[]}],"tags":["Products"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"research":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"description":"PatchProductRequest"}}}},"responses":{"200":{"description":"Product updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"data":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Product Name"},"description":{"type":"string","example":"Product description"},"vendor":{"type":"string","example":"Vendor Name"},"productType":{"type":"string","example":"Product Type"},"tags":{"type":"array","items":{"type":"string"},"example":["Tag 1","Tag 2"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"title":{"type":"string","example":"Variant Name"},"sku":{"type":"string","example":"SKU123"},"price":{"type":"string","example":"100.00"},"compareAtPrice":{"type":"string","example":"120.00"},"available":{"type":"boolean","example":true}},"required":["id","title","sku","price","available"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/image.jpg"},"alt":{"type":"string","nullable":true,"example":"Image alt text"},"position":{"type":"number","example":1}},"required":["id","src","position"]}},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","example":1},"src":{"type":"string","example":"https://example.com/video.mp4"},"poster":{"type":"string","example":"https://example.com/video.jpg"},"alt":{"type":"string","example":"Video alt text"},"position":{"type":"number","example":1}},"required":["id","src","poster","alt","position"]}},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"handle":{"type":"string","example":"product-name"},"sourceType":{"type":"string","enum":["shopify","woocommerce","product_page"]},"publishedAt":{"type":"string","nullable":true}},"required":["id","title","description","vendor","productType","tags","variants","images","videos","createdAt","updatedAt","handle"],"example":{"title":"Product Name","description":"Product description","vendor":"Vendor Name","productType":"Product Type","tags":["Tag 1","Tag 2"],"variants":[{"id":1,"title":"Variant Name","sku":"SKU123","price":"100.00","compareAtPrice":"120.00","available":true}],"images":[{"id":1,"src":"https://example.com/image.jpg","alt":"Image alt text","position":1}],"videos":[{"id":1,"src":"https://example.com/video.mp4","poster":"https://example.com/video.jpg","alt":"Video alt text","position":1}],"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","handle":"product-name","sourceType":"shopify","publishedAt":"2024-01-01T00:00:00.000Z"}},"details":{"type":"object","nullable":true,"properties":{"research":{"type":"string","example":"## Product Description\\n\\n...\\n\\n## Key Selling Points\\n- ..."}},"required":["research"]},"researchStatus":{"type":"string","enum":["pending","running","completed","failed","cancelled"],"example":"completed","description":"Status of the product research workflow, if one exists."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","workspaceId","data","createdAt","updatedAt"],"description":"Product"}}}},"400":{"description":"Invalid product ID or product data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"delete":{"summary":"Delete product","description":"Delete a product and its media (requires workspace access)","security":[{"APIKeyAuth":[]}],"tags":["Products"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"example":true}},"required":["success"],"description":"SuccessResponse"}}}},"400":{"description":"Invalid product ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/products/{id}/personas":{"get":{"summary":"Get product personas","description":"Get all personas for a product (requires workspace access)","security":[{"APIKeyAuth":[]}],"tags":["Personas"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of personas","content":{"application/json":{"schema":{"type":"object","properties":{"personas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Sarah, The Stylish Practicalist"},"ageRange":{"type":"string","example":"25-34"},"gender":{"type":"string","example":"female"},"data":{"type":"string","example":"Education: bachelors\\nSpending Behaviour: luxury, impulse\\n\\n## Profile\\Sarah is ..."}},"required":["id","name","ageRange","gender","data"],"description":"ProductPersonaItem"}}},"required":["personas"],"description":"GetProductPersonasResponse"}}}},"400":{"description":"Invalid product ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/personas":{"post":{"summary":"Create persona","description":"Create a persona for a product. Body: { productId, name, ageRange, gender, data }. ageRange must be {number}-{number} (e.g. \"25-34\"). gender must be \"male\" or \"female\". Requires workspace access.","security":[{"APIKeyAuth":[]}],"tags":["Personas"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"productId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"ageRange":{"type":"string","pattern":"^\\d+-\\d+$","example":"25-34"},"gender":{"type":"string","enum":["male","female"]},"data":{"type":"string","minLength":1}},"required":["productId","name","ageRange","gender","data"],"description":"CreatePersonaRequest"}}}},"responses":{"201":{"description":"Persona created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"productId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Sarah, The Stylish Practicalist"},"ageRange":{"type":"string","example":"25-34"},"gender":{"type":"string","example":"female"},"data":{"type":"string","example":"Education: bachelors\\nSpending Behaviour: luxury, impulse\\n\\n## Profile\\Sarah is ..."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","productId","workspaceId","name","ageRange","gender","data","createdAt","updatedAt"],"description":"Persona"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/personas/{id}":{"patch":{"summary":"Update persona","description":"Update a persona's name, gender, ageRange, and/or data. At least one field required. Requires workspace access.","security":[{"APIKeyAuth":[]}],"tags":["Personas"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"ageRange":{"type":"string","pattern":"^\\d+-\\d+$"},"gender":{"type":"string","enum":["male","female"]},"data":{"type":"string","minLength":1}},"description":"PatchPersonaRequest"}}}},"responses":{"200":{"description":"Persona updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"productId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"workspaceId":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Sarah, The Stylish Practicalist"},"ageRange":{"type":"string","example":"25-34"},"gender":{"type":"string","example":"female"},"data":{"type":"string","example":"Education: bachelors\\nSpending Behaviour: luxury, impulse\\n\\n## Profile\\Sarah is ..."},"createdAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2024-01-01T00:00:00.000Z"}},"required":["id","productId","workspaceId","name","ageRange","gender","data","createdAt","updatedAt"],"description":"Persona"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Persona not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"delete":{"summary":"Delete persona","description":"Delete a persona. Requires workspace access.","security":[{"APIKeyAuth":[]}],"tags":["Personas"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Persona deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"example":true}},"required":["success"],"description":"SuccessResponse"}}}},"400":{"description":"Invalid persona ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Persona not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/products/{id}/media":{"get":{"summary":"Get product media","description":"Get all media for a product. Supports limit/offset pagination. Query params: type, limit, offset.","security":[{"APIKeyAuth":[]}],"tags":["Media"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["image","video"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"number","nullable":true,"example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"example":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Media list","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Media Name"},"type":{"type":"string","enum":["image","video","audio","document"],"example":"image"},"mimeType":{"type":"string","example":"image/png"},"fileSize":{"type":"string","example":"1024"},"storagePath":{"type":"string","example":"userId/productId/media/file.png"},"width":{"type":"string","nullable":true},"height":{"type":"string","nullable":true},"duration":{"type":"string","nullable":true}},"required":["id","name","type","mimeType","fileSize","storagePath"],"description":"Media"}},"total":{"type":"number","example":42}},"required":["media","total"],"description":"GetProductMediaResponse"}}}},"400":{"description":"Invalid product ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/media/{id}":{"get":{"summary":"Get media","description":"Get media by ID (requires access)","security":[{"APIKeyAuth":[]}],"tags":["Media"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Media details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Media Name"},"type":{"type":"string","enum":["image","video","audio","document"],"example":"image"},"mimeType":{"type":"string","example":"image/png"},"fileSize":{"type":"string","example":"1024"},"storagePath":{"type":"string","example":"userId/productId/media/file.png"},"width":{"type":"string","nullable":true},"height":{"type":"string","nullable":true},"duration":{"type":"string","nullable":true}},"required":["id","name","type","mimeType","fileSize","storagePath"],"description":"Media"}}}},"400":{"description":"Invalid media ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Media not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}},"delete":{"summary":"Delete media","description":"Delete media (requires access)","security":[{"APIKeyAuth":[]}],"tags":["Media"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Media deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"example":true}},"required":["success"],"description":"SuccessResponse"}}}},"400":{"description":"Invalid media ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"404":{"description":"Media not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/avatars":{"get":{"summary":"List avatars","description":"List all published avatars with optional filters for gender, age, and setting. Supports limit/offset pagination. Returns avatars with signed image and video URLs.","security":[{"APIKeyAuth":[]}],"tags":["Avatars"],"parameters":[{"schema":{"type":"string","enum":["male","female"]},"required":false,"name":"gender","in":"query"},{"schema":{"type":"string","enum":["young_adult","adult","senior"]},"required":false,"name":"age","in":"query"},{"schema":{"type":"string","enum":["studio","office","living_room","bedroom","kitchen","bathroom","home","car","gym","coffee_shop","nature","outside","street","streaming","formal"]},"required":false,"name":"setting","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of avatars","content":{"application/json":{"schema":{"type":"object","properties":{"avatars":{"type":"array","items":{"type":"object","properties":{"avatar":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"gender":{"type":"string","enum":["male","female"]},"age":{"type":"number"},"race":{"type":"string","enum":["caucasian","asian","african_american","hispanic","middle_eastern","south_asian","mixed"]},"setting":{"type":"string","nullable":true,"enum":["studio","office","living_room","bedroom","kitchen","bathroom","home","car","gym","coffee_shop","nature","outside","street","streaming","formal",null]},"imageStoragePath":{"type":"string","nullable":true},"videoStoragePath":{"type":"string","nullable":true},"status":{"type":"string","enum":["processing","review","published","errored"]},"metadata":{"nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","gender","age","race","setting","imageStoragePath","videoStoragePath","status","createdAt","updatedAt"]},"imageUrl":{"type":"string","nullable":true},"videoUrl":{"type":"string","nullable":true}},"required":["avatar","imageUrl","videoUrl"]}},"total":{"type":"number"}},"required":["avatars","total"],"description":"GetAvatarsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/templates":{"get":{"summary":"List templates","description":"List published templates with optional filters for type, industry, concept, and workspaceId. Supports limit/offset pagination.\n\nEach template is typed:\n- type=\"staticAd\": metadata describes aspectRatio, textElements, and visualElements used to build brief.type=\"static\".\n- type=\"videoAd\": metadata describes sceneCount and scenesStructure used to build brief.type=\"video\".","security":[{"APIKeyAuth":[]}],"tags":["Templates"],"parameters":[{"schema":{"type":"string","enum":["videoAd","staticAd","hyperframe"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]},"required":false,"name":"industry","in":"query"},{"schema":{"type":"string","enum":["announcements_updates","features_and_benefits","before_and_after","product_spotlight","comparison","social_proof","problem_solution","case_study_statistics","collage","screenshot","memes","ugc","product_demo","explainer","vsl"]},"required":false,"name":"concept","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"workspaceId","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"number","nullable":true,"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of templates","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"concepts":{"type":"array","items":{"type":"string","enum":["announcements_updates","features_and_benefits","before_and_after","product_spotlight","comparison","social_proof","problem_solution","case_study_statistics","collage","screenshot","memes","ugc","product_demo","explainer","vsl"]}},"industries":{"type":"array","items":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]}},"storagePath":{"type":"string","nullable":true},"workspaceId":{"type":"string","nullable":true,"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["staticAd"],"description":"Static/image template type.","example":"staticAd"},"metadata":{"type":"object","properties":{"aspectRatio":{"type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"],"description":"Static template aspect ratio.","example":"9:16"},"textElements":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Text slot type to copy into brief.textElements[].type.","example":"headline"},"content":{"type":"string","description":"Original template copy to copy into brief.textElements[].originalContent.","example":"NEW ACCESSORY"},"position":{"type":"string","description":"Text slot position to copy into brief.textElements[].position.","example":"top-center"},"importance":{"type":"string","description":"Text slot priority to copy into brief.textElements[].importance.","example":"high"}},"required":["type","content","position","importance"]},"description":"Static text slots. Copy these into the brief and replace only the productContent values."},"visualElements":{"type":"object","properties":{"hasLogo":{"type":"boolean","description":"Whether the template includes a logo. Copy into brief.hasLogo.","example":false},"productImageCount":{"type":"number","description":"Recommended number of product images for the template.","example":1},"backgroundStyle":{"type":"string","description":"Background style guidance for the template.","example":"clean studio gradient"},"layout":{"type":"string","description":"Layout guidance for the template.","example":"single product center with stacked text"}},"required":["hasLogo","productImageCount","backgroundStyle","layout"]},"additionalInfo":{"type":"string","description":"Additional notes for using the template.","example":"Keep headline short and bold."}},"required":["aspectRatio","textElements","visualElements","additionalInfo"],"description":"Metadata for a static template. Use it to build brief.type=\"static\"."}},"required":["id","name","description","concepts","industries","storagePath","workspaceId","createdAt","updatedAt","type","metadata"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"concepts":{"type":"array","items":{"type":"string","enum":["announcements_updates","features_and_benefits","before_and_after","product_spotlight","comparison","social_proof","problem_solution","case_study_statistics","collage","screenshot","memes","ugc","product_demo","explainer","vsl"]}},"industries":{"type":"array","items":{"type":"string","enum":["fashion_apparel","beauty_personal_care","health_fitness","food_beverage","home_lifestyle","parenting_baby","pets","travel_experiences","consumer_tech_electronics","ecommerce_dtc","education_elearning","marketing_advertising","b2b_saas","finance_fintech","healthcare_medical","real_estate_property","other"]}},"storagePath":{"type":"string","nullable":true},"workspaceId":{"type":"string","nullable":true,"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["videoAd"],"description":"Video template type.","example":"videoAd"},"metadata":{"type":"object","properties":{"sceneCount":{"type":"number","description":"Expected number of scenes in the video brief.","example":6},"scenesStructure":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Scene label to copy into brief.scenes[].label.","example":"Hook"},"instructions":{"type":"string","description":"Creative guidance for the scene that can be used when writing script and description.","example":"Open with a strong first-person reaction that creates curiosity."},"sceneType":{"type":"string","enum":["image","video","avatar-only","avatar-with-product","image-or-video"],"description":"Template scene type to map into a concrete brief.scenes[].sceneType.","example":"avatar-with-product"}},"required":["label","instructions","sceneType"]},"description":"Video scene blueprint. Copy label and sceneType into the brief, then write script, description, mediaSource, and seconds."},"instructions":{"type":"string","description":"General video-level guidance for the whole template.","example":"Keep pacing fast and every scene under 8 seconds."}},"required":["sceneCount","scenesStructure"],"description":"Metadata for a video template. Use it to build brief.type=\"video\"."}},"required":["id","name","description","concepts","industries","storagePath","workspaceId","createdAt","updatedAt","type","metadata"]}],"description":"Published template. Inspect type and metadata before constructing an ad brief."}},"total":{"type":"number"}},"required":["templates","total"],"description":"GetTemplatesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/voices":{"get":{"summary":"List voices","description":"List voices filtered by workspace language. Returns voices matching the workspace's language with preview URLs. Requires workspaceId query parameter.","security":[{"APIKeyAuth":[]}],"tags":["Voices"],"parameters":[{"schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"},"required":true,"name":"workspaceId","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":10},"required":false,"name":"minVoices","in":"query"}],"responses":{"200":{"description":"List of voices","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"voiceId":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"previewUrl":{"type":"string"},"labels":{"type":"object","properties":{"gender":{"type":"string"},"age":{"type":"string"},"accent":{"type":"string"},"descriptive":{"type":"string"},"use case":{"type":"string"}}},"verifiedLanguages":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"modelId":{"type":"string"},"accent":{"type":"string"},"locale":{"type":"string"},"previewUrl":{"type":"string"}},"required":["language"]}}},"required":["voiceId","name"]}},"workspace_language":{"type":"object","properties":{"isoCode":{"type":"string"},"name":{"type":"string"}},"required":["isoCode","name"]},"total":{"type":"number"}},"required":["voices","workspace_language","total"],"description":"GetVoicesResponse"}}}},"400":{"description":"Invalid workspace ID or missing workspaceId","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"403":{"description":"Forbidden - no access to workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}},"/v1/music":{"get":{"summary":"List music tracks","description":"List all available music tracks for briefs. Returns pre-defined music tracks from Pixabay with playback URLs.","security":[{"APIKeyAuth":[]}],"tags":["Music"],"responses":{"200":{"description":"List of music tracks","content":{"application/json":{"schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"volume":{"type":"number"}},"required":["id","url","title"]}},"total":{"type":"number"}},"required":["tracks","total"],"description":"GetMusicResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Error message"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"ads.0.brief.textElements.0.productContent"},"message":{"type":"string","example":"Required"},"code":{"type":"string","example":"invalid_type"}},"required":["path","message"],"description":"ValidationIssue"},"description":"Flat list of validation issues; present when error is due to schema validation","example":[{"path":"ads.0.brief.type","message":"Invalid enum value. Expected 'static' | 'video'","code":"invalid_enum_value"}]},"details":{"nullable":true,"description":"Verbose hierarchical error tree (from z.treeifyError); structure: { errors?: string[], properties?: Record<string, tree>, items?: Array<tree|null> }. Traverse via details.properties?.fieldName or details.items?.[index]"}},"required":["error"],"description":"Error"}}}}}}}},"tags":[{"name":"Workspaces","description":"Workspace management and configuration"},{"name":"Brand","description":"Brand identity and logos"},{"name":"Workspace Analyses","description":"Store URL analysis and workspace creation"},{"name":"Scrape Products","description":"Product scraping from URLs"},{"name":"Products","description":"Product catalog and management"},{"name":"Personas","description":"Buyer personas for products"},{"name":"Avatars","description":"Published avatars for video briefs"},{"name":"Templates","description":"Ad templates for static and video ads"},{"name":"Voices","description":"Voice options for workspace language"},{"name":"Music","description":"Music tracks for briefs"},{"name":"Media","description":"Media assets"}]}