Get user memory
Returns memory for the user tied to your API key. Send JSON only (no multipart). The API merges optional modelType / modelId from the body with your key and requests memory with a user object built from that context.
POST
/users/get-user-memoryRequest fields
| Field | Type | Required | Description |
|---|---|---|---|
| modelType | string | Optional | Convenience field at the top level of the body. When provided, it is merged onto the outbound user sent to Leni. |
| modelId | string | null | Optional | Convenience field at the top level of the body. When explicitly present, it is merged onto the outbound user sent to Leni. |
Example body
JSON
{
"modelType": "leniq-pro",
"modelId": null
}Code examples
const res = await fetch(`${process.env.API_BASE}/users/get-user-memory`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": process.env.LENI_API_KEY!,
},
body: JSON.stringify({
modelType: "leniq-pro",
modelId: null,
}),
});
const memories = await res.json();Response shape follows the memory service contract for your deployment. To change rows afterward, see Update memory.