Fency.ai
Memories

Create text memory

POST
/v1/memories

Create a memory from text content.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/memories" \  -H "Content-Type: application/json" \  -d '{    "memoryTypeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",    "sourceType": "TEXT",    "title": "Test File",    "text": "This is an example content.",    "metadata": {      "organization_id": "org_1234567890",      "allowed_roles": [        "Admin",        "Member"      ],      "size": 1337,      "is_available": true,      "mean_score": 3.14    }  }'
{  "id": "mem_cf4fe6caa10b4009a8b103d2d5d64042",  "createdAt": "2024-04-08T17:02:27.887295Z",  "updatedAt": "2024-04-08T17:02:27.887295Z",  "sourceType": "TEXT",  "typeId": "mty_cf4fe6caa10b4009a8b103d2d5d64042",  "title": "Example Title",  "content": "This is the full content of the secret memory.",  "contentParts": 1,  "contentStatus": "SYNCHRONIZED",  "metadata": {    "organization_id": "org_1234567890",    "allowed_roles": [      "Admin",      "Member"    ],    "size": 1337,    "is_available": true,    "mean_score": 3.14  },  "customerId": "cus_examplecustomerid000000000000"}