API Reference · Control-plane API
Project Lifecycle
List, create, rename, archive, restore, and delete organization projects from one compact lifecycle reference.
Shared access contract
| Control | Required contract |
|---|---|
| Authentication | Bearer access token for an active organization member. |
| Permission | projects:read plus project-read access for list; projects:write plus project-write access for mutations. |
| Project selection | Where supported, pass project_id in Python, { projectId } options in Node.js, or X-Project-ID over HTTPS. |
List Projects
GET/org/projects
200 OK
| Field | Type | Contract |
|---|---|---|
| Request body | none | No body or project ID. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)projects = client.list_projects()
response.json
[{"id":"project_abc123","name":"default-project","is_default":true,"memory_count":120,"archived_at":null}]
- Returns every project visible in the authenticated organization.
| Concern | Contract |
|---|---|
| Scope | Organization resolved from the bearer token. |
| Errors | 401/403 for access failure; 5xx for an unavailable project service. |
Create Project
POST/org/projects
201 Created
| Field | Type | Contract |
|---|---|---|
name | string body | Required non-empty name, up to 200 characters. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)project = client.create_project("Research")
response.json
{"id":"project_research","name":"Research","is_default":false,"archived_at":null}
- Persist the returned project ID, not a locally derived identifier.
| Concern | Contract |
|---|---|
| Scope | Creates a project in the authenticated organization. |
| Errors | 400/422 invalid name; 401/403 access failure; 409 conflicting project state. |
Rename Project
PATCH/org/projects/{project_id}
200 OK
| Field | Type | Contract |
|---|---|---|
project_id | string path | Required project ID. |
name | string body | Required replacement name, up to 200 characters. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)project = client.rename_project("project_research", "Applied Research")
response.json
{"id":"project_research","name":"Applied Research","is_default":false,"archived_at":null}
- Use the returned object as current project state.
| Concern | Contract |
|---|---|
| Scope | Project must belong to the authenticated organization. |
| Errors | 400/422 invalid name; 401/403 access failure; 404 unavailable project; 409 conflict. |
Archive Project
POST/org/projects/{project_id}/archive
200 OK
| Field | Type | Contract |
|---|---|---|
project_id | string path | Required active, non-default project ID. |
| Request body | none | No JSON body. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)project = client.archive_project("project_research")
response.json
{"id":"project_research","name":"Applied Research","archived_at":"2026-08-01T12:00:00Z"}
- Archiving is reversible with unarchive.
| Concern | Contract |
|---|---|
| Scope | Project must belong to the authenticated organization. |
| Errors | 400 default project cannot be archived; 401/403 access failure; 404 unavailable project. |
Unarchive Project
POST/org/projects/{project_id}/unarchive
200 OK
| Field | Type | Contract |
|---|---|---|
project_id | string path | Required archived project ID. |
| Request body | none | No JSON body. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)project = client.unarchive_project("project_research")
response.json
{"id":"project_research","name":"Applied Research","archived_at":null}
- The returned project is active again.
| Concern | Contract |
|---|---|
| Scope | Project must belong to the authenticated organization. |
| Errors | 401/403 access failure; 404 unavailable project; unarchive is idempotent. |
Delete Project
DELETE/org/projects/{project_id}
204 No Content
| Field | Type | Contract |
|---|---|---|
project_id | string path | Required deletable project ID. |
| Request body | none | No JSON body. |
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)client.delete_project("project_research")
Response body: none.
- A successful delete returns no JSON body; reconcile uncertain outcomes before retrying.
| Concern | Contract |
|---|---|
| Scope | Project must belong to the authenticated organization. |
| Errors | 400 default project cannot be deleted; 401/403 access failure; 404 unavailable project. |