WorkOS PHP SDK

UserInvite
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$acceptedAt  : DateTimeImmutable|null
The timestamp when the invitation was accepted, or null if not yet accepted.
$acceptedUserId  : string|null
The ID of the user who accepted the invitation, once accepted.
$acceptInvitationUrl  : string
The URL where the recipient can accept the invitation.
$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$email  : string
The email address of the recipient.
$expiresAt  : DateTimeImmutable
The timestamp when the invitation expires.
$id  : string
The unique ID of the invitation.
$inviterUserId  : string|null
The ID of the user who invited the recipient, if provided.
$object  : string
Distinguishes the invitation object.
$organizationId  : string|null
The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
$revokedAt  : DateTimeImmutable|null
The timestamp when the invitation was revoked, or null if not revoked.
$roleSlug  : string|null
Slug of the role the invitee will be assigned on acceptance. Reflects the current role on the invitee's organization membership. null when the invitation has no associated organization.
$state  : UserInviteState
The state of the invitation.
$token  : string
The token used to accept the invitation.
$updatedAt  : DateTimeImmutable
An ISO 8601 timestamp.

Methods

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

Properties

$acceptedAt

The timestamp when the invitation was accepted, or null if not yet accepted.

public DateTimeImmutable|null $acceptedAt

$acceptedUserId

The ID of the user who accepted the invitation, once accepted.

public string|null $acceptedUserId

$acceptInvitationUrl

The URL where the recipient can accept the invitation.

public string $acceptInvitationUrl

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$email

The email address of the recipient.

public string $email

$expiresAt

The timestamp when the invitation expires.

public DateTimeImmutable $expiresAt

$id

The unique ID of the invitation.

public string $id

$inviterUserId

The ID of the user who invited the recipient, if provided.

public string|null $inviterUserId

$object

Distinguishes the invitation object.

public string $object

$organizationId

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

public string|null $organizationId

$revokedAt

The timestamp when the invitation was revoked, or null if not revoked.

public DateTimeImmutable|null $revokedAt

$roleSlug

Slug of the role the invitee will be assigned on acceptance. Reflects the current role on the invitee's organization membership. null when the invitation has no associated organization.

public string|null $roleSlug

$token

The token used to accept the invitation.

public string $token

$updatedAt

An ISO 8601 timestamp.

public DateTimeImmutable $updatedAt

Methods

__construct()

public __construct(string $object, string $id, string $email, UserInviteState $state, DateTimeImmutable|null $acceptedAt, DateTimeImmutable|null $revokedAt, DateTimeImmutable $expiresAt, string|null $organizationId, string|null $inviterUserId, string|null $acceptedUserId, string|null $roleSlug, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, string $token, string $acceptInvitationUrl) : mixed
Parameters
$object : string
$id : string
$email : string
$state : UserInviteState
$acceptedAt : DateTimeImmutable|null
$revokedAt : DateTimeImmutable|null
$expiresAt : DateTimeImmutable
$organizationId : string|null
$inviterUserId : string|null
$acceptedUserId : string|null
$roleSlug : string|null
$createdAt : DateTimeImmutable
$updatedAt : DateTimeImmutable
$token : string
$acceptInvitationUrl : string

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>

toArray()

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

        
On this page

Search results