{"openapi":"3.1.0","info":{"title":"Exayard API","version":"1.0.0"},"servers":[{"url":"/v1"}],"components":{"schemas":{},"parameters":{}},"paths":{"/v1/me":{"get":{"tags":["Account"],"summary":"Get the authenticated caller","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"clerkUserId":{"type":"string"},"clerkOrgId":{"type":"string"},"tokenType":{"type":"string","enum":["api_key","oauth_token","session_token"]},"memberships":{"type":"array","items":{"type":"object","properties":{"orgId":{"type":"string"},"role":{"type":"string"}},"required":["orgId"]}}},"required":["clerkUserId","tokenType","memberships"]}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List projects in an organization","parameters":[{"schema":{"type":"string","minLength":1,"description":"Convex organization ID","example":"js79m7b3..."},"required":true,"description":"Convex organization ID","name":"organizationId","in":"query"},{"schema":{"type":"string","enum":["lead","contacted","qualified","active","archived"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"_creationTime":{"type":"number"},"organizationId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["lead","contacted","qualified","active","archived"]},"secret":{"type":"string"},"privacy":{"type":"string","enum":["private","unlisted","public"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["_id","_creationTime","organizationId","name","status","createdAt","updatedAt"],"additionalProperties":{"nullable":true}}}}}}}},"post":{"tags":["Projects"],"summary":"Create a project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","minLength":1,"description":"Convex organization ID","example":"js79m7b3..."},"name":{"type":"string","minLength":1,"maxLength":200},"customProperties":{"type":"object","additionalProperties":{"nullable":true}}},"required":["organizationId","name"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string"}},"required":["id","secret"]}}}}}}},"/v1/projects/{id}":{"get":{"tags":["Projects"],"summary":"Get a single project","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"organizationId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"_creationTime":{"type":"number"},"organizationId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["lead","contacted","qualified","active","archived"]},"secret":{"type":"string"},"privacy":{"type":"string","enum":["private","unlisted","public"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["_id","_creationTime","organizationId","name","status","createdAt","updatedAt"],"additionalProperties":{"nullable":true}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/products":{"get":{"tags":["Products"],"summary":"List products in an organization","parameters":[{"schema":{"type":"string","minLength":1,"description":"Convex organization ID","example":"js79m7b3..."},"required":true,"description":"Convex organization ID","name":"organizationId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"_creationTime":{"type":"number"},"organizationId":{"type":"string"},"listId":{"type":"string"},"name":{"type":"string"},"sku":{"type":"string"},"unitOfMeasure":{"type":"string"},"costPerUnit":{"type":"number"},"currency":{"type":"string"},"markupPercent":{"type":"number"},"isActive":{"type":"boolean"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"required":["_id","_creationTime","organizationId","listId","isActive","createdAt","updatedAt"],"additionalProperties":{"nullable":true}}}}}}}},"post":{"tags":["Products"],"summary":"Create a product","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","minLength":1,"description":"Convex organization ID","example":"js79m7b3..."},"listId":{"type":"string","minLength":1,"description":"Convex list ID (product list)"},"name":{"type":"string","minLength":1,"maxLength":200},"sku":{"type":"string","maxLength":100},"unitOfMeasure":{"type":"string","maxLength":50},"costPerUnit":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"markupPercent":{"type":"number","minimum":0},"customProperties":{"type":"object","additionalProperties":{"nullable":true}},"position":{"type":"integer","minimum":0}},"required":["organizationId","listId"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}}}}