> ## Documentation Index
> Fetch the complete documentation index at: https://help.memoryplugin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Integration

> Build custom integrations with MemoryPlugin using our OpenAPI specification

export const ArticleInfo = ({author, lastUpdated}) => {
  const authorAvatar = author === 'Alara' ? '/images/author-alara.jpg' : author === 'asad' ? '/images/author-alara.jpg' : null;
  const formatDate = dateInput => {
    if (!dateInput) return '';
    if (typeof dateInput === 'string' && !dateInput.match(/^\d{4}-\d{2}-\d{2}/)) {
      return dateInput;
    }
    try {
      const date = new Date(dateInput);
      const now = new Date();
      const diffTime = Math.abs(now - date);
      const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
      if (diffDays === 0) return 'today';
      if (diffDays === 1) return '1 day ago';
      if (diffDays < 7) return `${diffDays} days ago`;
      if (diffDays < 30) return `${Math.ceil(diffDays / 7)} week${Math.ceil(diffDays / 7) > 1 ? 's' : ''} ago`;
      if (diffDays < 365) return `${Math.ceil(diffDays / 30)} month${Math.ceil(diffDays / 30) > 1 ? 's' : ''} ago`;
      return `${Math.ceil(diffDays / 365)} year${Math.ceil(diffDays / 365) > 1 ? 's' : ''} ago`;
    } catch {
      return dateInput;
    }
  };
  return <div style={{
    display: "flex",
    alignItems: "center",
    gap: "8px",
    marginBottom: "16px",
    padding: "8px 12px",
    backgroundColor: "var(--ifm-color-emphasis-100)",
    borderRadius: "6px",
    fontSize: "14px",
    color: "var(--ifm-color-content-secondary)",
    border: "1px solid var(--ifm-color-emphasis-200)",
    opacity: "0.8"
  }}>
      <div style={{
    width: "40px",
    height: "40px",
    borderRadius: "50%",
    background: authorAvatar || "linear-gradient(45deg, #4F46E5, #7C3AED)",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "white",
    fontWeight: "bold",
    fontSize: "18px"
  }}>
        {authorAvatar ? <img src={authorAvatar} alt={author} style={{
    width: "100%",
    height: "100%",
    borderRadius: "50%"
  }} /> : author?.[0]?.toUpperCase()}
      </div>
      <div>
        <div style={{
    fontWeight: "400",
    fontSize: "14px"
  }}>Written by <span style={{
    fontWeight: "600"
  }}>{author}</span></div>
        <div style={{
    fontSize: "14px"
  }}>Last updated <span style={{
    fontWeight: "600"
  }}>{formatDate(lastUpdated)}</span></div>
      </div>
    </div>;
};

<ArticleInfo author="Alara" lastUpdated="2026-07-04" />

If you want to build your own integration or use MemoryPlugin on a platform we do not support directly, use the API. Every public endpoint is described in a standard OpenAPI specification, so you can import it into most API tools and generate a client in the language you prefer.

## OpenAPI Specification

The spec is the source of truth for the API. It lists every endpoint, its parameters, and its request and response schemas.

<Card title="MemoryPlugin OpenAPI Spec" icon="file-code" href="https://www.memoryplugin.com/openapi.json">
  Access the complete OpenAPI specification
</Card>

For endpoint-by-endpoint reference with parameters and examples, use the API Reference tab:

<Card title="API Reference" icon="book" href="/api-reference/introduction">
  Full documentation for every endpoint
</Card>

## Authentication

All requests use a Bearer token:

```http theme={null}
Authorization: Bearer YOUR_AUTH_TOKEN
```

### Getting your token

<Steps>
  <Step title="Open Settings">
    In your [MemoryPlugin Dashboard](https://memoryplugin.com/dashboard), open the account menu and choose **Settings**.
  </Step>

  <Step title="Go to Integrations">
    Select the **Integrations** tab and find the **Authentication Token** section.
  </Step>

  <Step title="Copy the token">
    Click **Copy** to copy your token.
  </Step>

  <Step title="Keep it secure">
    Treat the token like a password. If it leaks, use **Regenerate** to invalidate the old one (this will break any integration still using it).
  </Step>
</Steps>

<Warning>
  Never put your token in client-side code or a public repository. Anyone with the token can read and write your memories.
</Warning>

## What You Can Do

The API covers the same core surface as the rest of MemoryPlugin. See the [API Reference](/api-reference/introduction) for exact paths, parameters, and schemas.

* **Memories** - store, query, edit, move, and delete memories.
* **Buckets** - list and create memory buckets.
* **Combined reads** - fetch memories and buckets in one request.
* **Chat history** - upload, list, search, recall, and delete conversations.

## Supported Integration Tools

The OpenAPI spec imports into many platforms:

### Automation Platforms

* **n8n**: Create custom nodes using the OpenAPI spec
* **Zapier**: Build custom integrations (where OpenAPI import is supported)
* **Make (formerly Integromat)**: Custom API connections
* **Microsoft Power Automate**: Custom connector creation

### Development Tools

* **Postman**: Import for API testing and development
* **Insomnia**: API client for testing endpoints
* **Swagger UI**: Interactive API documentation
* **Code Generators**: Generate client libraries in various languages

### AI Platforms

* **[LibreChat](https://www.librechat.ai/docs/features/agents#actions)**: Import as actions for AI conversations
* **Other AI Clients**: Many third-party AI apps support OpenAPI imports

## Example: n8n Integration

<Steps>
  <Step title="Install the n8n OpenAPI node">
    Use the community package: [n8n-openapi-node](https://github.com/devlikeapro/n8n-openapi-node)
  </Step>

  <Step title="Import the OpenAPI spec">
    Point the node at `https://www.memoryplugin.com/openapi.json`
  </Step>

  <Step title="Set authentication">
    Configure Bearer token authentication with your MemoryPlugin token
  </Step>

  <Step title="Build workflows">
    Create n8n workflows that read from and write to your memories
  </Step>
</Steps>

## Use Cases for Custom Integrations

<CardGroup cols={2}>
  <Card title="Workflow Automation" icon="gear">
    Wire memory creation and retrieval into personal or team automation
  </Card>

  <Card title="Custom AI Applications" icon="robot">
    Build your own AI apps backed by persistent memory
  </Card>

  <Card title="Data Migration" icon="database">
    Import existing knowledge bases or personal data into MemoryPlugin
  </Card>

  <Card title="Platform Integration" icon="plug">
    Add MemoryPlugin to platforms without native support
  </Card>
</CardGroup>

## Best Practices

<AccordionGroup>
  <Accordion title="Error Handling">
    Handle non-2xx responses and network failures. Errors return an HTTP status and a JSON body of the shape `{ "error": "message" }`.
  </Accordion>

  <Accordion title="Token Security">
    Never expose your token in client-side code or public repositories. Regenerate it if it leaks.
  </Accordion>

  <Accordion title="Data Validation">
    Validate data before sending it so you avoid errors and keep your memories clean.
  </Accordion>
</AccordionGroup>

## Support and Resources

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Detailed reference for every endpoint
  </Card>

  <Card title="OpenAPI Spec" icon="file-code" href="https://www.memoryplugin.com/openapi.json">
    Machine-readable API specification
  </Card>

  <Card title="Example Integrations" icon="code-branch" href="https://github.com/devlikeapro/n8n-openapi-node">
    Community examples and tools
  </Card>

  <Card title="Developer Support" icon="headset" href="mailto:support@memoryplugin.com">
    Get help with your custom integration
  </Card>
</CardGroup>
