Public docs

App API — Team

Manage workspace members and roles.

Phase 1 shell: this docs surface is wired to the existing backend and repo documentation, and will be expanded as the private dashboard comes online.

Roles

  • owner — full access, cannot be removed or have role changed
  • admin — can manage members and settings
  • member — standard access

---

GET /team/{workspace_id}

List all members of a workspace, sorted by role then join date.

Response:

{
  "success": true,
  "members": [
    {
      "membership_id": 1,
      "workspace_id":  1,
      "user_id":       2,
      "email":         "alex@company.com",
      "full_name":     "Alex Johnson",
      "role":          "member",
      "status":        "active",
      "created_at":    "2025-01-10T09:00:00Z"
    }
  ]
}

---

POST /team/invite

Add a user to the workspace. The user must already have an account.

Request body

{
  "workspace_id": 1,
  "email":        "colleague@company.com",
  "role":         "member" | "admin" | "owner"
}

Errors

  • 404 — no account found for that email
  • 400 — user is already on this workspace

---

PUT /team/{member_id}

Update a member's role.

Request body

{
  "workspace_id": 1,
  "role":         "admin" | "member"
}

Owner role cannot be changed.

---

DELETE /team/remove

Remove a member from the workspace. Owners cannot be removed.

Request body

{
  "workspace_id": 1,
  "user_id":      2
}
Invite a team member
curl -X POST https://api.opsentry.ai/team/invite \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 1,
"email": "colleague@company.com",
"role": "member"
}'