# Memorize content to Rememberizer

{% openapi src="<https://2952947711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNqpTh7Mh66N0RnO0k24%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media&token=cbad765b-1613-4222-b591-9ae17a3b7cfa>" path="/documents/memorize/" method="post" %}
[rememberizer\_openapi.yml](https://2952947711-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNqpTh7Mh66N0RnO0k24%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=cbad765b-1613-4222-b591-9ae17a3b7cfa)
{% endopenapi %}

## Example Requests

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST \
  https://api.rememberizer.ai/api/v1/documents/memorize/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Important Information",
    "content": "This is important content that I want Rememberizer to remember."
  }'
```

{% hint style="info" %}
Replace `YOUR_JWT_TOKEN` with your actual JWT token.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const memorizeContent = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/documents/memorize/', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_JWT_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Important Information',
      content: 'This is important content that I want Rememberizer to remember.'
    })
  });
  
  if (response.status === 201) {
    console.log("Content stored successfully");
  } else {
    console.error("Failed to store content");
    const errorData = await response.json();
    console.error(errorData);
  }
};

memorizeContent();
```

{% hint style="info" %}
Replace `YOUR_JWT_TOKEN` with your actual JWT token.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

def memorize_content():
    headers = {
        "Authorization": "Bearer YOUR_JWT_TOKEN",
        "Content-Type": "application/json"
    }
    
    payload = {
        "name": "Important Information",
        "content": "This is important content that I want Rememberizer to remember."
    }
    
    response = requests.post(
        "https://api.rememberizer.ai/api/v1/documents/memorize/",
        headers=headers,
        data=json.dumps(payload)
    )
    
    if response.status_code == 201:
        print("Content stored successfully")
    else:
        print(f"Failed to store content: {response.text}")

memorize_content()
```

{% hint style="info" %}
Replace `YOUR_JWT_TOKEN` with your actual JWT token.
{% endhint %}
{% endtab %}
{% endtabs %}

## Request Parameters

| Parameter | Type   | Description                                              |
| --------- | ------ | -------------------------------------------------------- |
| name      | string | **Required.** A name for the content being stored.       |
| content   | string | **Required.** The text content to store in Rememberizer. |

## Response

A successful request returns a 201 Created status code with no response body.

## Error Responses

| Status Code | Description                                                 |
| ----------- | ----------------------------------------------------------- |
| 400         | Bad Request - Missing required fields or invalid parameters |
| 401         | Unauthorized - Invalid or missing authentication            |
| 500         | Internal Server Error                                       |

## Use Cases

This endpoint is particularly useful for:

1. Storing important notes or information that you want to access later
2. Adding content that isn't available through integrated data sources
3. Manually adding information that needs to be searchable
4. Adding contextual information for LLMs accessing your knowledge base

The stored content becomes searchable through the search endpoints and can be included in mementos.
