WorkOS PHP SDK

PlatformTeams
in package

Table of Contents

Properties

$client  : HttpClient

Methods

__construct()  : mixed
createTeam()  : Team
Create a team
getTeam()  : Team
Get a team

Properties

Methods

createTeam()

Create a team

public createTeam(string $adminEmail, string $name[, RequestOptions|null $options = null ]) : Team

Creates a team along with its default project, a staging environment, and a production environment. An admin invitation is sent to admin_email, onboarding is marked complete with AuthKit enabled, and the calling platform is authorized to act inside the team.

Parameters
$adminEmail : string

The email address of the person who will administer the team. An invitation is sent to this address.

$name : string

Name of the team.

$options : RequestOptions|null = null
Tags
throws
WorkOSException
Return values
Team

getTeam()

Get a team

public getTeam(string $teamId[, RequestOptions|null $options = null ]) : Team

Returns a team, and doubles as a health check on the platform's access to it. Read production_state before attempting to create a production environment.

Parameters
$teamId : string

The ID of the team.

$options : RequestOptions|null = null
Tags
throws
WorkOSException
Return values
Team
On this page

Search results