MemorySync
API Reference

Archive / Unarchive Project

Toggle a project's archived state. Archiving sets archived_at to the current UTC timestamp; unarchiving clears it. The default project for an organisation cannot be archived. Both endpoints are idempotent — calling archive on an already-archived project (or unarchive on a live one) returns the unchanged record.
POST/org/projects/{project_id}/archive

Authentication

Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.

Path parameters

FieldTypeRequiredDescription
project_idstringrequiredProject id. Must match the active tenant.

Response

Returns 200 OK with the following body.

FieldTypeRequiredDescription
project_idstringoptionalProject id.
tenant_idstringoptionalOwning tenant id.
namestringoptionalDisplay name.
slugstringoptionalURL slug.
descriptionstringoptionalProject description (nullable).
is_defaultbooleanoptionaltrue for the org default project.
archived_atstringoptionalRFC 3339 UTC. null when the project is live.
created_atstringoptionalRFC 3339 UTC.
200.json
{
"project_id": "proj_support_bot",
"tenant_id": "t_acme",
"name": "Customer Support Bot",
"slug": "support-bot",
"description": "Tier-1 customer support assistant.",
"is_default": false,
"archived_at": "2026-05-04T12:31:00Z",
"created_at": "2026-05-04T12:30:11Z"
}

Errors

StatusCodeDescription
400validation_errorBody or query failed schema validation. The error includes the offending field name.
401unauthenticatedMissing or invalid bearer token / API key.
403forbiddenAuthenticated principal lacks the required scope, role, or project access.
404not_foundTarget resource does not exist or is not visible to the calling tenant.
429rate_limitedPer-IP or per-route limit exceeded. Respect the Retry-After header.
500internal_errorUnhandled server error. Quote the request_id when contacting support.

Examples

cURL
curl -X POST https://api.memorysync.io/org/projects/EXAMPLE_ID/archive \
-H "Authorization: Bearer $MEMORYSYNC_KEY"
javascript
import { MemorySync } from 'memorysync'
const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })
const result = await client.request({
method: 'POST',
path: '/org/projects/EXAMPLE_ID/archive',
})
console.log(result)
python
from memorysync import Client
client = Client(api_key=os.environ["MEMORYSYNC_KEY"])
result = client.request(
method="POST",
path="/org/projects/EXAMPLE_ID/archive",
)
print(result)

Behavior & notes

The companion route is POST /org/projects/{project_id}/unarchive with the same response shape. Archiving the default project returns 400 with detail "Cannot archive the default project". Archived projects remain readable through GET /org/projects but are excluded from default project switchers.