{"openapi":"3.0.3","info":{"title":"Rig API","version":"0.1.0","description":"Token-authed REST API for your Rig second brain. The same store is also an MCP server at https://rig.notpritam.in/mcp. Build custom apps, links, or extensions on top."},"servers":[{"url":"https://rig.notpritam.in"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your rig_live_ token (create one in the dashboard)."}},"schemas":{"Memory":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"content":{"type":"string"},"source":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}},"paths":{"/v1/memories":{"get":{"summary":"List or full-text search memories","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search query"},{"name":"match","in":"query","schema":{"type":"string","enum":["all","any"],"default":"all"},"description":"all = every term (precise), any = OR (recall)"},{"name":"kind","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200,"default":50}}],"responses":{"200":{"description":"Matching memories","content":{"application/json":{"schema":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/Memory"}}}}}}},"401":{"description":"Missing or invalid token"},"429":{"description":"Rate limited"}}},"post":{"summary":"Create a memory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","maxLength":8000},"kind":{"type":"string"},"source":{"type":"string","description":"A source starting with 'auto:' marks a free/system write."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"memory":{"$ref":"#/components/schemas/Memory"}}}}}},"400":{"description":"content is required"},"402":{"description":"Monthly quota exceeded"},"429":{"description":"Rate limited"}}}},"/v1/memories/search":{"post":{"summary":"Search memories via request body (keeps query text out of URLs)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["q"],"properties":{"q":{"type":"string"},"match":{"type":"string","enum":["all","any"]},"limit":{"type":"integer","maximum":200}}}}}},"responses":{"200":{"description":"Matching memories","content":{"application/json":{"schema":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/Memory"}}}}}}}}}},"/v1/memories/{id}":{"delete":{"summary":"Delete one of your memories","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"404":{"description":"Not found"}}}}}}