Teams API Reference
Overview
Team management endpoints for MemoryGraph Cloud enable collaborative AI development with shared memory graphs.
Authentication
All endpoints require a valid API key with appropriate permissions. Include your API key in the Authorization header:
Authorization: Bearer <your-api-key> Base URL
https://api.memorygraph.dev Complete API Documentation: For the full Teams API reference with all endpoints, request/response schemas, and examples, see docs/api/teams.md in the repository.
Quick Reference
Team Management
POST /teams- Create teamGET /teams/me- Get current user's teamGET /teams/{team_id}- Get team by IDPUT /teams/{team_id}- Update team (owner only)DELETE /teams/{team_id}- Delete team (owner only)
Invitations
POST /teams/{team_id}/invitations- Send invitation (admin+)GET /teams/{team_id}/invitations- List invitations (admin+)DELETE /teams/{team_id}/invitations/{invitation_id}- Revoke invitation (admin+)POST /teams/invitations/{token}/accept- Accept invitationPOST /teams/invitations/{token}/decline- Decline invitation
Member Management
GET /teams/{team_id}/members- List membersPUT /teams/{team_id}/members/{user_id}- Update member role (admin+)DELETE /teams/{team_id}/members/{user_id}- Remove member (admin+)POST /teams/{team_id}/leave- Leave teamPOST /teams/{team_id}/transfer- Transfer ownership (owner only)
Billing
POST /billing/team-checkout- Create team checkout sessionGET /billing/team-subscription- Get team subscriptionPOST /billing/team-upgrade- Upgrade team size (owner only)POST /billing/team-cancel- Cancel subscription (owner only)
Team Roles
| Role | Permissions |
|---|---|
| Owner | Full control: team settings, billing, all member management, delete team |
| Admin | Invite members, manage member roles, remove members (except owner) |
| Member | Access team graph, view team info, leave team |
Example: Create Team
POST /teams
{
"name": "Engineering Team",
"max_members": 10
}
Response: 201 Created
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Engineering Team",
"owner_id": "987fcdeb-51a2-43f7-9abc-123456789012",
"max_members": 10,
"member_count": 1,
"created_at": "2025-01-01T00:00:00Z"
} Example: Send Invitation
POST /teams/{team_id}/invitations
{
"email": "user@example.com",
"role": "member"
}
Response: 201 Created
{
"id": "789abc12-3def-4567-89ab-cdef01234567",
"email": "user@example.com",
"role": "member",
"status": "pending",
"expires_at": "2025-01-08T00:00:00Z",
"created_at": "2025-01-01T00:00:00Z"
} Error Codes
| Code | Description |
|---|---|
| 400 | Bad request (validation error) |
| 401 | Unauthorized (invalid/missing API key) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Team/member not found |
| 409 | Conflict (e.g., duplicate invitation) |
| 500 | Internal server error |
| 502 | Bad gateway (payment provider error) |
Related Documentation
- Team Collaboration Guide - User-facing documentation
- Memory API Reference - Core memory management endpoints
- Full Teams API Reference - Complete technical specification