Teams
GET
Responses
200
Team members retrieved successfully
application/json
403
Access denied
application/json
get
GET /teams/members HTTP/1.1
Host:
Accept: */*
[
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"phone": "123-456-7890",
"role": "Member",
"isActive": true,
"invitationAccepted": true
}
]
Query parameters
offsetnumberOptionalExample:
The number of records to skip.
0
limitnumberOptionalExample:
The maximum number of records to return.
10
globalSearchstringOptionalExample:
The global search term to use for finding teams.
Team Name
Responses
200
Teams retrieved successfully
application/json
500
Internal server error
application/json
get
GET /teams/all HTTP/1.1
Host:
Accept: */*
[
{
"id": "team_id",
"name": "Team Name",
"usersLimit": 5,
"membersCount": 10,
"owner": {
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "owner@example.com"
},
"subscription": "Basic",
"isImpersonationEnabled": true
}
]
POST
Body
teamNamestringOptionalExample:
Team Name
Responses
201
Team created successfully
application/json
400
Team already exists
application/json
500
Internal server error
application/json
post
POST /teams HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"teamName": "Team Name"
}
{
"id": "team_id",
"name": "Team Name",
"usersLimit": 5
}
Body
emailstringRequiredExample:
user@example.com
firstNamestring | nullableRequiredExample:
John
lastNamestring | nullableRequiredExample:
Doe
phonestring | nullableRequiredExample:
123-456-7890
rolestring · enumRequiredExample:
Viewer
Possible values: teamIdstring | nullableRequiredExample:
team_id
Responses
200
Invitation created successfully
application/json
ResponseanyExample:
{"message":"Invitation email sent","description":"Wait for the invited person to finish their registration."}
400
Team is full
application/json
403
Access denied
application/json
500
Internal server error
application/json
post
POST /teams/invitation HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "123-456-7890",
"role": "Viewer",
"teamId": "team_id"
}
{
"message": "Invitation email sent",
"description": "Wait for the invited person to finish their registration."
}
PUT
Leaves a team by its ID. Sends an email to the new owner if provided. Also applies new owners subscription plan to this team.
put
Path parameters
idstringRequiredExample:
The ID of the team to leave.
team_id
Body
newOwnerIdnumberOptionalExample:
1
Responses
200
Left the team successfully
application/json
ResponseanyExample:
{"message":"Left the team successfully","description":"You have left the team successfully."}
400
Team not found
application/json
500
Internal server error
application/json
put
PUT /teams/leave-team/{id} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"newOwnerId": 1
}
{
"message": "Left the team successfully",
"description": "You have left the team successfully."
}
Path parameters
idstringRequiredExample:
The ID of the team to accept the invitation for.
team_id
Responses
200
Invitation accepted successfully
application/json
ResponseanyExample:
{"message":"Invitation accepted successfully","description":"You have accepted the invitation successfully."}
400
Membership not found
application/json
500
Internal server error
application/json
put
PUT /teams/accept-invitation/{id} HTTP/1.1
Host:
Accept: */*
{
"message": "Invitation accepted successfully",
"description": "You have accepted the invitation successfully."
}
Path parameters
idstringRequiredExample:
The ID of the team to decline the invitation for.
team_id
Responses
200
Invitation declined successfully
application/json
ResponseanyExample:
{"message":"Invitation declined successfully","description":"You have declined the invitation successfully."}
400
Membership not found
application/json
500
Internal server error
application/json
put
PUT /teams/decline-invitation/{id} HTTP/1.1
Host:
Accept: */*
{
"message": "Invitation declined successfully",
"description": "You have declined the invitation successfully."
}
DELETE
Path parameters
idnumberRequiredExample:
The ID of the user to cancel the invitation for.
1
Body
membershipIdnumberOptionalExample:
1
Responses
200
Invitation cancelled successfully
application/json
ResponseanyExample:
{"message":"Invitation cancelled successfully","description":"The invitation has been cancelled successfully."}
400
User not found
application/json
500
Internal server error
application/json
delete
DELETE /teams/invitation/{id} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"membershipId": 1
}
{
"message": "Invitation cancelled successfully",
"description": "The invitation has been cancelled successfully."
}
Path parameters
idstringRequiredExample:
The ID of the team to delete.
team_id
Responses
200
Team deleted successfully
application/json
ResponseanyExample:
{"message":"Team deleted successfully","description":"The team has been deleted successfully."}
400
Team not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
delete
DELETE /teams/{id} HTTP/1.1
Host:
Accept: */*
{
"message": "Team deleted successfully",
"description": "The team has been deleted successfully."
}
Last updated