feat: add create invite link endpoint (#24073)

* feat: add create invite link endpoint

* tests: add e2e test

* chore: feeback

* chore: feeback

* chore; udate summary

* chore; udate summary

* chore: deelte swagger
This commit is contained in:
Udit Takkar
2025-09-26 10:24:44 +00:00
committed by GitHub
parent 3054ad33b2
commit ae6b1d402a
9 changed files with 358 additions and 38 deletions
+93
View File
@@ -4421,6 +4421,70 @@
"tags": ["Orgs / Teams / Event Types / Private Links"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/invite": {
"post": {
"operationId": "OrganizationsTeamsInviteController_createInvite",
"summary": "Create team invite link",
"parameters": [
{
"name": "Authorization",
"in": "header",
"description": "For non-platform customers - value must be `Bearer <token>` where `<token>` is api key prefixed with cal_",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "x-cal-secret-key",
"in": "header",
"description": "For platform customers - OAuth client secret key",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "x-cal-client-id",
"in": "header",
"description": "For platform customers - OAuth client ID",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "orgId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "teamId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateInviteOutputDto"
}
}
}
}
},
"tags": ["Orgs / Teams / Invite"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/memberships": {
"get": {
"operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships",
@@ -19915,6 +19979,35 @@
},
"required": ["userId", "role"]
},
"InviteDataDto": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Unique invitation token for this team. Share this token with prospective members to allow them to join the team/organization.",
"example": "f6a5c8b1d2e34c7f90a1b2c3d4e5f6a5b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2"
},
"inviteLink": {
"type": "string",
"description": "Complete invitation URL that can be shared with prospective members. Opens the signup page with the token and redirects to getting started after signup.",
"example": "http://app.cal.com/signup?token=f6a5c8b1d2e34c7f90a1b2c3d4e5f6a5b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2&callbackUrl=/getting-started"
}
},
"required": ["token", "inviteLink"]
},
"CreateInviteOutputDto": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "success"
},
"data": {
"$ref": "#/components/schemas/InviteDataDto"
}
},
"required": ["status", "data"]
},
"Attribute": {
"type": "object",
"properties": {