1. CORE
PRAEMUNIO API
  • Praemunio API - v1
  • AUTHENTICATION
    • API KEY Authentification
      POST
  • CORE
    • Teams
      • Members
        • Get Team Members
        • Add Team Member
        • Add Team Member Copy
      • Get Account Teams
      • Create Team
      • Get Team Details
      • Update Team Data
      • Delete Team
      • Get Team Data
      • Get Team workspaces
      • Get Team logs
    • Workspaces
      • Get Account Drive
      • Get Workspaces By Team
      • Create New Workspace
      • Get Workspace Details
      • Get Team Workspaces
      • Update workspace
      • Delete workspace
    • Folders
      • Get Folders
      • Create Folder
      • Get Folder Details
      • Get Folder Content
      • Update Folder
      • Delete Folder
      • Move Folder
    • Documents
      • Get Document Info
      • Get Document By Workspace
      • Update Document
      • Delete Document
      • Archive Document
      • Restore Document
      • Move Document
      • Stream Document
      • Stream Document Copy
      • Upload Document
  1. CORE

Teams

Core API — Teams Module#

Praemunio API • Version 1 • Developer Documentation
The Teams module enables organizations to manage collaborative units, control user access via granular permission templates, manage pending invitations, and monitor audit trails.
KeyValue
Base URLhttps://api.praemunio.org/api/v1
FormatJSON (Content-Type: application/json)
AuthenticationBearer Token (Authorization: Bearer <access_token>)
Required Scopesteams:read, teams:write, teams:delete

Table of contents#

1.
Overview & Permission Model
2.
Team Management Endpoints
POST /teams/create
GET /teams
GET /teams/info
PUT /teams/update
DELETE /teams/delete
3.
Member & Invitation Endpoints
POST /teams/members/add
GET /teams/members/invitations
GET /teams/members
DELETE /teams/members/remove
4.
Permission Templates & Access Control
GET /teams/permissions
GET /teams/permissions/templates
POST /teams/permissions/templates/create
PUT /teams/permissions/templates/update
DELETE /teams/permissions/templates/delete
5.
Dashboard & Audit Logs
GET /teams/dashboard
GET /teams/logs
6.
Client Integration Example
7.
Error Handling Reference

1. Overview & Permission Model#

A Team is the primary boundary for access control and collaborative resource sharing in Praemunio. Teams support two operational types (individual or legal_entity) and support custom permission templates alongside fine-grained workspace and folder assignments.

2. Team Management Endpoints#

POST /teams/create#

Creates a new team under the caller's account.
Scope Required: teams:write
HTTP Code: 201 Created

Request Body#

{
  "name": "Finance & Legal Operations",
  "description": "Cross-functional team for contract anchoring and compliance",
  "type": "legal_entity"
}
FieldTypeRequiredValidation / Description
namestringYesMin 2 characters
descriptionstringNoOptional team summary
typestringYesAllowed values: 'individual', 'legal_entity'

Response (201 Created)#

{
  "success": true,
  "message": "Team created successfully",
  "result": {
    "id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
    "name": "Finance & Legal Operations",
    "description": "Cross-functional team for contract anchoring and compliance",
    "type": "legal_entity",
    "ownerAccountId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "createdAt": "2026-09-30T10:15:00.000Z",
    "updatedAt": "2026-09-30T10:15:00.000Z"
  },
  "errors": null,
  "except": null
}

GET /teams#

Retrieves all teams owned by or accessible to the caller's account.
Scope Required: teams:read
HTTP Code: 200 OK

Response (200 OK)#

{
  "success": true,
  "message": "Teams retrieved successfully",
  "result": [
    {
      "id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
      "name": "Finance & Legal Operations",
      "type": "legal_entity",
      "memberCount": 5,
      "workspaceCount": 2,
      "createdAt": "2026-09-30T10:15:00.000Z"
    }
  ],
  "errors": null,
  "except": null
}

GET /teams/info#

Fetches full detailed metadata for a specific team.
Scope Required: teams:read
HTTP Code: 200 OK
Query Parameter: team_id (UUIDv4 string, required)

cURL Example#

Response (200 OK)#

{
  "success": true,
  "message": "Team details retrieved successfully",
  "result": {
    "id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
    "name": "Finance & Legal Operations",
    "description": "Cross-functional team for contract anchoring",
    "type": "legal_entity",
    "ownerAccountId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "workspaces": [
      {
        "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
        "name": "Legal Workstation"
      }
    ],
    "members": 5,
    "createdAt": "2026-09-30T10:15:00.000Z"
  },
  "errors": null,
  "except": null
}

PUT /teams/update#

Updates team information.
Scope Required: teams:write
HTTP Code: 200 OK

Request Body#

{
  "id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
  "name": "Global Legal Operations",
  "description": "Updated global legal team"
}

Response (200 OK)#

{
  "success": true,
  "message": "Team updated successfully",
  "result": {
    "id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
    "name": "Global Legal Operations",
    "description": "Updated global legal team",
    "type": "legal_entity",
    "updatedAt": "2026-09-30T10:30:00.000Z"
  },
  "errors": null,
  "except": null
}

DELETE /teams/delete#

Deletes a team and revokes associated permissions.
Scope Required: teams:delete
HTTP Code: 204 No Content

Request Body#

{
  "team_id": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d"
}

3. Member & Invitation Endpoints#

POST /teams/members/add#

Invites a new member to a team with optional custom permission template and granular folder/workspace assignment.
Scope Required: teams:write
HTTP Code: 201 Created

Request Body#

{
  "teamId": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
  "email": "auditor@external-audit.com",
  "message": "Welcome to the Praemunio legal team",
  "permissionTemplateId": 3,
  "accessConfig": {
    "assignments": [
      {
        "workspace_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
        "folders": ["c3d4e5f6-a7b8-9012-cdef-345678901234"]
      }
    ]
  }
}

GET /teams/members/invitations#

Lists invitations issued for a team with status filtering and pagination.
Scope Required: teams:read
HTTP Code: 200 OK
Query Parameters: team_id (required UUID), page (default 1), limit (default 20), status (optional: 'pending', 'accepted', 'cancelled')

Response (200 OK)#

{
  "success": true,
  "message": "Invitations retrieved successfully",
  "result": {
    "data": [
      {
        "id": "f5a6b7c8-d9e0-1234-5678-90abcdef1234",
        "teamId": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
        "email": "auditor@external-audit.com",
        "status": "pending",
        "createdAt": "2026-09-30T10:45:00.000Z"
      }
    ],
    "meta": {
      "total": 1,
      "per_page": 20,
      "current_page": 1,
      "last_page": 1,
      "first_page": 1,
      "total_pages": 1,
      "has_next": false,
      "has_prev": false,
      "from": 1,
      "to": 1
    }
  },
  "errors": null,
  "except": null
}

GET /teams/members#

Lists active members of a team.
Scope Required: teams:read
HTTP Code: 200 OK
Query Parameters: team_id (required UUID), page (default 1), limit (default 20)

DELETE /teams/members/remove#

Removes a member from a team.
Scope Required: teams:write
HTTP Code: 204 No Content

Request Body#

{
  "teamId": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
  "memberAccountId": "d4e5f6a7-b8c9-0123-def0-123456789012",
  "reason": "Project assignment concluded"
}

4. Permission Templates & Access Control#

GET /teams/permissions#

Retrieves all permission actions and categories supported by Praemunio.
Scope Required: teams:read

GET /teams/permissions/templates#

Lists existing custom permission templates available for the account.
Scope Required: teams:read

POST /teams/permissions/templates/create#

Creates a reusable permission template.
Scope Required: teams:write
HTTP Code: 201 Created

Request Body#

{
  "name": "Audit Only Template",
  "description": "Read-only access to documents and audit logs",
  "permissions": [
    {
      "category": "documents",
      "actions": ["read", "stream"]
    },
    {
      "category": "teams",
      "actions": ["read_logs"]
    }
  ]
}

5. Dashboard & Audit Logs#

GET /teams/dashboard#

Retrieves account-level dashboard statistics (active team count, member counts, storage metrics).
Scope Required: teams:read

GET /teams/logs#

Retrieves audit logs for team activities (member invitations, permission updates, team modifications).
Scope Required: teams:read
Query Parameters: team_id (required UUID), page (default 1), limit (default 50)

6. Client Integration Example#


7. Error Handling Reference#

HTTP StatusCodeCauseAction
400 Bad Requestinvalid_requestInvalid UUID or missing required fieldsVerify request schema
403 Forbiddeninsufficient_scopesMissing teams:read or teams:write scopeUpdate API Key scopes
404 Not Foundteam_not_foundSpecified team_id does not existVerify Team UUID
409 Conflictduplicate_memberMember already invited or present in teamCheck active invitations

Support#

Questions? Visit docs.praemunio.io.
Modified at 2026-09-30 10:28:26
Previous
CORE
Next
Get Team Members
Built with