Overview
The Invitations API allows you to invite users to join organizations via email. Invitations are sent through WorkOS and can be managed (resent, revoked, or deleted) by authorized users. All invitation operations require authentication and appropriate organization permissions.Invitation lifecycle
Invitations have the following states:pending- Invitation sent, awaiting acceptanceaccepted- User has accepted the invitationexpired- Invitation has expired (7 days after creation)revoked- Invitation has been manually revoked
Create invitations
Creates one or more invitations to an organization. The inviter must have permission to invite users to the organization. This operation sends invitation emails via WorkOS.Organization ID to send invitations for.
Array of invitation objects.
Response
Array of invitation results, one per invite.
Number of successfully created invitations.
Number of failed invitations.
Errors
UnauthorizedError- User lacks permissionInternalServerError- Unexpected server error
This endpoint returns batch results. Individual invitation failures do not cause the entire request to fail. Check the
success field on each result.Resend invitation
Resends an existing invitation via WorkOS. Only the invitation creator or organization admins can resend invitations.Invitation ID to resend.
Response
The invitation object (same structure as in create invitations).
Transaction ID for optimistic UI updates.
Errors
InvitationNotFoundError- Invitation does not existUnauthorizedError- User lacks permissionInternalServerError- Unexpected server error
Revoke invitation
Revokes an existing invitation via WorkOS. The invitation status is updated to"revoked". Only the invitation creator or organization admins can revoke invitations.
Invitation ID to revoke.
Response
Transaction ID for optimistic UI updates.
Errors
InvitationNotFoundError- Invitation does not existUnauthorizedError- User lacks permissionInternalServerError- Unexpected server error
Update invitation
Updates an existing invitation. Can be used to change invitation status, role, or other properties.Invitation ID to update.
New status:
"pending", "accepted", "expired", or "revoked".ISO 8601 timestamp of acceptance.
User ID who accepted the invitation.
Response
The updated invitation object.
Transaction ID for optimistic UI updates.
Errors
InvitationNotFoundError- Invitation does not existUnauthorizedError- User lacks permissionInternalServerError- Unexpected server error
Delete invitation
Deletes an invitation. Only the invitation creator or users with appropriate permissions can delete invitations.Invitation ID to delete.
Response
Transaction ID for optimistic UI updates.
Errors
InvitationNotFoundError- Invitation does not existUnauthorizedError- User lacks permissionInternalServerError- Unexpected server error
Related APIs
Organizations
Manage organizations and settings
Organization members
Manage organization members and roles