Skip to Content
API ReferenceTeam Management API

Team Management

This section documents the endpoints available for managing your personal workspace and team memberships.

Base URL

https://api.multi-upload-tool.com/api/v1

Authentication

All requests require an API Token in the header: x-api-key: YOUR_API_TOKEN

Note: The API Token determines the context.

  • If the token is scoped to a specific team, that team is accessed.
  • If the token is user-scoped, the API defaults to the team owned by the user.

To create api tokens scoped to specific teams, refer to the API Tokens documentation.


Get Current Team

Retrieve details of the active workspace context.

Endpoint

GET /teams

Example Request

curl -X GET "https://api.multi-upload-tool.com/api/v1/teams" \ -H "x-api-key: YOUR_API_TOKEN"

Example Response

{ "success": true, "data": { "id": 1, "name": "My Workspace", "slug": "workspace-123-abc", "role": "OWNER", "joinedAt": "2023-01-01T00:00:00.000Z", "createdAt": "2023-01-01T00:00:00.000Z", "updatedAt": "2023-01-01T00:00:00.000Z" } }

List Team Members

Retrieve a list of all members in the current workspace.

Endpoint

GET /teams/members

Example Request

curl -X GET "https://api.multi-upload-tool.com/api/v1/teams/members" \ -H "x-api-key: YOUR_API_TOKEN"

Example Response

{ "success": true, "data": [ { "userId": 5, "email": "[email protected]", "avatarUrl": "https://...", "role": "OWNER", "joinedAt": "2023-01-01T00:00:00.000Z" }, { "userId": 8, "email": "[email protected]", "avatarUrl": null, "role": "MEMBER", "joinedAt": "2023-02-15T10:00:00.000Z" } ] }

Invite Member

Invite a user to join your workspace by email. Requires OWNER or ADMIN role.

Endpoint

POST /teams/invites

Body Parameters

ParameterTypeRequiredDescription
emailstringNoThe email address of the user to invite.
rolestringYesThe role to assign (MEMBER, ADMIN).

Example Request

curl -X POST "https://api.multi-upload-tool.com/api/v1/teams/invites" \ -H "x-api-key: YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "role": "MEMBER" }'

Example Response

{ "success": true, "data": { "id": 55, "email": "[email protected]", "role": "MEMBER", "expiresAt": "2023-01-12T12:00:00.000Z", "token": "...", "inviteLink": "..." } }

Update Member Role and Status

Update the role or status of a member in your workspace. Requires OWNER role.

Endpoint

PATCH /teams/members/:userId

Path Parameters

ParameterTypeRequiredDescription
userIdnumberYesThe user ID of the member to update.

Body Parameters

ParameterTypeRequiredDescription
rolestringNoThe new role (MEMBER, ADMIN).
isActivebooleanNoActivate or deactivate the member.

Note: At least one parameter (role or isActive) must be provided. When activating a member (isActive: true), the system verifies that the team has not reached its member limit based on the owner’s plan.

Example Request - Update Role

curl -X PATCH "https://api.multi-upload-tool.com/api/v1/teams/members/8" \ -H "x-api-key: YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "role": "ADMIN" }'

Example Request - Deactivate Member

curl -X PATCH "https://api.multi-upload-tool.com/api/v1/teams/members/8" \ -H "x-api-key: YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "isActive": false }'

Example Response

{ "success": true, "data": { "userId": 8, "role": "ADMIN", "isActive": true } }

Remove Member

Remove a user from your workspace. Requires OWNER or ADMIN role.

Endpoint

DELETE /teams/members/:userId

Path Parameters

ParameterTypeRequiredDescription
userIdnumberYesThe user ID of the member to remove.

Example Request

curl -X DELETE "https://api.multi-upload-tool.com/api/v1/teams/members/8" \ -H "x-api-key: YOUR_API_TOKEN"

Example Response

{ "success": true, "message": "Member removed successfully" }