Classic APIs
ClassicOrganizationsApi
createOrgInvitation

createOrgInvitation

Invites a user to an organization.

Parameters

NameTypeDescription
orgIdOrgIdThe ID of the organization to invite a user to.
userIdUserIdThe ID of the user to invite to the organization.

Example

const { data: inviteInfo } = await ClassicOrganizationsApi.createOrgInvitation({
  orgId: "4244556007738484576",
  userId: 2655994471,
}); 

Example Data

[
  {
    userId: "45348281",
    roles: [
      {
        id: "914257001913009232",
        organizationId: "4244556007738484576",
        name: "Developer",
        color: "LightOrange",
        updatedTime: 2024-05-31T01:24:02.823Z,
      },
    ],
  },
] 

Endpoint

POST /v1/organizations/{orgId}/invitations