Organizations
intermediateCreate, manage, and configure organizations. Invite members, manage roles, and handle API keys.
Create organization
/v1/organizationsCreate a new organization. The authenticated user becomes the first admin.
namestringrequiredOrganization display name. Max 100 characters.
slugstringrequiredURL-friendly identifier. Lowercase, alphanumeric, hyphens only. Must be unique.
{
"id": "org_abc123",
"name": "Acme Engineering",
"slug": "acme-eng",
"your_role": "admin",
"member_count": 1,
"plan": "free",
"created_at": "2026-01-15T10:00:00Z"
}import os
from engramma_cloud import EngrammaClient
client = EngrammaClient(api_key=os.environ["ENGRAMMA_API_KEY"])
org = client.organizations.create(
name="Acme Engineering",
slug="acme-eng"
)
print(f"Created: {org.id} ({org.slug})")List organizations
/v1/organizationsList all organizations you belong to.
{
"data": [
{
"id": "org_abc123",
"name": "Acme Engineering",
"slug": "acme-eng",
"your_role": "admin",
"member_count": 5,
"plan": "professional"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 1,
"total_pages": 1
}
}Get organization
/v1/organizations/{org_id}Retrieve details for a specific organization.
org_idstringrequiredOrganization ID (path parameter).
{
"id": "org_abc123",
"name": "Acme Engineering",
"slug": "acme-eng",
"your_role": "admin",
"member_count": 5,
"plan": "professional",
"settings": {
"default_importance": 0.5,
"auto_consolidation": true
},
"created_at": "2026-01-15T10:00:00Z"
}Update organization
/v1/organizations/{org_id}Update organization name or settings. Requires admin role.
namestringNew organization name.
settingsobjectOrganization settings to update.
{
"id": "org_abc123",
"name": "Acme Engineering (Updated)",
"updated_at": "2026-01-16T09:00:00Z"
}Delete organization
/v1/organizations/{org_id}Permanently delete an organization and all its data. Requires admin role. This is irreversible.
confirmbooleanrequiredMust be true to proceed. Safety check.
{
"deleted": true,
"id": "org_abc123",
"data_retention_days": 30
}Organization deletion schedules all data for permanent erasure after 30 days. You can reactivate within this period by contacting support.
Invite member
/v1/organizations/{org_id}/invitationsSend an email invitation to join the organization. Requires admin role.
emailstringrequiredEmail address to invite.
rolestringDefault: memberRole to assign: admin or member.
{
"id": "inv_abc123",
"email": "[email protected]",
"role": "member",
"status": "pending",
"expires_at": "2026-01-22T10:00:00Z",
"invited_by": "usr_xyz789"
}List members
/v1/organizations/{org_id}/membersList all members and pending invitations for the organization.
{
"data": [
{
"id": "mem_xyz789",
"email": "[email protected]",
"name": "Alice",
"role": "admin",
"status": "active",
"joined_at": "2026-01-15T10:00:00Z"
},
{
"id": "mem_def456",
"email": "[email protected]",
"name": "Bob",
"role": "member",
"status": "active",
"joined_at": "2026-01-16T09:00:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 2,
"total_pages": 1
}
}Update member role
/v1/organizations/{org_id}/members/{member_id}Change a member's role. Requires admin role.
rolestringrequiredNew role: admin or member.
{
"id": "mem_def456",
"role": "admin",
"updated_at": "2026-01-17T10:00:00Z"
}Remove member
/v1/organizations/{org_id}/members/{member_id}Remove a member from the organization. Their personal data is not affected.
{
"removed": true,
"member_id": "mem_def456",
"keys_revoked": 1
}Create API key
/v1/organizations/{org_id}/api-keysCreate a new API key for the organization. Requires admin role.
namestringrequiredDescriptive name for the key.
scopesarrayrequiredArray of permission scopes. See available scopes.
environmentstringDefault: productionKey environment: production or development.
expires_in_daysintegerOptional expiration in days from creation.
{
"id": "key_abc123",
"key": "nx_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"name": "Production Backend",
"scopes": [
"memory:read",
"memory:write",
"engine:consolidate"
],
"environment": "production",
"created_at": "2026-01-15T10:00:00Z"
}The full API key value is only shown once in this response. Store it securely immediately.
List API keys
/v1/organizations/{org_id}/api-keysList all API keys for the organization. Key values are masked.
{
"data": [
{
"id": "key_abc123",
"name": "Production Backend",
"prefix": "nx_live_a1b2",
"suffix": "o5p6",
"scopes": [
"memory:read",
"memory:write",
"engine:consolidate"
],
"environment": "production",
"last_used_at": "2026-01-20T14:30:00Z",
"created_at": "2026-01-15T10:00:00Z"
}
]
}Rotate API key
/v1/organizations/{org_id}/api-keys/{key_id}/rotateRotate an API key. Creates a new key and gives the old one a grace period before expiry.
grace_period_hoursintegerDefault: 24Hours the old key remains valid after rotation.
{
"new_key": "nx_live_z9y8x7w6v5u4t3s2r1q0p9o8n7m6l5k4",
"old_key_expires_at": "2026-01-16T10:00:00Z",
"grace_period_hours": 24
}Revoke API key
/v1/organizations/{org_id}/api-keys/{key_id}Immediately revoke an API key. No grace period.
{
"revoked": true,
"key_id": "key_abc123",
"revoked_at": "2026-01-15T10:00:00Z"
}Revoking is immediate. All requests using this key will receive 401 errors instantly.
Next steps
- Billing — Plan management and invoices
- Members & Roles Guide — Role-based access patterns
- API Keys Guide — Key management best practices