Organizations
intermediateManage organizations, invite members, manage roles, and handle API keys.
Get organization
/v1/organizations/{org_id}Retrieve details for a specific organization.
org_idstringrequiredOrganization ID (path parameter).
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Engineering",
"slug": "acme-eng",
"plan_id": "pro",
"status": "active",
"created_at": "2026-01-15T10:00:00Z",
"member_count": 5,
"stripe_customer_id": "cus_..."
}Update organization
/v1/organizations/{org_id}Update organization name or settings. Requires admin role.
namestring | nullNew organization name.
settingsobject | nullOrganization settings to update.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Engineering (Updated)",
"slug": "acme-eng",
"plan_id": "pro",
"status": "active"
}Delete organization
/v1/organizations/{org_id}Permanently delete an organization and all its data. Requires admin role.
{
"message": "Organization deleted"
}Organization deletion is irreversible and removes all memory data.
List members (shortcut)
/v1/organizations/membersList all members of your organization. Resolves the organization from JWT/API key.
[
{
"id": "member-uuid",
"user_id": "user-uuid",
"email": "[email protected]",
"name": "Alice",
"role": "admin",
"joined_at": "2026-01-15T10:00:00Z",
"last_login_at": "2026-01-20T14:30:00Z",
"avatar_url": null
}
]List members (explicit org)
/v1/organizations/{org_id}/membersList all members of a specific organization.
Invite member (shortcut)
/v1/organizations/invitationsSend an email invitation to join your organization.
emailstringrequiredEmail address to invite.
rolestringDefault: memberRole to assign: admin, member, or owner.
{
"invitation_id": "inv-uuid",
"email": "[email protected]",
"role": "member",
"message": "Invitation sent"
}Invite member (explicit org)
/v1/organizations/{org_id}/members/inviteSend an invitation specifying the organization explicitly.
emailstringrequiredEmail address to invite.
rolestringDefault: memberRole to assign.
Accept invitation
/v1/organizations/invitations/acceptAccept a pending invitation.
tokenstringrequiredThe invitation token from the email link.
{
"message": "Invitation accepted"
}List invitations (shortcut)
/v1/organizations/invitationsList pending invitations for your organization.
[
{
"id": "inv-uuid",
"email": "[email protected]",
"role": "member",
"invited_by": "user-uuid",
"expires_at": "2026-01-22T10:00:00Z",
"created_at": "2026-01-15T10:00:00Z",
"status": "pending"
}
]Update member role (shortcut)
/v1/organizations/members/{member_id}Change a member's role.
member_idstringrequiredMember ID (path parameter).
rolestringrequiredNew role: admin, member, or owner.
Update member role (explicit org)
/v1/organizations/{org_id}/members/{member_id}/roleChange a member's role in a specific organization.
rolestringrequiredNew role.
Remove member (shortcut)
/v1/organizations/members/{member_id}Remove a member from your organization.
Remove member (explicit org)
/v1/organizations/{org_id}/members/{member_id}Remove a member from a specific organization.
{
"message": "Member removed"
}Organization usage
/v1/organizations/{org_id}/usageGet usage breakdown for the organization.
{
"plan_id": "pro",
"patterns": {
"current": 4523,
"limit": 100000,
"percentage": 4.5,
"warning": false
},
"queries_today": {
"current": 274,
"limit": -1,
"percentage": 0,
"warning": false
},
"api_keys": {
"current": 3,
"limit": 20,
"percentage": 15,
"warning": false
},
"members": {
"current": 5,
"limit": 10,
"percentage": 50,
"warning": false
},
"operations_today": {}
}Create API key (explicit org)
/v1/organizations/{org_id}/api-keysCreate a new API key for the organization.
namestringrequiredDescriptive name for the key.
environmentstringDefault: liveKey environment: live or test.
scopesarray | nullPermission scopes. Null for full access.
expires_atstring | nullOptional expiration date (ISO 8601).
{
"id": "key-uuid",
"name": "Production Backend",
"key": "ek_live_a1b2c3d4e5f6...",
"key_prefix": "ek_live_a1b2",
"environment": "live",
"scopes": [
"memory:read",
"memory:write"
],
"created_at": "2026-01-15T10:00:00Z",
"message": "Store this key securely. It will not be shown again."
}The full API key value is only shown once in this response. Store it securely immediately.
List API keys (explicit org)
/v1/organizations/{org_id}/api-keysList all API keys for the organization. Values are masked.
[
{
"id": "key-uuid",
"name": "Production Backend",
"key_prefix": "ek_live_a1b2",
"environment": "live",
"scopes": [
"memory:read",
"memory:write"
],
"last_used_at": "2026-01-20T14:30:00Z",
"expires_at": null,
"created_at": "2026-01-15T10:00:00Z"
}
]Update API key
/v1/organizations/{org_id}/api-keys/{key_id}Update an API key's name, scopes, or expiration.
namestring | nullNew name.
scopesarray | nullNew scopes.
expires_atstring | nullNew expiration date.
Revoke API key
/v1/organizations/{org_id}/api-keys/{key_id}Immediately revoke an API key.
{
"message": "API key revoked"
}Revoking is immediate. All requests using this key will receive 401 errors.
Next steps
- Billing — Plan management and invoices
- Members & Roles Guide — Role-based access
- API Keys Guide — Key management best practices