Onboarding
Manage company creation, joining, and team membership.
Create Company
POST
/api/companyCreate a new company. User becomes the owner.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Company name |
{
"company": {
"id": "...",
"name": "Acme Corp",
"joinCode": "ABC123",
"owner": "userId",
"status": "active"
}
}
Join Company
POST
/api/company/joinRequest to join a company using join code.
| Field | Type | Required | Description |
|---|---|---|---|
joinCode | string | Required | Company join code |
{
"success": true
}
Quit Company
POST
/api/company/quitRequest to leave current company.
| Field | Type | Required | Description |
|---|---|---|---|
replacementUserId | string | Optional | User to transfer ownership (if owner) |
{
"success": true
}
Create Team
POST
/api/teamCreate a new team within the company.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Team name |
joinCode | string | Optional | Custom join code (auto-generated if not provided) |
{
"team": {
"id": "...",
"name": "Engineering",
"joinCode": "ENG123",
"company": "companyId"
}
}
Join Team
POST
/api/team/joinRequest to join a team using join code.
| Field | Type | Required | Description |
|---|---|---|---|
joinCode | string | Required | Team join code |
{
"success": true
}
Quit Team
POST
/api/team/quitLeave current team.
{
"success": true
}
Kick Member
POST
/api/team/kickRemove a member from the team (manager only).
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Required | User ID to remove |
{
"success": true
}
Delete Team
POST
/api/team/deleteDelete a team (owner/admin only).
| Field | Type | Required | Description |
|---|---|---|---|
teamId | string | Required | Team ID to delete |
{
"success": true
}
Join Preview
GET
/api/join/previewPreview company/team info before joining.
| Query Param | Type | Required | Description |
|---|---|---|---|
code | string | Required | Join code |
{
"company": { "name": "Acme Corp", ... },
"team": { "name": "Engineering", ... }
}
Cancel Join Request
POST
/api/join/cancelCancel a pending join request.
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string | Required | Request ID to cancel |
{
"success": true
}
Cancel Quit Request
POST
/api/quit/cancelCancel a pending quit request.
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string | Required | Request ID to cancel |
reason | string | Optional | Cancellation reason |
{
"success": true
}