POST/organizations/{organization_id}/invitations/bulk

Create and send organization invitations in bulk

Creates and sends organization invitations in bulk for a specified organization. Provide 1–10 invitation objects, each with email_address and role; you can set a different role and inviter for each invitation. Invitations remain pending until accepted or revoked, and notify controls whether an invitation email is sent.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 8 body fields
organization_idstringrequired
The unique identifier of the organization to invite members to.

An array of 1–10 organization invitation objects. Each object must include email_address and role.

email_addressstringrequired
The email address of the new member that is going to be invited to the organization
inviter_user_idstringoptional
The ID of the user that invites the new member to the organization. Must be an administrator in the organization.
rolestringrequired
The role of the new member in the organization
public_metadataobjectoptional
Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership.
private_metadataobjectoptional
Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership.
redirect_urlstringoptional
Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email.
expires_in_daysintegeroptional
The number of days the invitation will be valid for. By default, the invitation has a 30 days expire.
notifybooleanoptional
Optional flag which denotes whether an email invitation should be sent to the given email address. Defaults to `true`.
Default:true

5 status codes
200Returns an object containing the created organization invitations in `data` and their total count in `total_count`.
dataarray<object>required
total_countintegerrequired
Total number of organization invitations
400Returned when the request is unsuccessful.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
403Returned when authorization is invalid.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Returned when the requested resource is not found.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Returned when request parameters are invalid.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned when the request is unsuccessful, a 403 when authorization is invalid, a 404 when a resource is not found, and a 422 when request parameters are invalid. The request must contain 1–10 invitation objects, each with email_address and role; the organization_id path parameter must identify an existing organization. If provided, inviter_user_id must identify an organization member with administrator privileges, and expires_in_days must be between 1 and 365.