{"openapi":"3.1.0","info":{"title":"Dimonk API","version":"1.0.0","description":"The web API behind Dimonk, a conversational Garmin coach available through WhatsApp. Interactive endpoints require an authenticated Dimonk session unless marked public."},"servers":[{"url":"https://dimonk.nicovega.dev"}],"tags":[{"name":"Public","description":"Endpoints available without authentication."},{"name":"Conversations","description":"Authenticated Dimonk conversations."}],"paths":{"/api/product":{"get":{"operationId":"getProductDescriptor","tags":["Public"],"summary":"Get the public Dimonk product descriptor","description":"Returns the canonical product identity, intended audience, supported languages, capabilities, and discovery links. This operation never returns user data.","responses":{"200":{"description":"The public Dimonk product descriptor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDescriptor"}}}}}}},"/api/waitlist":{"post":{"operationId":"joinWaitlist","tags":["Public"],"summary":"Join the Dimonk waitlist","description":"Registers an email for Dimonk early-access updates. Do not submit passwords, authentication codes, health records, or API keys.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"locale":{"type":"string","enum":["en","es","pt","fr"]}}}}}},"responses":{"200":{"description":"Waitlist registration accepted.","content":{"application/json":{"schema":{"type":"object","required":["success","position"],"properties":{"success":{"type":"boolean","const":true},"position":{"type":"integer","minimum":1}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"409":{"description":"The email is already registered."}}}},"/api/chats":{"get":{"operationId":"listConversations","tags":["Conversations"],"summary":"List the authenticated user’s conversations","description":"Lists conversations belonging to the authenticated Dimonk profile. A browser session is required.","security":[{"clerkSession":[]}],"responses":{"200":{"description":"Conversation list.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"createConversation","tags":["Conversations"],"summary":"Create a conversation","description":"Creates a new conversation for the authenticated Dimonk profile.","security":[{"clerkSession":[]}],"responses":{"201":{"description":"Conversation created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/chats/{chatId}":{"get":{"operationId":"getConversation","tags":["Conversations"],"summary":"Get a conversation","description":"Returns one conversation owned by the authenticated Dimonk profile.","security":[{"clerkSession":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Conversation details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"securitySchemes":{"clerkSession":{"type":"apiKey","in":"cookie","name":"__session","description":"Dimonk browser session managed by Clerk."}},"schemas":{"ProductDescriptor":{"type":"object","required":["name","description","audience","capabilities","languages","links"],"properties":{"name":{"type":"string","const":"Dimonk"},"description":{"type":"string"},"audience":{"type":"array","items":{"type":"string"}},"capabilities":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"type":"string","enum":["en","es","pt","fr"]}},"links":{"type":"object","required":["homepage","developers","openapi","llms"],"properties":{"homepage":{"type":"string","format":"uri"},"developers":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"},"llms":{"type":"string","format":"uri"}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}}}}},"Conversation":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"responses":{"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}