{"openapi":"3.1.0","info":{"title":"GET /api/v1/client-messages/firm/conversations","version":"1.0.0","description":"List client conversations (firm)"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/client-messages/firm/conversations":{"get":{"tags":["client-messages"],"summary":"List client conversations (firm)","description":"List all client conversations across the firm's businesses.","operationId":"list_firm_conversations_api_v1_client_messages_firm_conversations_get","parameters":[{"name":"firm_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Advisory firm ID (defaults to user's first firm)","title":"Firm Id"},"description":"Advisory firm ID (defaults to user's first firm)"},{"name":"business_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by business","title":"Business Id"},"description":"Filter by business"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Total Count"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__v1__schemas__client_messages__ConversationListResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ConversationCategory":{"type":"string","enum":["general","document_request","tax_question","payment_question","other"],"title":"ConversationCategory"},"ConversationStatus":{"type":"string","enum":["open","waiting_on_client","resolved"],"title":"ConversationStatus"},"ConversationSummaryResponse":{"properties":{"id":{"type":"string","title":"Id"},"business_id":{"type":"string","title":"Business Id"},"advisory_firm_id":{"type":"string","title":"Advisory Firm Id"},"subject":{"type":"string","title":"Subject"},"category":{"$ref":"#/components/schemas/ConversationCategory"},"status":{"$ref":"#/components/schemas/ConversationStatus"},"created_by_user_id":{"type":"string","title":"Created By User Id"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"unread_count":{"type":"integer","title":"Unread Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","business_id","advisory_firm_id","subject","category","status","created_by_user_id","created_at","updated_at"],"title":"ConversationSummaryResponse","description":"Summary shown in the conversation list."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"app__api__v1__schemas__client_messages__ConversationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConversationSummaryResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of items (null when not calculated for performance)"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Pagination limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for next page"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor","description":"Cursor for previous page"},"has_next":{"type":"boolean","title":"Has Next","description":"Whether there are more items"},"has_prev":{"type":"boolean","title":"Has Prev","description":"Whether there are previous items"}},"type":"object","required":["items","has_next","has_prev"],"title":"ConversationListResponse","description":"Paginated list of conversation summaries."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}