MemoryStore MemoryStore / Developer Docs
Developer Guide • MemoryStore Plugin Protocol

Build a MemoryStore Plugin

A MemoryStore plugin is an independent microservice that receives saved reels, videos, or web links, processes them with your own AI or backend logic, and streams live progress and interactive results directly back into the user’s library.


Step 01

Register your plugin

Register your plugin metadata and webhook endpoint using your personal MemoryStore authentication token. You must provide a publicly reachable https:// endpoint (localhost and private IPv4 ranges are strictly rejected by the validator).

POST https://api.memorystore.co.in/api/plugins/register
Authorization: Bearer <YOUR_LOGIN_TOKEN>
Content-Type: application/json

{
  "name": "My Analyzer",
  "slug": "my-analyzer",
  "description": "What it does (shown to users)",
  "icon": "πŸ”Œ",
  "webhook_url": "https://your-server.com/api/webhook",
  "health_endpoint": "https://your-server.com/api/health",
  "trigger_phrase": "run my analyzer",
  "result_url_template": "https://your-server.com/view/{{result_id}}",
  "milestones": [
    { "id": "receive", "label": "Video received" },
    { "id": "analyze", "label": "Analyzing content" }
  ]
}

Copy your secret immediately

The registration response contains auth_secret exactly once β€” it is never stored in plaintext or shown again. Save it as MEMORYSTORE_PLUGIN_SECRET on your server. If lost, you must register a new plugin.

Field Specifications & Invariants

Field Type Rules
slug string Lowercase letters, numbers, and hyphens only. Globally unique identifier.
milestones array 3 to 6 ordered milestones with lowercase + underscore/hyphen id and a concise label.
webhook_url string Public HTTPS URL that accepts inbound POST triggers and validation probes.
limits quota Maximum 50 registered plugins per user account. New plugins begin in pending state until verified.
Step 02

Pass automatic validation

Immediately after registration, the MemoryStore validation agent performs automated readiness probes against your server. The initial validation test message is intentionally unsigned β€” return 200 OK immediately and do not reject it for a missing signature:

1. Webhook Test Probe POST /webhook
// User-Agent: MemoryStore-Validation/1.0
{
  "event": "validation.test",
  "timestamp": "2026-09-10T12:00:00Z"
}

// Response: Return HTTP 200 OK
// within 10 seconds.
2. Health Status Check GET /health
// Expected Response JSON:
{
  "status": "healthy",
  "checks": {
    "database": true,
    "ai_api": true
  }
}

Each individual check item inside checks must evaluate to a strict boolean (true or false). If no explicit health endpoint is defined during registration, our probe guesses one relative to your webhook base path.

Step 03

Receive triggers & verify HMAC

When a user triggers your plugin (via iOS ShareSheet, Android, Web, or browser extension), MemoryStore delivers an HTTP POST payload to your webhook with the memory content, user preferences, and dynamic callback endpoints.

Inbound Trigger Request Payload
X-MemoryStore-Signature: sha256=a1b2c3d4e5...

{
  "event": "plugin.triggered",
  "result_id": "7b8e3a21-884c-4e12-a720-d98c2534f590",
  "callback_url": "https://api.memorystore.co.in/api/plugins/results/callback",
  "status_update_url": "https://api.memorystore.co.in/api/plugins/results/status",
  "memory": {
    "id": "mem_01h92k...",
    "title": "AI Coding Architecture Notes",
    "url": "https://www.instagram.com/reel/...",
    "transcript": "Here is the step by step process...",
    "download_url": "https://api.memorystore.co.in/api/plugins/media/mem_01h92k?pid=...&exp=17890123&sig=..."
  },
  "user_config": {
    "language": "en",
    "detailed_mode": true
  }
}

Raw Body HMAC & Immediate 200 OK

Always compute the HMAC-SHA256 signature using the exact raw request bytes before JSON parsing. Acknowledge with an immediate 200 OK response within 15 seconds, then dispatch execution to your async worker. Webhook connections that hang beyond 15 seconds will timeout and fail.

πŸ“Ή Signed 30-Minute Video Token

When processing saved reels or videos, MemoryStore generates a private, signed 30-minute download URL (/api/plugins/media/...). Stream the raw media directly from your backend server during processing. Never expose or embed this ephemeral link into public result cards.

Step 04

Report live progress

While your worker is analyzing or rendering, transmit real-time milestone transitions to {status_update_url}. MemoryStore client apps poll this status every 3 seconds to display an animated progress checklist to the user.

POST {status_update_url}
X-Plugin-Signature: sha256=<hmac of raw body>
Content-Type: application/json

{
  "result_id": "7b8e3a21-884c-4e12-a720-d98c2534f590",
  "milestone_id": "analyze",
  "status_message": "Analyzing video frames & audio transcript...",
  "completed_milestones": [
    {
      "id": "receive",
      "label": "Video received",
      "completed_at": "2026-09-10T12:00:03.120Z"
    }
  ]
}
Specific Status Copy

Informative labels like "Extracting key concepts..." convert 3x better than generic "Processing..." spinners.

Sign Every Request

Outbound status updates must be signed with your auth_secret via X-Plugin-Signature.

Step 05

Return the final result

Upon task completion or unexpected failure, transmit the final payload to {callback_url}. Provide rich structured JSON in result_data alongside an interactive web result view.

POST {callback_url}
X-Plugin-Signature: sha256=<hmac of raw body>
Content-Type: application/json

{
  "result_id": "7b8e3a21-884c-4e12-a720-d98c2534f590",
  "status": "completed",
  "result_url": "https://your-server.com/view/7b8e3a21-884c-4e12-a720-d98c2534f590",
  "result_data": {
    "summary": "Complete step-by-step breakdown with actionable takeaways.",
    "takeaway": "Prioritize async webhooks and raw buffer HMAC validation.",
    "direct_url": "https://cdn.your-server.com/download/final-video.mp4",
    "thumbnail_url": "https://cdn.your-server.com/thumbs/thumb-01.jpg"
  }
}

Native In-App Rendering & Video Attachment

Always supply structured fields in result_data. The native mobile application renders native cards instantly without waiting for external iframes to spin up. Downloader plugins: return direct_url and thumbnail_url to attach the high-resolution media directly to the user’s memory card.

Failure Handling Protocol

If processing fails due to upstream API errors, format limitations, or timeouts, send "status": "failed" along with a clear, user-facing "error_message": "Instagram private post cannot be downloaded". Never leave jobs in an orphaned uncompleted state.

Step 06

Lifecycle logs & Review checklist

To guarantee observability, stream operational telemetry logs to MemoryStore (trigger.received → process.started → process.completed). Batches are capped at 25 events per HTTP request. Never include private user credentials, raw passwords, or un-sanitized PII in log lines.

Launch Readiness Checklist

Ready for Marketplace Review?

Once your validation probes pass, submit your plugin for manual catalog verification. Our engineering team reviews code quality, security posture, and response latency.