Create
client.teams.members.create(stringteamID, MemberCreateParams { email, projectIds, role } body, RequestOptionsoptions?): MemberCreateResponse { team }
POST/teams/{teamId}/members
Create
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const member = await client.teams.members.create('teamId', { email: 'email' });
console.log(member.team);{
"team": {
"id": "id",
"context": {
"invitationsCount": 0,
"keysCount": 0,
"userRole": "admin",
"usersCount": 0
},
"createdAt": "createdAt",
"name": "name",
"plan": "cu-basic",
"projects": [
{
"id": "id",
"createdAt": "createdAt",
"name": "name",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"disableIpDetection": true,
"qualityGateAutoDetect": true
}
],
"type": "personal",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"byok": {
"markupMultiplier": 0,
"updatedAt": "updatedAt",
"updatedBy": "updatedBy"
},
"defaultUserMaxConsumption": 0,
"ipDetectionEnforcement": "active-fail-closed",
"qualityGateAutoDetect": true
}
}Returns Examples
{
"team": {
"id": "id",
"context": {
"invitationsCount": 0,
"keysCount": 0,
"userRole": "admin",
"usersCount": 0
},
"createdAt": "createdAt",
"name": "name",
"plan": "cu-basic",
"projects": [
{
"id": "id",
"createdAt": "createdAt",
"name": "name",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"disableIpDetection": true,
"qualityGateAutoDetect": true
}
],
"type": "personal",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"byok": {
"markupMultiplier": 0,
"updatedAt": "updatedAt",
"updatedBy": "updatedBy"
},
"defaultUserMaxConsumption": 0,
"ipDetectionEnforcement": "active-fail-closed",
"qualityGateAutoDetect": true
}
}