Use the Library API
When to use the API
Section titled “When to use the API”The REST API is suitable for applications and scripts that need direct, versioned requests. MCP is usually a better fit for conversational AI clients. Both paths apply the same ownership, review, and publication rules.
Base URL:
https://api.memside.comCreate an API key
Section titled “Create an API key”- Open Settings > Developer & API.
- Select the API-key creation action.
- Choose Read-only for retrieval or Read-write for creator changes.
- Create the key and store the displayed value securely.
The full value is displayed once. API keys must not be placed in source files, public repositories, screenshots, query strings, or Template content.
Send the key in the authorization header:
Authorization: Bearer mem_sk_example_keyLibrary route groups
Section titled “Library route groups”| Method | Path | Use |
|---|---|---|
GET |
/library/templates |
Search public Templates. |
GET |
/library/creator/status |
List owned Templates and workflow results. |
POST |
/library/templates/{template_id}/read |
Read selected content from an owned draft. |
PUT |
/library/templates/{template_id}/draft |
Replace an owned private draft. |
POST |
/library/templates/workflow |
Create, review, publish, unpublish, or republish an owned Template. |
Read-only keys can use retrieval operations. Draft changes and workflow actions require a read-write key.
Search example
Section titled “Search example”The following request searches the public catalog without exposing private drafts:
curl "https://api.memside.com/library/templates?query=weekly%20planning&limit=5" \ -H "Authorization: Bearer mem_sk_example_key"Use category or tag filters when a broad term returns unrelated results. Search responses provide public listing information suitable for presenting a result list before any later action.
Creator status example
Section titled “Creator status example”curl "https://api.memside.com/library/creator/status" \ -H "Authorization: Bearer mem_sk_example_key"Check creator status before a write or publication request. It provides the owned Template state needed to avoid acting on an outdated draft.
Safe draft workflow
Section titled “Safe draft workflow”Draft replacement is designed for complete, intentional updates rather than an unverified partial overwrite. A reliable sequence is:
- read the owned draft and its current revision;
- prepare the complete replacement file set;
- validate file names, content limits, and the required root README;
- send the draft update with the current revision information;
- read the draft again and verify the saved result;
- submit for review in a separate workflow request.
The public API contract documents the required request fields. Avoid copying a response or draft revision from an older run into a later update.
Publication workflow
Section titled “Publication workflow”Creation, review submission, retry, publication, unpublication, and republication are explicit workflow actions. Do not combine draft editing and publication into an assumed single step.
Before publication, confirm:
- the current review state is Ready to publish;
- the selected license is correct;
- all files are intended for public visibility;
- release notes describe meaningful file changes;
- the current draft is the same draft that completed review.
Errors and retries
Section titled “Errors and retries”Common responses include:
| Status | Meaning |
|---|---|
400 |
The request or Template state is invalid. |
401 |
The API key is missing or invalid. |
403 |
The key mode or account does not allow the action. |
404 |
The Template or route was not found. |
409 |
The draft or workflow state changed and must be refreshed. |
429 |
The request limit was reached. Retry after the indicated delay. |
For a conflict, read current creator status and the latest draft before making another write. Do not retry a state-changing request blindly.
Key activity and revocation
Section titled “Key activity and revocation”Open Settings > Developer & API and select Activity beside a key to view recent request actions, results, times, and request references. Memory content is not shown in this activity list.
Revoke a key that is no longer needed or might have been exposed, then update the relevant application with a new key.