Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"LeapMemory","version":"0.1.0"},"paths":{"/v1/health":{"get":{"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health V1 Health Get"}}}}}}},"/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Create org + owner user + default project + admin API key + session.\n\nPersonal accounts also get one auto-provisioned tenant (\"me\") so their\nmemory has somewhere to live with no API call. Provisioning runs after the\ncontrol-plane transaction commits, because it makes external calls (TDB,\nArango, ES) that cannot sit inside a Postgres transaction.\n\n`api_key` in the response is the ONLY chance to capture it.","operationId":"signup_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"post":{"tags":["auth"],"summary":"Login","description":"Verify credentials → return session token + user + org + projects.","operationId":"login_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Login Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Delete the current session.","operationId":"logout_logout_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Logout Logout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Email a reset link. Always succeeds — never reveals if the email exists.","operationId":"forgot_password_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Forgot Password Forgot Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Consume a reset token, set the new password, notify by email.","operationId":"reset_password_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Password Reset Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contact":{"post":{"tags":["auth"],"summary":"Contact","description":"Send a contact-form message to the founder inbox via Resend.\n\nreply_to is the visitor's address, so a normal inbox reply goes straight\nback to them. No DB row — a failed send fails loudly (500) and the page\nsurfaces the direct support@ address instead.","operationId":"contact_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Contact Contact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants":{"post":{"tags":["tenants"],"summary":"Create Tenant","description":"Provision a tenant: TDB (Mongo+Redis) + Arango DB + ES index + lm_tenants row.","operationId":"create_tenant_v1_tenants_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Tenant V1 Tenants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tenants"],"summary":"List Tenants","description":"List tenants in the project, filtered by key scope.\n\nSoft-deleted tenants are hidden by default; ?include_deleted=true lists\nthem too, with status='deleted', so a caller can find one to restore.","operationId":"list_tenants_v1_tenants_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Tenants V1 Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}":{"get":{"tags":["tenants"],"summary":"Get Tenant","operationId":"get_tenant_v1_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Tenant V1 Tenants Tenant Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenants"],"summary":"Update Tenant","description":"Set the label, and optionally who is who in this tenant.\n\nlabel is written on every call (empty clears it). members is written\nonly when sent, and replaces the whole list. Each member is a speaker_id\nand the names that mean them; extraction uses the list to resolve a\nname, misheard or not, to that member's anchor, and never stores the\nassistant as a person. A name may belong to one member only.","operationId":"update_tenant_v1_tenants__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Tenant V1 Tenants Tenant Id Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant","description":"Delete a tenant. Soft by default; ?hard=true removes the lm_tenants row.","operationId":"delete_tenant_v1_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"hard","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Hard"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Tenant V1 Tenants Tenant Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/restore":{"post":{"tags":["tenants"],"summary":"Restore Tenant","description":"Restore a soft-deleted tenant. Storage was kept alive, so just flip status.","operationId":"restore_tenant_v1_tenants__tenant_id__restore_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Restore Tenant V1 Tenants Tenant Id Restore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/turns":{"post":{"tags":["memory"],"summary":"Ingest Turn","description":"Ingest a single turn. Sync Mongo write + NATS publish for async extraction.","operationId":"ingest_turn_v1_tenants__tenant_id__turns_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Turn V1 Tenants Tenant Id Turns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["memory"],"summary":"List Turns","description":"The tenant's stored turns, newest first, page by page.\n\nrecall answers a question; this lists what is there, which is what an app\nneeds to show someone their own memory. Free like recall — only saving is\nbilled.\n\nsearch runs on ES over each turn's chunks (lexical, multilingual analyzer).\nspeaker is an exact speaker_id, start/end an inclusive ts window, order\nasc|desc by ts. total reflects the filtered set, so it paginates. speakers\nlists the tenant's distinct speaker_ids so a client can offer real filters\ninstead of guessing them.\n\nSame shape the dashboard's Turns tab already receives (Rule 3) — one\nresponse to learn, whichever door you came through.","operationId":"list_turns_v1_tenants__tenant_id__turns_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"speaker","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Speaker"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Turns V1 Tenants Tenant Id Turns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/turns/batch":{"post":{"tags":["memory"],"summary":"Ingest Batch","description":"Ingest N turns in parallel.","operationId":"ingest_batch_v1_tenants__tenant_id__turns_batch_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTurnsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Batch V1 Tenants Tenant Id Turns Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/documents":{"post":{"tags":["memory"],"summary":"Ingest Document","description":"Ingest one upload: cut it into turns, then hand them to the batch.\n\nThe cover is the only new thing here. Cutting reuses the chunker the\nworker already splits turns with, so a piece IS a chunk by\nconstruction rather than by two numbers agreeing, and one piece is one\nqueue unit. That size is also what the queue can carry: measured 2 Oct\n2026 over 121 real turns, processing costs 9.8 s per 1000 chars on\naverage and 102.8 s per 1000 at the worst observed, so a 2,048-char\npiece lands at 210 s worst case — a 4.3x margin under\nNATS_ACK_WAIT_SECONDS=900, where 8,192 would leave 1.1x and the\n100,000 a single turn may carry would need hours.\n\nEverything after cutting is the proven path, called rather than\ncopied (Rule 3): /turns/batch already runs the pieces as separate\nunits, bills per piece, and refunds the failed share. Billing by size\nis therefore not new machinery, it is what feeding the batch gives.\n\nPieces default to context_only: stored verbatim, chunked, embedded and\nsearchable, with no fact derived. Nothing is lost by that — the whole\ntext stays and answers quote it — and it costs no paid call. Set\nextract to pay for facts from a document worth learning.","operationId":"ingest_document_v1_tenants__tenant_id__documents_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Document V1 Tenants Tenant Id Documents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/documents/{document_id}":{"delete":{"tags":["memory"],"summary":"Delete Document","description":"Delete one upload: every piece it was cut into, and what each derived.\n\nOne handle for a thing stored as many: without it a caller has to keep\neach piece's turn id to undo an upload, which is the bookkeeping the\ndocument cover exists to remove.\n\nNo new deletion logic — this walks the document's pieces and runs the\nsame cascade a single turn gets, so verbatim text, searchable chunk,\ngraph provenance and recognition cache go together (Rule 3). Deleting\nnothing is success: an unknown id means the document is already gone.","operationId":"delete_document_v1_tenants__tenant_id__documents__document_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Document Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Document V1 Tenants Tenant Id Documents Document Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/containers/{source}/{container}":{"delete":{"tags":["memory"],"summary":"Delete Container","description":"Delete everything written from one place: a mailbox, a channel.\n\nWhat arrived together leaves together. Same cascade a single turn\ngets, once per turn, so nothing outlives the place it came from.\n`DELETE /documents/{id}` is this call with source fixed to \"document\".\n\nThe container is a path parameter so a mailbox address or a channel\nname with slashes arrives whole. Deleting nothing is success. A turn\nstill being ingested returns 409 and nothing is deleted.","operationId":"delete_container_v1_tenants__tenant_id__containers__source___container__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"source","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"title":"Source"}},{"name":"container","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":400,"title":"Container"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Container V1 Tenants Tenant Id Containers Source Container Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/recall":{"post":{"tags":["memory"],"summary":"Recall","description":"Recall facts + chunks + detected anchors for a query.","operationId":"recall_v1_tenants__tenant_id__recall_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Recall V1 Tenants Tenant Id Recall Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/briefing":{"get":{"tags":["memory"],"summary":"Briefing","description":"The tenant's standing rules plus its picture, as one injectable\ntext block. Written offline, read here. Pull once per session start;\nuse recall for questions.","operationId":"briefing_v1_tenants__tenant_id__briefing_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Briefing V1 Tenants Tenant Id Briefing Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/turns/status":{"get":{"tags":["memory"],"summary":"Turns Status","description":"Ingest progress: turn counts by status plus failed turn ids. Poll\nafter bulk ingest until indexed == total. Unmetered, like briefing.","operationId":"turns_status_v1_tenants__tenant_id__turns_status_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Turns Status V1 Tenants Tenant Id Turns Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/turns/{turn_id}":{"get":{"tags":["memory"],"summary":"Get Turn","description":"One turn, verbatim: the answer to \"where does it know this from\".\n\nEvery fact carries the turn_ids it was drawn from; this reads one of\nthem back. Without it those ids name nothing a caller can show, and a\nperson asking why their memory believes something gets a uuid.\n\nSame turn shape the list returns (Rule 3). 404 when the id names no\nturn in this tenant, which is also what an id from another tenant\ngets: turns live in per-tenant databases, so there is nothing to\nrefuse. Free, like the list.","operationId":"get_turn_v1_tenants__tenant_id__turns__turn_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Turn V1 Tenants Tenant Id Turns Turn Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["memory"],"summary":"Delete Turn","description":"Delete one turn and everything derived from it: the verbatim turn,\nits chunks, and any facts sourced only from this turn. Facts with other\nsurviving sources stay. 404 if the turn doesn't exist; 409 if it is\nstill being processed (retry once settled).","operationId":"delete_turn_v1_tenants__tenant_id__turns__turn_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Turn V1 Tenants Tenant Id Turns Turn Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tenants/{tenant_id}/conversation/end":{"post":{"tags":["memory"],"summary":"End Conversation","description":"The app says this tenant's conversation has ended (a call hung up, a\nchat closed). In conversation mode what was said before now is read as\nsoon as its last line is stored, instead of after window_quiet_seconds\nof quiet; without the call, the quiet gap still ends it. Call it after\nthe conversation's last POST /turns has answered: a line still on its\nway when the end is read is read on its own, after the quiet gap.","operationId":"end_conversation_v1_tenants__tenant_id__conversation_end_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response End Conversation V1 Tenants Tenant Id Conversation End Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/login":{"get":{"tags":["oauth"],"summary":"Oauth Login Page","operationId":"oauth_login_page_oauth_login_get","parameters":[{"name":"return_to","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Return To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["oauth"],"summary":"Oauth Login Submit","operationId":"oauth_login_submit_oauth_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_login_submit_oauth_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["oauth"],"summary":"Oauth Metadata","operationId":"oauth_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["oauth"],"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/register":{"post":{"tags":["oauth"],"summary":"Oauth Register","operationId":"oauth_register_oauth_register_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["oauth"],"summary":"Oauth Authorize","operationId":"oauth_authorize_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string","default":"","title":"Redirect Uri"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Response Type"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"","title":"Scope"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"code_challenge","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code Challenge Method"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/consent":{"post":{"tags":["oauth"],"summary":"Oauth Consent","operationId":"oauth_consent_oauth_consent_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_consent_oauth_consent_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["oauth"],"summary":"Oauth Token","operationId":"oauth_token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["oauth"],"summary":"Oauth Revoke","operationId":"oauth_revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_revoke_oauth_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["mcp"],"summary":"Mcp Endpoint","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/d/apikeys":{"get":{"tags":["api keys"],"summary":"List Api Keys","operationId":"list_api_keys_d_apikeys_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Api Keys D Apikeys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api keys"],"summary":"Create Api Key","operationId":"create_api_key_d_apikeys_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Api Key D Apikeys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/d/apikeys/{key_id}":{"delete":{"tags":["api keys"],"summary":"Delete Api Key","operationId":"delete_api_key_d_apikeys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key D Apikeys Key Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/d/apikeys/{key_id}/spend":{"get":{"tags":["api keys"],"summary":"Get Api Key Spend","description
# --- truncated at 32 KB (107 KB total) ---
# Full source: https://artifacts.apis.io/leapmemory-com/openapi/_original/leapmemory-com-api-openapi.json