WorkOS PHP SDK

CreateUserInviteOptions
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$email  : string
The email address of the recipient.
$expiresInDays  : int|null
How many days the invitations will be valid for. Must be between 1 and 30 days. Defaults to 7 days if not specified.
$inviterUserId  : string|null
The ID of the [user](https://workos.com/docs/reference/authkit/user) who invites the recipient. The invitation email will mention the name of this user.
$locale  : CreateUserInviteOptionsLocale|null
The locale to use when rendering the invitation email. See [supported locales](https://workos.com/docs/authkit/hosted-ui/localization).
$organizationId  : string|null
The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
$roleSlug  : string|null
The [role](https://workos.com/docs/authkit/roles) that the recipient will receive when they join the organization in the invitation.

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string|int, mixed>
toArray()  : array<string|int, mixed>

Properties

$expiresInDays

How many days the invitations will be valid for. Must be between 1 and 30 days. Defaults to 7 days if not specified.

public int|null $expiresInDays = null

$inviterUserId

The ID of the [user](https://workos.com/docs/reference/authkit/user) who invites the recipient. The invitation email will mention the name of this user.

public string|null $inviterUserId = null

$organizationId

The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.

public string|null $organizationId = null

$roleSlug

The [role](https://workos.com/docs/authkit/roles) that the recipient will receive when they join the organization in the invitation.

public string|null $roleSlug = null

Methods

__construct()

public __construct(string $email[, string|null $organizationId = null ][, string|null $roleSlug = null ][, int|null $expiresInDays = null ][, string|null $inviterUserId = null ][, CreateUserInviteOptionsLocale|null $locale = null ]) : mixed
Parameters
$email : string
$organizationId : string|null = null
$roleSlug : string|null = null
$expiresInDays : int|null = null
$inviterUserId : string|null = null
$locale : CreateUserInviteOptionsLocale|null = null

fromArray()

public static fromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results